A typeclass to determine the best way to combine migrations, either into a ReversibleMigrationSeq or just a MigrationSeq.
Base class for database dialects.
Base class for database dialects. Provides methods that return the dialect-specific SQL strings for performing various database operations. The most important method is perhaps migrateTable, which is called from TableMigration#sql. These methods are to be overriden in database-specific subclasses as needed.
The corresponding Slick driver type. Not used, but may come in handy in certain situations.
The concrete TableMigration class used when irreversible operations are to be performed (such as dropping a table)
The base of the migration type hierarchy.
The base of the migration type hierarchy.
Can contain any operation that can use an implicit Session
.
Holds a sequence of Migrations and performs them one after the other.
A Migration that can be reversed; that is,
it can provide a corresponding Migration
that
will undo whatever this migration will do.
Holds a sequence of ReversibleMigrations and performs them one after the other.
The concrete TableMigration class used when all operations are reversible.
The concrete TableMigration class used when all operations are reversible.
This class extends ReversibleMigration and as such includes a reverse method
that returns a TableMigration
that performs the inverse operations ("down migration").
A Migration defined in terms of SQL commands.
The base class for table migrations.
The base class for table migrations. A table migration is a Migration that performs changes to a table.
See this class's methods for a list of available operations. Calling an operation method
returns a new TableMigration
that has that operation added, over operations
contained in the original TableMigration
. This allows for a nice method chaining syntax.
Like all Migrations, you can run the resulting TableMigration by calling its
apply
method (it expects an implicit Session
). Being an SqlMigration you
can also call the sql
method to see the SQL statement(s) it uses.
This class is abstract; use its companion object as a factory to get an instance.
object table1 extends Table[(Int, Int, Int)]("table1") { def col1 = column[Int]("col1") def col2 = column[Int]("col2") def col3 = column[Int]("col3") def * = col1 ~ col2 ~ col3 } implicit val dialect = new H2Dialect val migration = TableMigration(table1) .addColumns(_.col1, _.col2) .addColumns(_.col3)
Internal data structure that stores schema manipulation operations to be performed on a table
Internal data structure that stores schema manipulation operations to be performed on a table
Convenience factory for SqlMigration
Convenience factory for SqlMigration
SqlMigration("drop table t1", "update t2 set x=10 where y=20")
Factory for TableMigrations
A typeclass to determine the best way to combine migrations, either into a ReversibleMigrationSeq or just a MigrationSeq. Used when you call '&' on Migrations. Note that the migrations will be flattened; you will not end up with something like
MigrationSeq(MigrationSeq(MigrationSeq(migA, migB), migC), migD)
.