Documentation ¶
Index ¶
- func Register(name string, up, down func(*pg.Tx) error)
- func Run(db *pg.DB, cmd string, options ...string) error
- func SetInitialMigration(migrationName string)
- func SetMigrationNameConvention(convention MigrationNameConvention)
- func SetMigrationTableName(tableName string)
- type MigrationNameConvention
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run Runs the specified command with the options they require Note:
init - no options migrate - one option - "" for all migrations in a single batch - "one-by-one" for one migration in a batch mode rollback - no options create - two options - name - name of the migration (must be first) - template - string that contains the go code to use as a template. see migrationTemplate
func SetInitialMigration ¶
func SetInitialMigration(migrationName string)
func SetMigrationNameConvention ¶
func SetMigrationNameConvention(convention MigrationNameConvention)
func SetMigrationTableName ¶
func SetMigrationTableName(tableName string)
Types ¶
type MigrationNameConvention ¶
type MigrationNameConvention string
const ( CamelCase MigrationNameConvention = "camelCase" SnakeCase MigrationNameConvention = "snakeCase" )
Click to show internal directories.
Click to hide internal directories.