case class TableMigration[T <: jdbc.JdbcProfile.Table[_], A <: Action](tableInfo: TableInfo, actions: List[A])(table: T)(implicit dialect: Dialect[_], withActions: WithActions[A]) extends SqlMigration with AstHelpers with Product with Serializable
- Grouped
- Alphabetic
- By Inheritance
- TableMigration
- Serializable
- Product
- Equals
- AstHelpers
- SqlMigration
- Migration
- AnyRef
- Any
- by Reversible
- by MigrationConcat
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new TableMigration(tableInfo: TableInfo, actions: List[A])(table: T)(implicit dialect: Dialect[_], withActions: WithActions[A])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def &[N <: Migration, O](n: N)(implicit ccm: CanConcatMigrations[TableMigration[T, A], N, O]): O
Append another Migration to form a MigrationSeq If both sides are ReversibleMigrations then a ReversibleMigrationSeq is returned.
Append another Migration to form a MigrationSeq If both sides are ReversibleMigrations then a ReversibleMigrationSeq is returned.
- n
the Migration to append
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toMigrationConcat[TableMigration[T, A]] performed by method MigrationConcat in slick.migration.api.Migration.
- Definition Classes
- MigrationConcat
val combined = mig1 & mig2 & mig3
Example: - def +(other: String): String
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toany2stringadd[TableMigration[T, A]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (TableMigration[T, A], B)
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toArrowAssoc[TableMigration[T, A]] performed by method ArrowAssoc in scala.Predef.This conversion will take place only if A is Reversible (A =:= Reversible).
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val actions: List[A]
- def addColumnAndSet[C](col: (T) => Rep[C], value: C)(implicit jdbcType: JdbcType[C]): TableMigration[T, A]
Adds a column and populates it without a column default in the future.
- def addColumnAndSetRaw(col: (T) => Rep[_], rawSqlExpr: String): TableMigration[T, A]
- Note
rawSqlExpr
is used as raw SQL, with the security implications thereof
- def addColumns(cols: (T) => Rep[_]*): TableMigration[T, A]
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.
tblMig.addColumns(_.col1, _.col2, _.column[Int]("fieldNotYetInTableDef"))
Example: - def addForeignKeys(fkqs: (T) => ForeignKeyQuery[_ <: AbstractTable[_], _]*): TableMigration[T, A]
Adds foreign key constraints.
Adds foreign key constraints.
- fkqs
zero or more
ForeignKeyQuery
-returning functions, which are passed the table object.
tblMig.addForeignKeys(_.fkDef)
Example: - def addIndexes(indexes: (T) => Index*): TableMigration[T, A]
Adds indexes
Adds indexes
- indexes
zero or more
Index
-returning functions, which are passed the table object.
tblMig.addIndexes(_.idxDef)
Example: - def addPrimaryKeys(pks: (T) => PrimaryKey*): TableMigration[T, A]
Adds primary key constraints.
Adds primary key constraints.
- pks
zero or more
PrimaryKey
-returning functions, which are passed the table object.
tblMig.addPrimaryKeys(_.pkDef)
Example: - def alterColumnDefaults(cols: (T) => Rep[_]*): TableMigration[T, Action]
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.
tblMig.alterColumnDefaults(_.col1, _.column[Int]("col2", O.Default("notTheDefaultInTableDef")))
Example: - def alterColumnNulls(cols: (T) => Rep[_]*): TableMigration[T, Action]
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.
tblMig.alterColumnNulls(_.col1, _.column[Int]("col2", O.NotNull))
Example: - def alterColumnTypes(cols: (T) => Rep[_]*): TableMigration[T, Action]
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.
tblMig.alterColumnTypes(_.col1, _.column[NotTheTypeInTableDef]("col2"))
Example: - def apply(): SimpleJdbcAction[Unit]
- Definition Classes
- SqlMigration → Migration
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def colInfo[T <: jdbc.JdbcProfile.Table[_]](table: T)(f: (T) => Rep[_]): ColumnInfo
- Attributes
- protected
- Definition Classes
- AstHelpers
- def columnInfo: ((T) => Rep[_]) => ColumnInfo
- Attributes
- protected
- def columnInfo(driver: JdbcProfile, column: FieldSymbol): ColumnInfo
- driver
a Slick driver, used to extract
ColumnInfo#sqlType
andColumnInfo#notNull
by callingtypeInfoFor
- returns
a
ColumnInfo
representing the relevant information incolumn
- Attributes
- protected
- Definition Classes
- AstHelpers
- def create: TableMigration[T, A]
Create the table.
- def drop: TableMigration[T, Action]
Drop the table.
- def dropColumns(name: String, names: String*): TableMigration[T, Action]
- def dropColumns(cols: (T) => Rep[_]*): TableMigration[T, A]
Drop columns.
Drop columns.
- cols
zero or more column-returning functions, which are passed the table object.
tblMig.dropColumns(_.col1, _.col2, _.column[Int]("oldFieldNotInTableDef"))
Example: - def dropForeignKeys(fkqs: (T) => ForeignKeyQuery[_ <: AbstractTable[_], _]*): TableMigration[T, A]
Drops foreign key constraints.
Drops foreign key constraints.
- fkqs
zero or more
ForeignKeyQuery
-returning functions, which are passed the table object.
tblMig.dropForeignKeys(_.fkDef)
Example: - def dropIndexes(indexes: (T) => Index*): TableMigration[T, A]
Drops indexes
Drops indexes
- indexes
zero or more
Index
-returning functions, which are passed the table object.
tblMig.dropIndexes(_.idxDef)
Example: - def dropPrimaryKeys(pks: (T) => PrimaryKey*): TableMigration[T, A]
Drops primary key constraints.
Drops primary key constraints.
- pks
zero or more
PrimaryKey
-returning functions, which are passed the table object.
tblMig.dropPrimaryKeys(_.pkDef)
Example: - def ensuring(cond: (TableMigration[T, A]) => Boolean, msg: => Any): TableMigration[T, A]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toEnsuring[TableMigration[T, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (TableMigration[T, A]) => Boolean): TableMigration[T, A]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toEnsuring[TableMigration[T, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): TableMigration[T, A]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toEnsuring[TableMigration[T, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): TableMigration[T, A]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toEnsuring[TableMigration[T, A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def fieldSym(node: Node): Option[FieldSymbol]
- returns
if
node
represents a reference to a table's column, that is, it is aSelect(_, f: FieldSymbol)
, thenSome(f)
; otherwiseNone
- Attributes
- protected
- Definition Classes
- AstHelpers
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def indexInfo(index: Index): IndexInfo
- returns
an
IndexInfo
containing the relevant information from a SlickIndex
- Attributes
- protected
- Definition Classes
- AstHelpers
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def rename(to: String): TableMigration[T, A]
Rename the table
Rename the table
- to
the new name for the table
- def renameColumn(col: (T) => Rep[_], to: String): TableMigration[T, A]
Rename a column.
Rename a column.
- col
a column-returning function, which is passed the table object.
tblMig.renameColumn(_.col1, "newName")
Example: - def renameColumnFrom(from: String, col: (T) => Rep[_]): TableMigration[T, A]
- def renameFrom(from: String): TableMigration[T, A]
- def renameIndex(index: (T) => Index, to: String): TableMigration[T, A]
Renames an index
Renames an index
- index
an
Index
-returning function, which is passed the table object.
tblMig.renameIndex(_.idxDef, "newName")
Example: - def renameIndexFrom(from: String, index: (T) => Index): TableMigration[T, A]
- def reverse: TableMigration[T, Action]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toReversible[T] performed by method Reversible in slick.migration.api.TableMigration.This conversion will take place only if T is a subclass of jdbc.JdbcProfile.Table[_] (T <: jdbc.JdbcProfile.Table[_]) and at the same time A is Reversible (A =:= Reversible).
- Definition Classes
- Reversible → ReversibleMigration
- def sql: List[String]
The SQL statements to run
The SQL statements to run
- Definition Classes
- TableMigration → SqlMigration
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val table: T
- def tableInfo(table: TableNode): TableInfo
- table
a Slick table object whose qualified name is needed
- returns
a
TableInfo
representing the qualified name oftable
- Attributes
- protected
- Definition Classes
- AstHelpers
- val tableInfo: TableInfo
- def toString(): String
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toReversible[T] performed by method Reversible in slick.migration.api.TableMigration.This conversion will take place only if T is a subclass of jdbc.JdbcProfile.Table[_] (T <: jdbc.JdbcProfile.Table[_]) and at the same time A is Reversible (A =:= Reversible).
- Definition Classes
- Reversible → AnyRef → Any
- val underlying: TableMigration[T, Reversible]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toReversible[T] performed by method Reversible in slick.migration.api.TableMigration.This conversion will take place only if T is a subclass of jdbc.JdbcProfile.Table[_] (T <: jdbc.JdbcProfile.Table[_]) and at the same time A is Reversible (A =:= Reversible).
- Definition Classes
- Reversible
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Shadowed Implicit Value Members
- def apply(): SimpleJdbcAction[Unit]
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toReversible[T] performed by method Reversible in slick.migration.api.TableMigration.This conversion will take place only if T is a subclass of jdbc.JdbcProfile.Table[_] (T <: jdbc.JdbcProfile.Table[_]) and at the same time A is Reversible (A =:= Reversible).
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(tableMigration: Reversible[T]).apply()
- Definition Classes
- SqlMigration → Migration
- def sql: List[String]
The SQL statements to run
The SQL statements to run
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toReversible[T] performed by method Reversible in slick.migration.api.TableMigration.This conversion will take place only if T is a subclass of jdbc.JdbcProfile.Table[_] (T <: jdbc.JdbcProfile.Table[_]) and at the same time A is Reversible (A =:= Reversible).
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(tableMigration: Reversible[T]).sql
- Definition Classes
- Reversible → SqlMigration
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toStringFormat[TableMigration[T, A]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (TableMigration[T, A], B)
- Implicit
- This member is added by an implicit conversion from TableMigration[T, A] toArrowAssoc[TableMigration[T, A]] performed by method ArrowAssoc in scala.Predef.This conversion will take place only if A is Reversible (A =:= Reversible).
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.