Documentation
¶
Index ¶
Constants ¶
View Source
const DropDefault = Raw(`DROP DEFAULT`)
View Source
const DropNotNull = Raw(`DROP NOT NULL`)
View Source
const SetNotNull = Raw(`SET NOT NULL`)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddColumn ¶
type AddPrimaryKey ¶
type AddPrimaryKey struct {
Columns []string
}
func (AddPrimaryKey) String ¶
func (x AddPrimaryKey) String() string
type AlterColumn ¶
AlterColumn is a child change of AlterTable, and accepts a child column change.
func (AlterColumn) String ¶
func (x AlterColumn) String() string
type AlterTable ¶
Alter an existing table. This change occurs when you have matching table names but the schema doesn't match.
func (AlterTable) String ¶
func (x AlterTable) String() string
type Change ¶
type Change interface {
String() string
}
func Changes ¶
func Changes(a, b db.DatabaseNode) []Change
type CreateExtension ¶
type CreateExtension struct {
ExtName string
}
Create a missing extension.
func (CreateExtension) String ¶
func (x CreateExtension) String() string
type CreateIndex ¶
type CreateIndex struct {
SchemaName string
TableName string
IndexName string
Exprs []string
Unique bool
}
func (CreateIndex) String ¶
func (x CreateIndex) String() string
type CreateSchema ¶
type CreateSchema struct {
SchemaName string
}
func (CreateSchema) String ¶
func (x CreateSchema) String() string
type CreateTable ¶
func (CreateTable) String ¶
func (x CreateTable) String() string
type DropColumn ¶
type DropColumn struct {
ColumnName string
}
DropColumn drops an existing column from existing table. It's a child change that requires a parent AlterTable.
func (DropColumn) String ¶
func (x DropColumn) String() string
type DropConstraint ¶
type DropConstraint struct {
ConstraintName string
}
DropConstraint is a nested change that requires a parent AlterTable change.
func (DropConstraint) String ¶
func (x DropConstraint) String() string
type DropTable ¶
Drop an existing table. This change occurs when you have a table name in the old schema with no match in the new schema.
type SetDataType ¶
SetDataType is a child change of AlterColumn. It changes a data using a cast function.
func (SetDataType) String ¶
func (x SetDataType) String() string
type SetDefault ¶
type SetDefault struct {
Default string
}
func (SetDefault) String ¶
func (x SetDefault) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.