migration

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChangePatterns = []string{
	`_(to|from|in)_(\w+)_table$`,
	`_(to|from|in)_(\w+)$`,
}
View Source
var CreatePatterns = []string{
	`^create_(\w+)_table$`,
	`^create_(\w+)$`,
}

Functions

This section is empty.

Types

type DefaultDriver

type DefaultDriver struct {
}

func NewDefaultDriver

func NewDefaultDriver() *DefaultDriver

func (*DefaultDriver) Create

func (r *DefaultDriver) Create(name string) error

type MysqlStubs

type MysqlStubs struct {
}

func (MysqlStubs) CreateDown

func (receiver MysqlStubs) CreateDown() string

CreateDown Create down migration content.

func (MysqlStubs) CreateUp

func (receiver MysqlStubs) CreateUp() string

CreateUp Create up migration content.

func (MysqlStubs) UpdateDown

func (receiver MysqlStubs) UpdateDown() string

UpdateDown Update down migration content.

func (MysqlStubs) UpdateUp

func (receiver MysqlStubs) UpdateUp() string

UpdateUp Update up migration content.

type PostgresqlStubs

type PostgresqlStubs struct {
}

func (PostgresqlStubs) CreateDown

func (receiver PostgresqlStubs) CreateDown() string

CreateDown Create down migration content.

func (PostgresqlStubs) CreateUp

func (receiver PostgresqlStubs) CreateUp() string

CreateUp Create up migration content.

func (PostgresqlStubs) UpdateDown

func (receiver PostgresqlStubs) UpdateDown() string

UpdateDown Update down migration content.

func (PostgresqlStubs) UpdateUp

func (receiver PostgresqlStubs) UpdateUp() string

UpdateUp Update up migration content.

type Schema

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

func NewSchema

func NewSchema(orm contractsorm.Orm) *Schema

func (*Schema) Connection

func (r *Schema) Connection(name string) migration.Schema

func (*Schema) Register

func (r *Schema) Register(migrations []migration.Migration)

func (*Schema) Sql

func (r *Schema) Sql(sql string)

type SqlDriver

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

func NewSqlDriver

func NewSqlDriver(config config.Config) *SqlDriver

func (*SqlDriver) Create

func (r *SqlDriver) Create(name string) error

type SqliteStubs

type SqliteStubs struct {
}

func (SqliteStubs) CreateDown

func (receiver SqliteStubs) CreateDown() string

CreateDown Create down migration content.

func (SqliteStubs) CreateUp

func (receiver SqliteStubs) CreateUp() string

CreateUp Create up migration content.

func (SqliteStubs) UpdateDown

func (receiver SqliteStubs) UpdateDown() string

UpdateDown Update down migration content.

func (SqliteStubs) UpdateUp

func (receiver SqliteStubs) UpdateUp() string

UpdateUp Update up migration content.

type SqlserverStubs

type SqlserverStubs struct {
}

func (SqlserverStubs) CreateDown

func (receiver SqlserverStubs) CreateDown() string

CreateDown Create down migration content.

func (SqlserverStubs) CreateUp

func (receiver SqlserverStubs) CreateUp() string

CreateUp Create up migration content.

func (SqlserverStubs) UpdateDown

func (receiver SqlserverStubs) UpdateDown() string

UpdateDown Update down migration content.

func (SqlserverStubs) UpdateUp

func (receiver SqlserverStubs) UpdateUp() string

UpdateUp Update up migration content.

type Stubs

type Stubs struct {
}

func (Stubs) Create

func (receiver Stubs) Create() string

TODO add the facades.Schema().Create() method

func (Stubs) Empty

func (receiver Stubs) Empty() string

func (Stubs) Update

func (receiver Stubs) Update() string

TODO add the facades.Schema().Table() method

type TableGuesser

type TableGuesser struct {
}

func (TableGuesser) Guess

func (receiver TableGuesser) Guess(migration string) (string, bool)

Guess Attempt to guess the table name and "creation" status of the given migration, return table, create.

Jump to

Keyboard shortcuts

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