Construct a migrator to a database with an existing DataSource but override default username and password.
Construct a migrator to a database with an existing DataSource but override default username and password.
the JDBC DataSource to connect to the database
the username to log into the database
the password associated with the database username
a concrete DatabaseAdapter that the migrator uses to handle database specific features
Construct a migrator to a database with an existing DataSource.
Construct a migrator to a database with an existing DataSource.
the JDBC DataSource to connect to the database
a concrete DatabaseAdapter that the migrator uses to handle database specific features
Construct a migrator to a database that needs a username and password.
Construct a migrator to a database that needs a username and password.
the JDBC URL to connect to the database
the username to log into the database
the password associated with the database username
a concrete DatabaseAdapter that the migrator uses to handle database specific features
Construct a migrator to a database that does not need a username and password.
Construct a migrator to a database that does not need a username and password.
the JDBC URL to connect to the database
a concrete DatabaseAdapter that the migrator uses to handle database specific features
Get a sorted list of all the installed migrations.
Get a sorted list of all the installed migrations.
a sorted set of version numbers of the installed migrations
Get the status of all the installed and available migrations.
Get the status of all the installed and available migrations. A tuple-like class is returned that contains three groups of migrations: installed migrations with an associated Migration subclass, installed migration without an associated Migration subclass and Migration subclasses that are not installed.
the Java package name to search for Migration subclasses
true if sub-packages of packageName should be searched
Get a list of table names.
Get a list of table names. If the database adapter was given a schema name then only the tables in that schema are returned.
a set of table names; no modifications of the case of table names is done
Migrate the database.
Migrate the database.
Running this method, even if no concrete Migration subclasses are found in the given package name, will result in the creation of the schema_migrations table in the database, if it does not currently exist.
the migration operation that should be performed
the Java package name to search for Migration subclasses
true if sub-packages of packageName should be searched
得到所有的表名
Determine if the database has all available migrations installed in it and no migrations installed that do not have a corresponding concrete Migration subclass; that is, the database must have only those migrations installed that are found by searching the package name for concrete Migration subclasses.
Determine if the database has all available migrations installed in it and no migrations installed that do not have a corresponding concrete Migration subclass; that is, the database must have only those migrations installed that are found by searching the package name for concrete Migration subclasses.
Running this method does not modify the database in any way. The schema migrations table is not created.
the Java package name to search for Migration subclasses
true if sub-packages of packageName should be searched
None if all available migrations are installed and all installed migrations have a corresponding Migration subclass; Some(message) with a message suitable for logging with the not-installed migrations and the installed migrations that do not have a matching Migration subclass
This class migrates the database into the desired state.