migrations

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const CNeedsBackfillColumn = "_pgroll_needs_backfill"

Variables

This section is empty.

Functions

func DeletionName added in v0.9.0

func DeletionName(name string) string

DeletionName returns the deleted name for a given name.

func DuplicationName added in v0.5.0

func DuplicationName(name string) string

DuplicationName returns the name of a duplicated column.

func IsDuplicatedName added in v0.5.0

func IsDuplicatedName(name string) bool

IsDuplicatedName returns true if the name is a duplicated column name.

func IsNotNullConstraintName added in v0.5.0

func IsNotNullConstraintName(name string) bool

IsNotNullConstraintName returns true if the given name is a NOT NULL constraint name

func NotNullConstraintName

func NotNullConstraintName(columnName string) string

NotNullConstraintName returns the name of the NOT NULL constraint for the given column

func RenameDuplicatedColumn added in v0.5.0

func RenameDuplicatedColumn(ctx context.Context, conn db.DB, table *schema.Table, column *schema.Column) error

RenameDuplicatedColumn * Renames a duplicated column to its original name * Renames any foreign keys on the duplicated column to their original name. * Validates and renames any temporary `CHECK` constraints on the duplicated column.

func StripDuplicationPrefix added in v0.5.0

func StripDuplicationPrefix(name string) string

StripDuplicationPrefix removes the duplication prefix from a column name.

func TemporaryName

func TemporaryName(name string) string

TemporaryName returns a temporary name for a given name.

func TriggerFunctionName

func TriggerFunctionName(tableName, columnName string) string

TriggerFunctionName returns the name of the trigger function for a given table and column.

func TriggerName

func TriggerName(tableName, columnName string) string

TriggerName returns the name of the trigger for a given table and column.

func UniqueIndexName added in v0.10.0

func UniqueIndexName(columnName string) string

UniqueIndexName returns the name of the unique index for the given column

func ValidateIdentifierLength added in v0.8.0

func ValidateIdentifierLength(name string) error

ValidateIdentifierLength returns an error if the given name exceeds the maximum allowed length for a Postgres identifier.

Types

type AlterColumnNoChangesError added in v0.6.0

type AlterColumnNoChangesError struct {
	Table  string
	Column string
}

func (AlterColumnNoChangesError) Error added in v0.6.0

type CheckConstraint

type CheckConstraint struct {
	// Constraint expression
	Constraint string `json:"constraint"`

	// Name of check constraint
	Name string `json:"name"`

	// Do not propagate constraint to child tables
	NoInherit bool `json:"no_inherit,omitempty"`
}

Check constraint definition

func (*CheckConstraint) Validate

func (c *CheckConstraint) Validate() error

Validate checks that the CheckConstraint is valid

type CheckConstraintError

type CheckConstraintError struct {
	Table  string
	Column string
	Name   string
	Err    error
}

func (CheckConstraintError) Error

func (e CheckConstraintError) Error() string

func (CheckConstraintError) Unwrap

func (e CheckConstraintError) Unwrap() error

type Column

type Column struct {
	// Check constraint for the column
	Check *CheckConstraint `json:"check,omitempty"`

	// Postgres comment for the column
	Comment *string `json:"comment,omitempty"`

	// Default value for the column
	Default *string `json:"default,omitempty"`

	// Generated column definition
	Generated *ColumnGenerated `json:"generated,omitempty"`

	// Name of the column
	Name string `json:"name"`

	// Indicates if the column is nullable
	Nullable bool `json:"nullable,omitempty"`

	// Indicates if the column is part of the primary key
	Pk bool `json:"pk,omitempty"`

	// Foreign key constraint for the column
	References *ForeignKeyReference `json:"references,omitempty"`

	// Postgres type of the column
	Type string `json:"type"`

	// Indicates if the column values must be unique
	Unique bool `json:"unique,omitempty"`
}

Column definition

func (*Column) HasDefault added in v0.10.0

func (c *Column) HasDefault() bool

HasDefault returns true if the column has a default value

func (*Column) HasImplicitDefault added in v0.8.0

func (c *Column) HasImplicitDefault() bool

HasImplicitDefault returns true if the column has an implicit default value

func (*Column) IsNullable added in v0.5.0

func (c *Column) IsNullable() bool

IsNullable returns true if the column is nullable

func (*Column) IsPrimaryKey added in v0.5.0

func (c *Column) IsPrimaryKey() bool

IsPrimaryKey returns true if the column is part of the primary key

func (*Column) IsUnique added in v0.5.0

func (c *Column) IsUnique() bool

IsUnique returns true if the column values must be unique

func (*Column) Validate added in v0.10.0

func (c *Column) Validate() bool

Validate returns true iff the column contains all fields required to create the column

type ColumnAlreadyExistsError

type ColumnAlreadyExistsError struct {
	Table string
	Name  string
}

func (ColumnAlreadyExistsError) Error

func (e ColumnAlreadyExistsError) Error() string

type ColumnDoesNotExistError

type ColumnDoesNotExistError struct {
	Table string
	Name  string
}

func (ColumnDoesNotExistError) Error

func (e ColumnDoesNotExistError) Error() string

type ColumnGenerated added in v0.9.0

type ColumnGenerated struct {
	// Generation expression of the column
	Expression string `json:"expression,omitempty"`

	// Identity corresponds to the JSON schema field "identity".
	Identity *ColumnGeneratedIdentity `json:"identity,omitempty"`
}

Generated column definition

type ColumnGeneratedIdentity added in v0.9.0

type ColumnGeneratedIdentity struct {
	// Sequence options for identity column, same as in CREATE SEQUENCE
	SequenceOptions string `json:"sequence_options,omitempty"`

	// How to handle user specified values for identity column in INSERT and UPDATE
	// statements
	UserSpecifiedValues ColumnGeneratedIdentityUserSpecifiedValues `json:"user_specified_values,omitempty"`
}

type ColumnGeneratedIdentityUserSpecifiedValues added in v0.9.0

type ColumnGeneratedIdentityUserSpecifiedValues string
const ColumnGeneratedIdentityUserSpecifiedValuesALWAYS ColumnGeneratedIdentityUserSpecifiedValues = "ALWAYS"
const ColumnGeneratedIdentityUserSpecifiedValuesBYDEFAULT ColumnGeneratedIdentityUserSpecifiedValues = "BY DEFAULT"

type ColumnIsInvalidError added in v0.10.0

type ColumnIsInvalidError struct {
	Table string
	Name  string
}

func (ColumnIsInvalidError) Error added in v0.10.0

func (e ColumnIsInvalidError) Error() string

type ColumnIsNotNullableError

type ColumnIsNotNullableError struct {
	Table string
	Name  string
}

func (ColumnIsNotNullableError) Error

func (e ColumnIsNotNullableError) Error() string

type ColumnIsNullableError added in v0.5.0

type ColumnIsNullableError struct {
	Table string
	Name  string
}

func (ColumnIsNullableError) Error added in v0.5.0

func (e ColumnIsNullableError) Error() string

type ColumnMigrationMissingError added in v0.8.0

type ColumnMigrationMissingError struct {
	Table string
	Name  string
}

func (ColumnMigrationMissingError) Error added in v0.8.0

type ColumnMigrationRedundantError added in v0.8.0

type ColumnMigrationRedundantError struct {
	Table string
	Name  string
}

func (ColumnMigrationRedundantError) Error added in v0.8.0

type ColumnReferenceError

type ColumnReferenceError struct {
	Table  string
	Column string
	Err    error
}

func (ColumnReferenceError) Error

func (e ColumnReferenceError) Error() string

func (ColumnReferenceError) Unwrap

func (e ColumnReferenceError) Unwrap() error

type ColumnSQLWriter added in v0.8.0

type ColumnSQLWriter struct {
	WithPK bool
}

ColumnSQLWriter writes a column to SQL It can optionally include the primary key constraint When creating a table, the primary key constraint is not added to the column definition

func (ColumnSQLWriter) Write added in v0.8.0

func (w ColumnSQLWriter) Write(col Column) (string, error)

type Constraint added in v0.9.0

type Constraint struct {
	// Check constraint expression
	Check string `json:"check,omitempty"`

	// Columns to add constraint to
	Columns []string `json:"columns,omitempty"`

	// Deferable constraint
	Deferrable bool `json:"deferrable,omitempty"`

	// Exclude constraint definition
	Exclude *ConstraintExclude `json:"exclude,omitempty"`

	// IndexParameters corresponds to the JSON schema field "index_parameters".
	IndexParameters *ConstraintIndexParameters `json:"index_parameters,omitempty"`

	// Initially deferred constraint
	InitiallyDeferred bool `json:"initially_deferred,omitempty"`

	// Name of the constraint
	Name string `json:"name"`

	// Do not propagate constraint to child tables
	NoInherit bool `json:"no_inherit,omitempty"`

	// Nulls not distinct constraint
	NullsNotDistinct bool `json:"nulls_not_distinct,omitempty"`

	// Reference to the foreign key
	References *TableForeignKeyReference `json:"references,omitempty"`

	// Type of the constraint
	Type ConstraintType `json:"type"`
}

Constraint definition

type ConstraintAlreadyExistsError added in v0.6.0

type ConstraintAlreadyExistsError struct {
	Table      string
	Constraint string
}

func (ConstraintAlreadyExistsError) Error added in v0.6.0

type ConstraintDoesNotExistError added in v0.5.0

type ConstraintDoesNotExistError struct {
	Table      string
	Constraint string
}

func (ConstraintDoesNotExistError) Error added in v0.5.0

type ConstraintExclude added in v0.9.0

type ConstraintExclude struct {
	// Expressions of the exclude constraint
	Elements string `json:"elements,omitempty"`

	// Index method
	IndexMethod string `json:"index_method,omitempty"`

	// Predicate for the exclusion constraint
	Predicate string `json:"predicate,omitempty"`
}

Exclude constraint definition

type ConstraintIndexParameters added in v0.9.0

type ConstraintIndexParameters struct {
	// IncludeColumns corresponds to the JSON schema field "include_columns".
	IncludeColumns []string `json:"include_columns,omitempty"`

	// StorageParameters corresponds to the JSON schema field "storage_parameters".
	StorageParameters string `json:"storage_parameters,omitempty"`

	// Tablespace corresponds to the JSON schema field "tablespace".
	Tablespace string `json:"tablespace,omitempty"`
}

type ConstraintSQLWriter added in v0.9.0

type ConstraintSQLWriter struct {
	Name              string
	Columns           []string
	InitiallyDeferred bool
	Deferrable        bool
	SkipValidation    bool

	// unique, exclude, primary key constraints support the following options
	IncludeColumns    []string
	StorageParameters string
	Tablespace        string
}

ConstraintSQLWriter is a helper struct to write constraint SQL statements. It can generate SQL for unique, check, primary key, foreign key and exclude constraints. The generated SQL can be used in CREATE TABLE or ALTER TABLE statements both as an inline constraint or as a table level constraint.

func (*ConstraintSQLWriter) WriteCheck added in v0.9.0

func (w *ConstraintSQLWriter) WriteCheck(check string, noInherit bool) string

WriteCheck generates a check constraint. Supported options: - noInherit: if true, the constraint is not inherited by child tables. - skipValidation: if true, the constraint is not validated.

func (*ConstraintSQLWriter) WriteExclude added in v0.9.0

func (w *ConstraintSQLWriter) WriteExclude(indexMethod, elements, predicate string) string

WriteExclude generates an exclude constraint. Supported options: - includeColumns: additional columns to include in the index. - storageParameters: storage parameters for the index. - tablespace: tablespace for the index. - deferrable: if true, the constraint is deferrable. - initiallyDeferred: if true, the constraint is initially deferred.

func (*ConstraintSQLWriter) WriteForeignKey added in v0.9.0

func (w *ConstraintSQLWriter) WriteForeignKey(referencedTable string, referencedColumns []string, onDelete, onUpdate ForeignKeyAction, setColumns []string, matchType ForeignKeyMatchType) string

WriteForeignKey generates a foreign key constraint on the table level and inline. Supported options: - includeColumns: additional columns to include in the index. - storageParameters: storage parameters for the index. - tablespace: tablespace for the index. - deferrable: if true, the constraint is deferrable. - initiallyDeferred: if true, the constraint is initially deferred. - skipValidation: if true, the constraint is not validated.

func (*ConstraintSQLWriter) WritePrimaryKey added in v0.9.0

func (w *ConstraintSQLWriter) WritePrimaryKey() string

WritePrimaryKey generates a primary key constraint. Supported options: - includeColumns: additional columns to include in the index. - storageParameters: storage parameters for the index. - tablespace: tablespace for the index. - deferrable: if true, the constraint is deferrable. - initiallyDeferred: if true, the constraint is initially deferred.

func (*ConstraintSQLWriter) WriteUnique added in v0.9.0

func (w *ConstraintSQLWriter) WriteUnique(nullsNotDistinct bool) string

WriterUnique generates a unique constraint. Supported options: - nullsNotDistinct: if true, NULL values are considered equal. - includeColumns: additional columns to include in the index. - storageParameters: storage parameters for the index. - tablespace: tablespace for the index. - deferrable: if true, the constraint is deferrable. - initiallyDeferred: if true, the constraint is initially deferred.

type ConstraintType added in v0.9.0

type ConstraintType string
const ConstraintTypeCheck ConstraintType = "check"
const ConstraintTypeExclude ConstraintType = "exclude"
const ConstraintTypeForeignKey ConstraintType = "foreign_key"
const ConstraintTypePrimaryKey ConstraintType = "primary_key"
const ConstraintTypeUnique ConstraintType = "unique"

type Duplicator added in v0.5.0

type Duplicator struct {
	// contains filtered or unexported fields
}

Duplicator duplicates a column in a table, including all constraints and comments.

func NewColumnDuplicator added in v0.5.0

func NewColumnDuplicator(conn db.DB, table *schema.Table, columns ...*schema.Column) *Duplicator

NewColumnDuplicator creates a new Duplicator for a column.

func (*Duplicator) Duplicate added in v0.5.0

func (d *Duplicator) Duplicate(ctx context.Context) error

Duplicate duplicates a column in the table, including all constraints and comments.

func (*Duplicator) WithName added in v0.9.0

func (d *Duplicator) WithName(columnName, asName string) *Duplicator

WithName sets the name of the new column.

func (*Duplicator) WithType added in v0.5.0

func (d *Duplicator) WithType(columnName, t string) *Duplicator

WithType sets the type of the new column.

func (*Duplicator) WithoutConstraint added in v0.5.0

func (d *Duplicator) WithoutConstraint(c string) *Duplicator

WithoutConstraint excludes a constraint from being duplicated.

func (*Duplicator) WithoutNotNull added in v0.5.0

func (d *Duplicator) WithoutNotNull(columnName string) *Duplicator

WithoutNotNull excludes the NOT NULL constraint from being duplicated.

type EmptyMigrationError

type EmptyMigrationError struct{}

func (EmptyMigrationError) Error

func (e EmptyMigrationError) Error() string

type FieldRequiredError

type FieldRequiredError struct {
	Name string
}

func (FieldRequiredError) Error

func (e FieldRequiredError) Error() string

type ForeignKeyAction added in v0.9.0

type ForeignKeyAction string
const ForeignKeyActionCASCADE ForeignKeyAction = "CASCADE"
const ForeignKeyActionNOACTION ForeignKeyAction = "NO ACTION"
const ForeignKeyActionRESTRICT ForeignKeyAction = "RESTRICT"
const ForeignKeyActionSETDEFAULT ForeignKeyAction = "SET DEFAULT"
const ForeignKeyActionSETNULL ForeignKeyAction = "SET NULL"

type ForeignKeyMatchType added in v0.9.0

type ForeignKeyMatchType string
const ForeignKeyMatchTypeFULL ForeignKeyMatchType = "FULL"
const ForeignKeyMatchTypePARTIAL ForeignKeyMatchType = "PARTIAL"
const ForeignKeyMatchTypeSIMPLE ForeignKeyMatchType = "SIMPLE"

type ForeignKeyReference

type ForeignKeyReference struct {
	// Name of the referenced column
	Column string `json:"column"`

	// Deferable constraint
	Deferrable bool `json:"deferrable,omitempty"`

	// Initially deferred constraint
	InitiallyDeferred bool `json:"initially_deferred,omitempty"`

	// Match type of the foreign key constraint
	MatchType ForeignKeyMatchType `json:"match_type,omitempty"`

	// Name of the foreign key constraint
	Name string `json:"name"`

	// On delete behavior of the foreign key constraint
	OnDelete ForeignKeyAction `json:"on_delete,omitempty"`

	// On update behavior of the foreign key constraint
	OnUpdate ForeignKeyAction `json:"on_update,omitempty"`

	// Name of the referenced table
	Table string `json:"table"`
}

Foreign key reference definition

func (*ForeignKeyReference) Validate

func (f *ForeignKeyReference) Validate(s *schema.Schema) error

Validate checks that the ForeignKeyReference is valid

type IndexAlreadyExistsError

type IndexAlreadyExistsError struct {
	Name string
}

func (IndexAlreadyExistsError) Error

func (e IndexAlreadyExistsError) Error() string

type IndexDoesNotExistError

type IndexDoesNotExistError struct {
	Name string
}

func (IndexDoesNotExistError) Error

func (e IndexDoesNotExistError) Error() string

type IndexField added in v0.10.0

type IndexField struct {
	// Collation for the index element
	Collate string `json:"collate,omitempty"`

	// Nulls ordering, default is first if ascending, last if descending
	Nulls *IndexFieldNulls `json:"nulls,omitempty"`

	// Operator class settings
	Opclass *IndexFieldOpclass `json:"opclass,omitempty"`

	// Sort order, default is ascending (ASC)
	Sort IndexFieldSort `json:"sort,omitempty"`
}

Index field and its settings

type IndexFieldNulls added in v0.10.0

type IndexFieldNulls string
const IndexFieldNullsFIRST IndexFieldNulls = "FIRST"
const IndexFieldNullsLAST IndexFieldNulls = "LAST"

type IndexFieldOpclass added in v0.10.0

type IndexFieldOpclass struct {
	// Name of the operator class
	Name string `json:"name,omitempty"`

	// Operator class parameters
	Params []string `json:"params,omitempty"`
}

Operator class settings

type IndexFieldSort added in v0.10.0

type IndexFieldSort string
const IndexFieldSortASC IndexFieldSort = "ASC"
const IndexFieldSortDESC IndexFieldSort = "DESC"

type InvalidGeneratedColumnError added in v0.9.0

type InvalidGeneratedColumnError struct {
	Table  string
	Column string
}

func (InvalidGeneratedColumnError) Error added in v0.9.0

type InvalidIdentifierLengthError added in v0.8.0

type InvalidIdentifierLengthError struct {
	Name string
}

func (InvalidIdentifierLengthError) Error added in v0.8.0

type InvalidMigrationError

type InvalidMigrationError struct {
	Reason string
}

func (InvalidMigrationError) Error

func (e InvalidMigrationError) Error() string

type InvalidOnDeleteSetColumnError added in v0.9.0

type InvalidOnDeleteSetColumnError struct {
	Name   string
	Column string
}

func (InvalidOnDeleteSetColumnError) Error added in v0.9.0

type InvalidOnDeleteSettingError added in v0.6.0

type InvalidOnDeleteSettingError struct {
	Name    string
	Setting string
}

func (InvalidOnDeleteSettingError) Error added in v0.6.0

type InvalidReplicaIdentityError added in v0.4.0

type InvalidReplicaIdentityError struct {
	Table    string
	Identity string
}

func (InvalidReplicaIdentityError) Error added in v0.4.0

type IsolatedOperation

type IsolatedOperation interface {
	// IsIsolated defines where this operation is isolated when executed on start, cannot be executed
	// with other operations.
	IsIsolated() bool
}

IsolatedOperation is an operation that cannot be executed with other operations in the same migration.

type Migration

type Migration struct {
	Name string `json:"name"`

	Operations Operations `json:"operations"`
}

func ReadMigration added in v0.3.0

func ReadMigration(r io.Reader) (*Migration, error)

ReadMigration reads a migration from an io.Reader, like a file.

func (*Migration) ContainsRawSQLOperation added in v0.7.0

func (m *Migration) ContainsRawSQLOperation() bool

ContainsRawSQLOperation returns true if the migration contains a raw SQL operation

func (*Migration) UpdateVirtualSchema added in v0.9.0

func (m *Migration) UpdateVirtualSchema(ctx context.Context, s *schema.Schema) error

UpdateVirtualSchema updates the in-memory schema representation with the changes made by the migration. No changes are made to the physical database.

func (*Migration) Validate

func (m *Migration) Validate(ctx context.Context, s *schema.Schema) error

Validate will check that the migration can be applied to the given schema returns a descriptive error if the migration is invalid

type MultiColumnConstraintsNotSupportedError added in v0.8.0

type MultiColumnConstraintsNotSupportedError struct {
	Table      string
	Constraint string
}

func (MultiColumnConstraintsNotSupportedError) Error added in v0.8.0

type MultiColumnDownSQL added in v0.8.0

type MultiColumnDownSQL map[string]string

Map of column names to down SQL expressions

type MultiColumnUpSQL added in v0.8.0

type MultiColumnUpSQL map[string]string

Map of column names to up SQL expressions

type OpAddColumn

type OpAddColumn struct {
	// Column to add
	Column Column `json:"column"`

	// Name of the table
	Table string `json:"table"`

	// SQL expression for up migration
	Up string `json:"up,omitempty"`
}

Add column operation

func (*OpAddColumn) Complete

func (o *OpAddColumn) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpAddColumn) Rollback

func (o *OpAddColumn) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpAddColumn) Start

func (o *OpAddColumn) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpAddColumn) Validate

func (o *OpAddColumn) Validate(ctx context.Context, s *schema.Schema) error

type OpAlterColumn

type OpAlterColumn struct {
	// Add check constraint to the column
	Check *CheckConstraint `json:"check,omitempty"`

	// Name of the column
	Column string `json:"column"`

	// New comment on the column
	Comment nullable.Nullable[string] `json:"comment,omitempty"`

	// Default value of the column. Setting to null will drop the default if it was
	// set previously.
	Default nullable.Nullable[string] `json:"default,omitempty"`

	// SQL expression for down migration
	Down string `json:"down"`

	// Indicates if the column is nullable (for add/remove not null constraint
	// operation)
	Nullable *bool `json:"nullable,omitempty"`

	// Add foreign key constraint to the column
	References *ForeignKeyReference `json:"references,omitempty"`

	// Name of the table
	Table string `json:"table"`

	// New type of the column (for change type operation)
	Type *string `json:"type,omitempty"`

	// Add unique constraint to the column
	Unique *UniqueConstraint `json:"unique,omitempty"`

	// SQL expression for up migration
	Up string `json:"up"`
}

Alter column operation

func (*OpAlterColumn) Complete

func (o *OpAlterColumn) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpAlterColumn) Rollback

func (o *OpAlterColumn) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpAlterColumn) Start

func (o *OpAlterColumn) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpAlterColumn) Validate

func (o *OpAlterColumn) Validate(ctx context.Context, s *schema.Schema) error

type OpChangeType

type OpChangeType struct {
	Table  string `json:"table"`
	Column string `json:"column"`
	Type   string `json:"type"`
	Up     string `json:"up"`
	Down   string `json:"down"`
}

func (*OpChangeType) Complete

func (o *OpChangeType) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpChangeType) Rollback

func (o *OpChangeType) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpChangeType) Start

func (o *OpChangeType) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpChangeType) Validate

func (o *OpChangeType) Validate(ctx context.Context, s *schema.Schema) error

type OpCreateConstraint added in v0.8.0

type OpCreateConstraint struct {
	// Check constraint expression
	Check *string `json:"check,omitempty"`

	// Columns to add constraint to
	Columns []string `json:"columns,omitempty"`

	// SQL expressions for down migrations
	Down MultiColumnDownSQL `json:"down"`

	// Name of the constraint
	Name string `json:"name"`

	// Do not propagate constraint to child tables
	NoInherit bool `json:"no_inherit,omitempty"`

	// Reference to the foreign key
	References *TableForeignKeyReference `json:"references,omitempty"`

	// Name of the table
	Table string `json:"table"`

	// Type of the constraint
	Type OpCreateConstraintType `json:"type"`

	// SQL expressions for up migrations
	Up MultiColumnUpSQL `json:"up"`
}

Add constraint to table operation

func (*OpCreateConstraint) Complete added in v0.8.0

func (o *OpCreateConstraint) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpCreateConstraint) Rollback added in v0.8.0

func (o *OpCreateConstraint) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpCreateConstraint) Start added in v0.8.0

func (o *OpCreateConstraint) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpCreateConstraint) Validate added in v0.8.0

func (o *OpCreateConstraint) Validate(ctx context.Context, s *schema.Schema) error

type OpCreateConstraintType added in v0.8.0

type OpCreateConstraintType string
const OpCreateConstraintTypeCheck OpCreateConstraintType = "check"
const OpCreateConstraintTypeForeignKey OpCreateConstraintType = "foreign_key"
const OpCreateConstraintTypeUnique OpCreateConstraintType = "unique"

type OpCreateIndex

type OpCreateIndex struct {
	// Names and settings of columns on which to define the index
	Columns OpCreateIndexColumns `json:"columns"`

	// Index method to use for the index: btree, hash, gist, spgist, gin, brin
	Method OpCreateIndexMethod `json:"method,omitempty"`

	// Index name
	Name string `json:"name"`

	// Conditional expression for defining a partial index
	Predicate string `json:"predicate,omitempty"`

	// Storage parameters for the index
	StorageParameters string `json:"storage_parameters,omitempty"`

	// Name of table on which to define the index
	Table string `json:"table"`

	// Indicates if the index is unique
	Unique bool `json:"unique,omitempty"`
}

Create index operation

func (*OpCreateIndex) Complete

func (o *OpCreateIndex) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpCreateIndex) Rollback

func (o *OpCreateIndex) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpCreateIndex) Start

func (o *OpCreateIndex) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpCreateIndex) Validate

func (o *OpCreateIndex) Validate(ctx context.Context, s *schema.Schema) error

type OpCreateIndexColumns added in v0.10.0

type OpCreateIndexColumns map[string]IndexField

Names and settings of columns on which to define the index

type OpCreateIndexMethod added in v0.8.0

type OpCreateIndexMethod string
const OpCreateIndexMethodBrin OpCreateIndexMethod = "brin"
const OpCreateIndexMethodBtree OpCreateIndexMethod = "btree"
const OpCreateIndexMethodGin OpCreateIndexMethod = "gin"
const OpCreateIndexMethodGist OpCreateIndexMethod = "gist"
const OpCreateIndexMethodHash OpCreateIndexMethod = "hash"
const OpCreateIndexMethodSpgist OpCreateIndexMethod = "spgist"

func ParseCreateIndexMethod added in v0.9.0

func ParseCreateIndexMethod(method string) (OpCreateIndexMethod, error)

ParseCreateIndexMethod parsed index methods into OpCreateIndexMethod

type OpCreateTable

type OpCreateTable struct {
	// Columns corresponds to the JSON schema field "columns".
	Columns []Column `json:"columns"`

	// Postgres comment for the table
	Comment *string `json:"comment,omitempty"`

	// Constraints corresponds to the JSON schema field "constraints".
	Constraints []Constraint `json:"constraints,omitempty"`

	// Name of the table
	Name string `json:"name"`
}

Create table operation

func (*OpCreateTable) Complete

func (o *OpCreateTable) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpCreateTable) Rollback

func (o *OpCreateTable) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpCreateTable) Start

func (o *OpCreateTable) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpCreateTable) Validate

func (o *OpCreateTable) Validate(ctx context.Context, s *schema.Schema) error

type OpDropColumn

type OpDropColumn struct {
	// Name of the column
	Column string `json:"column"`

	// SQL expression for down migration
	Down string `json:"down,omitempty"`

	// Name of the table
	Table string `json:"table"`
}

Drop column operation

func (*OpDropColumn) Complete

func (o *OpDropColumn) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropColumn) Rollback

func (o *OpDropColumn) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropColumn) Start

func (o *OpDropColumn) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpDropColumn) Validate

func (o *OpDropColumn) Validate(ctx context.Context, s *schema.Schema) error

type OpDropConstraint

type OpDropConstraint struct {
	// SQL expression for down migration
	Down string `json:"down"`

	// Name of the constraint
	Name string `json:"name"`

	// Name of the table
	Table string `json:"table"`

	// SQL expression for up migration
	Up string `json:"up"`
}

Drop constraint operation

func (*OpDropConstraint) Complete

func (o *OpDropConstraint) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropConstraint) Rollback

func (o *OpDropConstraint) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropConstraint) Start

func (o *OpDropConstraint) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpDropConstraint) Validate

func (o *OpDropConstraint) Validate(ctx context.Context, s *schema.Schema) error

type OpDropIndex

type OpDropIndex struct {
	// Index name
	Name string `json:"name"`
}

Drop index operation

func (*OpDropIndex) Complete

func (o *OpDropIndex) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropIndex) Rollback

func (o *OpDropIndex) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropIndex) Start

func (o *OpDropIndex) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpDropIndex) Validate

func (o *OpDropIndex) Validate(ctx context.Context, s *schema.Schema) error

type OpDropMultiColumnConstraint added in v0.8.0

type OpDropMultiColumnConstraint struct {
	// SQL expressions for down migrations
	Down MultiColumnDownSQL `json:"down"`

	// Name of the constraint
	Name string `json:"name"`

	// Name of the table
	Table string `json:"table"`

	// SQL expressions for up migrations
	Up MultiColumnUpSQL `json:"up,omitempty"`
}

Drop multi-column constraint operation

func (*OpDropMultiColumnConstraint) Complete added in v0.8.0

func (o *OpDropMultiColumnConstraint) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropMultiColumnConstraint) Rollback added in v0.8.0

func (o *OpDropMultiColumnConstraint) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropMultiColumnConstraint) Start added in v0.8.0

func (o *OpDropMultiColumnConstraint) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpDropMultiColumnConstraint) Validate added in v0.8.0

type OpDropNotNull added in v0.5.0

type OpDropNotNull struct {
	Table  string `json:"table"`
	Column string `json:"column"`
	Up     string `json:"up"`
	Down   string `json:"down"`
}

OpDropNotNull is an operation that drops the NOT NULL constraint from a column

func (*OpDropNotNull) Complete added in v0.5.0

func (o *OpDropNotNull) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropNotNull) Rollback added in v0.5.0

func (o *OpDropNotNull) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropNotNull) Start added in v0.5.0

func (o *OpDropNotNull) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpDropNotNull) Validate added in v0.5.0

func (o *OpDropNotNull) Validate(ctx context.Context, s *schema.Schema) error

type OpDropTable

type OpDropTable struct {
	// Name of the table
	Name string `json:"name"`
}

Drop table operation

func (*OpDropTable) Complete

func (o *OpDropTable) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropTable) Rollback

func (o *OpDropTable) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpDropTable) Start

func (o *OpDropTable) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpDropTable) Validate

func (o *OpDropTable) Validate(ctx context.Context, s *schema.Schema) error

type OpName

type OpName string
const (
	OpNameCreateTable               OpName = "create_table"
	OpNameRenameTable               OpName = "rename_table"
	OpNameRenameColumn              OpName = "rename_column"
	OpNameDropTable                 OpName = "drop_table"
	OpNameAddColumn                 OpName = "add_column"
	OpNameDropColumn                OpName = "drop_column"
	OpNameAlterColumn               OpName = "alter_column"
	OpNameCreateIndex               OpName = "create_index"
	OpNameDropIndex                 OpName = "drop_index"
	OpNameRenameConstraint          OpName = "rename_constraint"
	OpNameDropConstraint            OpName = "drop_constraint"
	OpNameSetReplicaIdentity        OpName = "set_replica_identity"
	OpNameDropMultiColumnConstraint OpName = "drop_multicolumn_constraint"
	OpRawSQLName                    OpName = "sql"
	OpCreateConstraintName          OpName = "create_constraint"
)

func OperationName

func OperationName(op Operation) OpName

OperationName returns the name of the operation.

type OpRawSQL

type OpRawSQL struct {
	// SQL expression for down migration
	Down string `json:"down,omitempty"`

	// SQL expression will run on complete step (rather than on start)
	OnComplete bool `json:"onComplete,omitempty"`

	// SQL expression for up migration
	Up string `json:"up"`
}

Raw SQL operation

func (*OpRawSQL) Complete

func (o *OpRawSQL) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRawSQL) IsIsolated

func (o *OpRawSQL) IsIsolated() bool

IsIsolated returns true if the operation is isolated and should be run with other operations.

func (*OpRawSQL) RequiresSchemaRefresh

func (o *OpRawSQL) RequiresSchemaRefresh()

func (*OpRawSQL) Rollback

func (o *OpRawSQL) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRawSQL) Start

func (o *OpRawSQL) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpRawSQL) Validate

func (o *OpRawSQL) Validate(ctx context.Context, s *schema.Schema) error

type OpRenameColumn

type OpRenameColumn struct {
	// Old name of the column
	From string `json:"from"`

	// Name of the table
	Table string `json:"table"`

	// New name of the column
	To string `json:"to"`
}

Rename column operation

func (*OpRenameColumn) Complete

func (o *OpRenameColumn) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRenameColumn) Rollback

func (o *OpRenameColumn) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRenameColumn) Start

func (o *OpRenameColumn) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpRenameColumn) Validate

func (o *OpRenameColumn) Validate(ctx context.Context, s *schema.Schema) error

type OpRenameConstraint added in v0.6.0

type OpRenameConstraint struct {
	// Name of the constraint
	From string `json:"from"`

	// Name of the table
	Table string `json:"table"`

	// New name of the constraint
	To string `json:"to"`
}

Rename constraint operation

func (*OpRenameConstraint) Complete added in v0.6.0

func (o *OpRenameConstraint) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRenameConstraint) Rollback added in v0.6.0

func (o *OpRenameConstraint) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRenameConstraint) Start added in v0.6.0

func (o *OpRenameConstraint) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpRenameConstraint) Validate added in v0.6.0

func (o *OpRenameConstraint) Validate(ctx context.Context, s *schema.Schema) error

type OpRenameTable

type OpRenameTable struct {
	// Old name of the table
	From string `json:"from"`

	// New name of the table
	To string `json:"to"`
}

Rename table operation

func (*OpRenameTable) Complete

func (o *OpRenameTable) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRenameTable) Rollback

func (o *OpRenameTable) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpRenameTable) Start

func (o *OpRenameTable) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpRenameTable) Validate

func (o *OpRenameTable) Validate(ctx context.Context, s *schema.Schema) error

type OpSetCheckConstraint

type OpSetCheckConstraint struct {
	Table  string          `json:"table"`
	Column string          `json:"column"`
	Check  CheckConstraint `json:"check"`
	Up     string          `json:"up"`
	Down   string          `json:"down"`
}

func (*OpSetCheckConstraint) Complete

func (o *OpSetCheckConstraint) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetCheckConstraint) Rollback

func (o *OpSetCheckConstraint) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetCheckConstraint) Start

func (o *OpSetCheckConstraint) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetCheckConstraint) Validate

func (o *OpSetCheckConstraint) Validate(ctx context.Context, s *schema.Schema) error

type OpSetComment added in v0.6.0

type OpSetComment struct {
	Table   string  `json:"table"`
	Column  string  `json:"column"`
	Comment *string `json:"comment"`
	Up      string  `json:"up"`
	Down    string  `json:"down"`
}

OpSetComment is a operation that sets a comment on a object.

func (*OpSetComment) Complete added in v0.6.0

func (o *OpSetComment) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetComment) Rollback added in v0.6.0

func (o *OpSetComment) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetComment) Start added in v0.6.0

func (o *OpSetComment) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetComment) Validate added in v0.6.0

func (o *OpSetComment) Validate(ctx context.Context, s *schema.Schema) error

type OpSetDefault added in v0.6.0

type OpSetDefault struct {
	Table   string  `json:"table"`
	Column  string  `json:"column"`
	Default *string `json:"default"`
	Up      string  `json:"up"`
	Down    string  `json:"down"`
}

func (*OpSetDefault) Complete added in v0.6.0

func (o *OpSetDefault) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetDefault) Rollback added in v0.6.0

func (o *OpSetDefault) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetDefault) Start added in v0.6.0

func (o *OpSetDefault) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetDefault) Validate added in v0.6.0

func (o *OpSetDefault) Validate(ctx context.Context, s *schema.Schema) error

type OpSetForeignKey

type OpSetForeignKey struct {
	Table      string              `json:"table"`
	Column     string              `json:"column"`
	References ForeignKeyReference `json:"references"`
	Up         string              `json:"up"`
	Down       string              `json:"down"`
}

func (*OpSetForeignKey) Complete

func (o *OpSetForeignKey) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetForeignKey) Rollback

func (o *OpSetForeignKey) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetForeignKey) Start

func (o *OpSetForeignKey) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetForeignKey) Validate

func (o *OpSetForeignKey) Validate(ctx context.Context, s *schema.Schema) error

type OpSetNotNull

type OpSetNotNull struct {
	Table  string `json:"table"`
	Column string `json:"column"`
	Up     string `json:"up"`
	Down   string `json:"down"`
}

func (*OpSetNotNull) Complete

func (o *OpSetNotNull) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetNotNull) Rollback

func (o *OpSetNotNull) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetNotNull) Start

func (o *OpSetNotNull) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetNotNull) Validate

func (o *OpSetNotNull) Validate(ctx context.Context, s *schema.Schema) error

type OpSetReplicaIdentity added in v0.4.0

type OpSetReplicaIdentity struct {
	// Replica identity to set
	Identity ReplicaIdentity `json:"identity"`

	// Name of the table
	Table string `json:"table"`
}

Set replica identity operation

func (*OpSetReplicaIdentity) Complete added in v0.4.0

func (o *OpSetReplicaIdentity) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetReplicaIdentity) Rollback added in v0.4.0

func (o *OpSetReplicaIdentity) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetReplicaIdentity) Start added in v0.4.0

func (o *OpSetReplicaIdentity) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetReplicaIdentity) Validate added in v0.4.0

func (o *OpSetReplicaIdentity) Validate(ctx context.Context, s *schema.Schema) error

type OpSetUnique

type OpSetUnique struct {
	Name   string `json:"name"`
	Table  string `json:"table"`
	Column string `json:"column"`
	Up     string `json:"up"`
	Down   string `json:"down"`
}

func (*OpSetUnique) Complete

func (o *OpSetUnique) Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetUnique) Rollback

func (o *OpSetUnique) Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

func (*OpSetUnique) Start

func (o *OpSetUnique) Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

func (*OpSetUnique) Validate

func (o *OpSetUnique) Validate(ctx context.Context, s *schema.Schema) error

type Operation

type Operation interface {
	// Start will apply the required changes to enable supporting the new schema
	// version in the database (through a view)
	// update the given views to expose the new schema version
	// Returns the table that requires backfilling, if any.
	Start(ctx context.Context, conn db.DB, latestSchema string, s *schema.Schema) (*schema.Table, error)

	// Complete will update the database schema to match the current version
	// after calling Start.
	// This method should be called once the previous version is no longer used.
	Complete(ctx context.Context, conn db.DB, s *schema.Schema) error

	// Rollback will revert the changes made by Start. It is not possible to
	// rollback a completed migration.
	Rollback(ctx context.Context, conn db.DB, s *schema.Schema) error

	// Validate returns a descriptive error if the operation cannot be applied to the given schema.
	Validate(ctx context.Context, s *schema.Schema) error
}

Operation is an operation that can be applied to a schema

type Operations

type Operations []Operation

func (Operations) MarshalJSON

func (v Operations) MarshalJSON() ([]byte, error)

MarshalJSON serializes the list of operations into a JSON array.

func (*Operations) UnmarshalJSON

func (v *Operations) UnmarshalJSON(data []byte) error

UnmarshalJSON deserializes the list of operations from a JSON array.

type PgRollMigration added in v0.4.2

type PgRollMigration struct {
	// Name of the migration
	Name *string `json:"name,omitempty"`

	// Operations corresponds to the JSON schema field "operations".
	Operations PgRollOperations `json:"operations"`
}

PgRoll migration definition

type PgRollOperation added in v0.5.0

type PgRollOperation interface{}

type PgRollOperations added in v0.5.0

type PgRollOperations []interface{}

type PrimaryKeysAreAlreadySetError added in v0.9.0

type PrimaryKeysAreAlreadySetError struct {
	Table string
}

func (PrimaryKeysAreAlreadySetError) Error added in v0.9.0

type ReplicaIdentity added in v0.4.0

type ReplicaIdentity struct {
	// Name of the index to use as replica identity
	Index string `json:"index"`

	// Type of replica identity
	Type string `json:"type"`
}

Replica identity definition

type RequiresSchemaRefreshOperation

type RequiresSchemaRefreshOperation interface {
	// RequiresSchemaRefresh defines if this operation requires the resulting schema to be refreshed when
	// executed on start.
	RequiresSchemaRefresh()
}

RequiresSchemaRefreshOperation is an operation that requires the resulting schema to be refreshed.

type TableAlreadyExistsError

type TableAlreadyExistsError struct {
	Name string
}

func (TableAlreadyExistsError) Error

func (e TableAlreadyExistsError) Error() string

type TableDoesNotExistError

type TableDoesNotExistError struct {
	Name string
}

func (TableDoesNotExistError) Error

func (e TableDoesNotExistError) Error() string

type TableForeignKeyReference added in v0.9.0

type TableForeignKeyReference struct {
	// Columns to reference
	Columns []string `json:"columns"`

	// Match type of the foreign key constraint
	MatchType ForeignKeyMatchType `json:"match_type,omitempty"`

	// On delete behavior of the foreign key constraint
	OnDelete ForeignKeyAction `json:"on_delete,omitempty"`

	// Columns to set to null or to default on delete
	OnDeleteSetColumns []string `json:"on_delete_set_columns,omitempty"`

	// On update behavior of the foreign key constraint
	OnUpdate ForeignKeyAction `json:"on_update,omitempty"`

	// Name of the table
	Table string `json:"table"`
}

Table level foreign key reference definition

type TriggerDirection

type TriggerDirection string
const (
	TriggerDirectionUp   TriggerDirection = "up"
	TriggerDirectionDown TriggerDirection = "down"
)

type UnexpectedOnDeleteSetColumnError added in v0.9.0

type UnexpectedOnDeleteSetColumnError struct {
	Name string
}

func (UnexpectedOnDeleteSetColumnError) Error added in v0.9.0

type UniqueConstraint

type UniqueConstraint struct {
	// Name of unique constraint
	Name string `json:"name"`
}

Unique constraint definition

func (*UniqueConstraint) Validate

func (c *UniqueConstraint) Validate() error

Validate validates the UniqueConstraint

type UpSQLMustBeColumnDefaultError added in v0.10.0

type UpSQLMustBeColumnDefaultError struct {
	Column string
}

func (UpSQLMustBeColumnDefaultError) Error added in v0.10.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL