Documentation ¶
Overview ¶
Package migrations implements database migrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var All []Migration
All is a list of all database migrations.
Functions ¶
Types ¶
type EUIBlocksIndex ¶ added in v3.18.0
type EUIBlocksIndex struct{}
EUIBlocksIndex removes the unique index constraint from `type` field.
func (EUIBlocksIndex) Name ¶ added in v3.18.0
func (EUIBlocksIndex) Name() string
Name implements Migration.
type EntityContacts ¶
type EntityContacts struct{}
EntityContacts sets the contacts of entities to their first collaborator.
type Migration ¶
type Migration interface { // Name returns the name of the migration. Name() string // Apply applies the changes imposed by the migration to the given database (or transaction). Apply(context.Context, *gorm.DB) error // Rollback rolls back the changes imposed by the migration to the given database (or transaction). Rollback(context.Context, *gorm.DB) error }
Migration abstracts away the logic of a migration.
Click to show internal directories.
Click to hide internal directories.