scala.slick.migration

api

package api

Visibility
  1. Public
  2. All

Type Members

  1. class CanConcatMigrations[-A, -B, +C] extends AnyRef

    A typeclass to determine the best way to combine migrations, either into a ReversibleMigrationSeq or just a MigrationSeq.

    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).

  2. class CanConcatMigrationsLow extends AnyRef

  3. class DerbyDialect extends Dialect[DerbyDriver]

  4. class Dialect[-D <: JdbcDriver] extends AstHelpers

    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.

    D

    The corresponding Slick driver type. Not used, but may come in handy in certain situations.

  5. class H2Dialect extends Dialect[H2Driver]

  6. class HsqldbDialect extends Dialect[HsqldbDriver]

  7. final class IrreversibleTableMigration[T <: driver.JdbcDriver.Table[_]] extends TableMigration[T]

    The concrete TableMigration class used when irreversible operations are to be performed (such as dropping a table)

  8. trait Migration extends AnyRef

    The base of the migration type hierarchy.

    The base of the migration type hierarchy. Can contain any operation that can use an implicit Session.

  9. case class MigrationException(message: String, cause: Throwable) extends RuntimeException with Product with Serializable

  10. case class MigrationSeq(migrations: Migration*) extends Migration with Product with Serializable

    Holds a sequence of Migrations and performs them one after the other.

  11. class MySQLDialect extends Dialect[MySQLDriver] with SimulatedRenameIndex

  12. class PostgresDialect extends Dialect[PostgresDriver]

  13. trait ReversibleMigration extends Migration

    A Migration that can be reversed; that is, it can provide a corresponding Migration that will undo whatever this migration will do.

  14. class ReversibleMigrationSeq extends MigrationSeq with ReversibleMigration

    Holds a sequence of ReversibleMigrations and performs them one after the other.

  15. final class ReversibleTableMigration[T <: driver.JdbcDriver.Table[_]] extends TableMigration[T] with ReversibleMigration

    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").

  16. class SQLiteDialect extends Dialect[SQLiteDriver] with SimulatedRenameIndex

  17. trait SimulatedRenameIndex extends AnyRef

  18. trait SqlMigration extends Migration

    A Migration defined in terms of SQL commands.

    A Migration defined in terms of SQL commands. This trait implements apply and instead defines an abstract sql method.

  19. sealed abstract class TableMigration[T <: driver.JdbcDriver.Table[_]] extends SqlMigration with AstHelpers with Equals

    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.

    Example:
    1. 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)
  20. case class TableMigrationData(tableDrop: Boolean = false, tableCreate: Boolean = false, tableRename: Option[String] = None, columnsCreate: Seq[ColumnInfo] = Nil, columnsDrop: Seq[ColumnInfo] = Nil, columnsRename: Map[ColumnInfo, String] = Map.empty, columnsAlterType: Seq[ColumnInfo] = Nil, columnsAlterDefault: Seq[ColumnInfo] = Nil, columnsAlterNullability: Seq[ColumnInfo] = Nil, foreignKeysCreate: Seq[ForeignKey] = Nil, foreignKeysDrop: Seq[ForeignKey] = Nil, primaryKeysCreate: Seq[(String, Seq[FieldSymbol])] = Nil, primaryKeysDrop: Seq[(String, Seq[FieldSymbol])] = Nil, indexesCreate: Seq[IndexInfo] = Nil, indexesDrop: Seq[IndexInfo] = Nil, indexesRename: Map[IndexInfo, String] = Map.empty) extends Product with Serializable

    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

    Attributes
    protected

Value Members

  1. object CanConcatMigrations extends CanConcatMigrationsLow

  2. object Migration

  3. object SqlMigration

    Convenience factory for SqlMigration

    Convenience factory for SqlMigration

    Example:
    1. SqlMigration("drop table t1", "update t2 set x=10 where y=20")
  4. object TableMigration

    Factory for TableMigrations

Ungrouped