scala.slick.migration.api

ReversibleTableMigration

Related Doc: package api

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

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

Self Type
ReversibleTableMigration[T]
Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By inheritance
Inherited
  1. ReversibleTableMigration
  2. ReversibleMigration
  3. TableMigration
  4. Equals
  5. AstHelpers
  6. SqlMigration
  7. Migration
  8. AnyRef
  9. Any
Implicitly
  1. by MigrationConcat
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Self = ReversibleTableMigration[T]

    The concrete type of this TableMigration (ReversibleTableMigration or IrreversibleTableMigration).* Operations that are in of themselves reversible will return an instance of this type.

    The concrete type of this TableMigration (ReversibleTableMigration or IrreversibleTableMigration).* Operations that are in of themselves reversible will return an instance of this type.

    Definition Classes
    ReversibleTableMigrationTableMigration

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def &(n: ReversibleMigration): ReversibleMigrationSeq

    [use case] Append a ReversibleMigration to form either a ReversibleMigrationSeq if the left side of & is also a ReversibleMigration; or else a plain MigrationSeq

    [use case]

    Append a ReversibleMigration to form either a ReversibleMigrationSeq if the left side of & is also a ReversibleMigration; or else a plain MigrationSeq

    n

    the ReversibleMigration to append

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to MigrationConcat[ReversibleTableMigration[T]] performed by method MigrationConcat in scala.slick.migration.api.Migration.
    Definition Classes
    MigrationConcat
    Full Signature

    def &[N <: Migration, O](n: N)(implicit ccm: CanConcatMigrations[ReversibleTableMigration[T], N, O]): O

    Example:
    1. val combined = mig1 & mig2 & mig3
  4. def &(n: Migration): MigrationSeq

    [use case] Append another Migration to form a MigrationSeq

    [use case]

    Append another Migration to form a MigrationSeq

    n

    the Migration to append

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to MigrationConcat[ReversibleTableMigration[T]] performed by method MigrationConcat in scala.slick.migration.api.Migration.
    Definition Classes
    MigrationConcat
    Full Signature

    def &[N <: Migration, O](n: N)(implicit ccm: CanConcatMigrations[ReversibleTableMigration[T], N, O]): O

    Example:
    1. val combined = mig1 & mig2 & mig3
  5. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to any2stringadd[ReversibleTableMigration[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  6. def ->[B](y: B): (ReversibleTableMigration[T], B)

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to ArrowAssoc[ReversibleTableMigration[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def addColumns(cols: (T) ⇒ Column[_]*): Self

    Add columns to the table.

    Add columns to the table. (If the table is being created, these may be incorporated into the CREATE TABLE statement.)

    cols

    zero or more column-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.addColumns(_.col1, _.col2, _.column[Int]("fieldNotYetInTableDef"))
  9. def addForeignKeys(fkqs: (T) ⇒ ForeignKeyQuery[_ <: AbstractTable[_], _]*): Self

    Adds foreign key constraints.

    Adds foreign key constraints.

    fkqs

    zero or more ForeignKeyQuery-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.addForeignKeys(_.fkDef)
  10. def addIndexes(indexes: (T) ⇒ Index*): Self

    Adds indexes

    Adds indexes

    indexes

    zero or more Index-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.addIndexes(_.idxDef)
  11. def addPrimaryKeys(pks: (T) ⇒ PrimaryKey*): Self

    Adds primary key constraints.

    Adds primary key constraints.

    pks

    zero or more PrimaryKey-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.addPrimaryKeys(_.pkDef)
  12. def alterColumnDefaults(cols: (T) ⇒ Column[_]*): IrreversibleTableMigration[T]

    Changes the default value of columns based on the column definitions in cols

    Changes the default value of columns based on the column definitions in cols

    cols

    zero or more column-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.alterColumnDefaults(_.col1, _.column[Int]("col2", O.Default("notTheDefaultInTableDef")))
  13. def alterColumnNulls(cols: (T) ⇒ Column[_]*): IrreversibleTableMigration[T]

    Changes the nullability of columns based on the column definitions in cols

    Changes the nullability of columns based on the column definitions in cols

    cols

    zero or more column-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.alterColumnNulls(_.col1, _.column[Int]("col2", O.NotNull))
  14. def alterColumnTypes(cols: (T) ⇒ Column[_]*): IrreversibleTableMigration[T]

    Changes the data type of columns based on the column definitions in cols

    Changes the data type of columns based on the column definitions in cols

    cols

    zero or more column-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.alterColumnTypes(_.col1, _.column[NotTheTypeInTableDef]("col2"))
  15. def apply()(implicit session: SessionDef): Unit

    Runs all the SQL statements in a single transaction

    Runs all the SQL statements in a single transaction

    Definition Classes
    SqlMigrationMigration
  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def canEqual(that: Any): Boolean

    Definition Classes
    TableMigration → Equals
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def columnInfo(driver: JdbcDriver, column: FieldSymbol): ColumnInfo

    driver

    a Slick driver, used to extract ColumnInfo#sqlType and ColumnInfo#notNull by calling typeInfoFor

    returns

    a ColumnInfo representing the relevant information in column

    Attributes
    protected
    Definition Classes
    AstHelpers
  20. def create: Self

    Create the table.

    Create the table. Note: drop + create is allowed.

    Definition Classes
    TableMigration
  21. val data: TableMigrationData

    Attributes
    protected[scala.slick.migration.api]
    Definition Classes
    ReversibleTableMigrationTableMigration
  22. def drop: IrreversibleTableMigration[T]

    Drop the table.

    Drop the table. Note: drop + create is allowed.

    Definition Classes
    TableMigration
  23. def dropColumns(cols: (T) ⇒ Column[_]*): Self

    Drop columns.

    Drop columns.

    cols

    zero or more column-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.dropColumns(_.col1, _.col2, _.column[Int]("oldFieldNotInTableDef"))
  24. def dropForeignKeys(fkqs: (T) ⇒ ForeignKeyQuery[_ <: AbstractTable[_], _]*): Self

    Drops foreign key constraints.

    Drops foreign key constraints.

    fkqs

    zero or more ForeignKeyQuery-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.dropForeignKeys(_.fkDef)
  25. def dropIndexes(indexes: (T) ⇒ Index*): Self

    Drops indexes

    Drops indexes

    indexes

    zero or more Index-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.dropIndexes(_.idxDef)
  26. def dropPrimaryKeys(pks: (T) ⇒ PrimaryKey*): Self

    Drops primary key constraints.

    Drops primary key constraints.

    pks

    zero or more PrimaryKey-returning functions, which are passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.dropPrimaryKeys(_.pkDef)
  27. def ensuring(cond: (ReversibleTableMigration[T]) ⇒ Boolean, msg: ⇒ Any): ReversibleTableMigration[T]

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to Ensuring[ReversibleTableMigration[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def ensuring(cond: (ReversibleTableMigration[T]) ⇒ Boolean): ReversibleTableMigration[T]

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to Ensuring[ReversibleTableMigration[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  29. def ensuring(cond: Boolean, msg: ⇒ Any): ReversibleTableMigration[T]

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to Ensuring[ReversibleTableMigration[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  30. def ensuring(cond: Boolean): ReversibleTableMigration[T]

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to Ensuring[ReversibleTableMigration[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  31. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. def equals(a: Any): Boolean

    Definition Classes
    TableMigration → Equals → AnyRef → Any
  33. def fieldSym(column: Column[_]): FieldSymbol

    returns

    a FieldSymbol representing the column

    Attributes
    protected
    Definition Classes
    AstHelpers
  34. def fieldSym(node: Node): Option[FieldSymbol]

    returns

    if node represents a reference to a table's column, that is, it is a Select(_, f: FieldSymbol), then Some(f); otherwise None

    Attributes
    protected
    Definition Classes
    AstHelpers
  35. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to StringFormat[ReversibleTableMigration[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  37. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  38. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  39. def indexInfo(index: Index): IndexInfo

    returns

    an IndexInfo containing the relevant information from a Slick Index

    Attributes
    protected
    Definition Classes
    AstHelpers
  40. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  41. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  42. final def notify(): Unit

    Definition Classes
    AnyRef
  43. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  44. def rename(to: String): Self

    Rename the table

    Rename the table

    to

    the new name for the table

    Definition Classes
    TableMigration
  45. def renameColumn(col: (T) ⇒ Column[_], to: String): Self

    Rename a column.

    Rename a column.

    col

    a column-returning function, which is passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.renameColumns(_.col1, "newName")
  46. def renameIndex(index: (T) ⇒ Index, to: String): Self

    Renames an index

    Renames an index

    index

    an Index-returning function, which is passed the table object.

    Definition Classes
    TableMigration
    Example:
    1. tblMig.renameIndex(_.idxDef, "newName")
  47. def reverse: IrreversibleTableMigration[T]

  48. def sql: Seq[String]

    The SQL statements to run

    The SQL statements to run

    Definition Classes
    TableMigrationSqlMigration
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def tableInfo: TableInfo

    Definition Classes
    TableMigration
  51. def tableInfo(table: TableNode): TableInfo

    table

    a Slick table object whose qualified name is needed

    returns

    a TableInfo representing the qualified name of table

    Attributes
    protected
    Definition Classes
    AstHelpers
  52. def toString(): String

    Definition Classes
    TableMigration → AnyRef → Any
  53. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def withData(d: TableMigrationData): ReversibleTableMigration[T]

    Attributes
    protected
    Definition Classes
    ReversibleTableMigrationTableMigration
  57. def [B](y: B): (ReversibleTableMigration[T], B)

    Implicit information
    This member is added by an implicit conversion from ReversibleTableMigration[T] to ArrowAssoc[ReversibleTableMigration[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from ReversibleMigration

Inherited from TableMigration[T]

Inherited from Equals

Inherited from AstHelpers

Inherited from SqlMigration

Inherited from Migration

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion MigrationConcat from ReversibleTableMigration[T] to MigrationConcat[ReversibleTableMigration[T]]

Inherited by implicit conversion any2stringadd from ReversibleTableMigration[T] to any2stringadd[ReversibleTableMigration[T]]

Inherited by implicit conversion StringFormat from ReversibleTableMigration[T] to StringFormat[ReversibleTableMigration[T]]

Inherited by implicit conversion Ensuring from ReversibleTableMigration[T] to Ensuring[ReversibleTableMigration[T]]

Inherited by implicit conversion ArrowAssoc from ReversibleTableMigration[T] to ArrowAssoc[ReversibleTableMigration[T]]

Schema Manipulation Operations

Ungrouped