Documentation
¶
Index ¶
- func Type__blob(c *migrator.Column) string
- func Type__bool(c *migrator.Column) string
- func Type__char(c *migrator.Column) string
- func Type__datetime(c *migrator.Column) string
- func Type__decimal(c *migrator.Column) string
- func Type__float(c *migrator.Column) string
- func Type__int(c *migrator.Column) string
- func Type__localtime(c *migrator.Column) string
- func Type__string(c *migrator.Column) string
- func Type__timestamp(c *migrator.Column) string
- func Type__ulid(c *migrator.Column) string
- func Type__uuid(c *migrator.Column) string
- type PostgresSchemaEditor
- func (m *PostgresSchemaEditor) AddField(ctx context.Context, table migrator.Table, col migrator.Column) error
- func (m *PostgresSchemaEditor) AddIndex(ctx context.Context, table migrator.Table, index migrator.Index, ...) error
- func (m *PostgresSchemaEditor) AlterField(ctx context.Context, table migrator.Table, oldCol migrator.Column, ...) error
- func (m *PostgresSchemaEditor) CreateTable(ctx context.Context, table migrator.Table, ifNotExists bool) error
- func (m *PostgresSchemaEditor) DropIndex(ctx context.Context, table migrator.Table, index migrator.Index, ifExists bool) error
- func (m *PostgresSchemaEditor) DropTable(ctx context.Context, table migrator.Table, ifExists bool) error
- func (m *PostgresSchemaEditor) Execute(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (m *PostgresSchemaEditor) HasMigration(ctx context.Context, appName string, modelName string, migrationName string) (bool, error)
- func (m *PostgresSchemaEditor) QueryRow(ctx context.Context, query string, args ...any) drivers.SQLRow
- func (m *PostgresSchemaEditor) RemoveField(ctx context.Context, table migrator.Table, col migrator.Column) error
- func (m *PostgresSchemaEditor) RemoveMigration(ctx context.Context, appName string, modelName string, migrationName string) error
- func (m *PostgresSchemaEditor) RenameIndex(ctx context.Context, table migrator.Table, oldName string, newName string) error
- func (m *PostgresSchemaEditor) RenameTable(ctx context.Context, table migrator.Table, newName string) error
- func (m *PostgresSchemaEditor) Setup(ctx context.Context) error
- func (m *PostgresSchemaEditor) StartTransaction(ctx context.Context) (drivers.Transaction, error)
- func (m *PostgresSchemaEditor) StoreMigration(ctx context.Context, appName string, modelName string, migrationName string) error
- func (m *PostgresSchemaEditor) WriteColumn(w *strings.Builder, col migrator.Column)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Type__blob ¶
func Type__bool ¶
func Type__char ¶
func Type__datetime ¶
func Type__decimal ¶
func Type__float ¶
func Type__localtime ¶
func Type__string ¶
func Type__timestamp ¶
func Type__ulid ¶
func Type__uuid ¶
Types ¶
type PostgresSchemaEditor ¶
type PostgresSchemaEditor struct {
// contains filtered or unexported fields
}
func NewPostgresSchemaEditor ¶
func NewPostgresSchemaEditor(db drivers.Database) *PostgresSchemaEditor
func (*PostgresSchemaEditor) AlterField ¶
func (*PostgresSchemaEditor) CreateTable ¶
func (*PostgresSchemaEditor) HasMigration ¶
func (*PostgresSchemaEditor) RemoveField ¶
func (*PostgresSchemaEditor) RemoveMigration ¶
func (*PostgresSchemaEditor) RenameIndex ¶
func (*PostgresSchemaEditor) RenameTable ¶
func (*PostgresSchemaEditor) Setup ¶
func (m *PostgresSchemaEditor) Setup(ctx context.Context) error
func (*PostgresSchemaEditor) StartTransaction ¶
func (m *PostgresSchemaEditor) StartTransaction(ctx context.Context) (drivers.Transaction, error)
func (*PostgresSchemaEditor) StoreMigration ¶
func (*PostgresSchemaEditor) WriteColumn ¶
func (m *PostgresSchemaEditor) WriteColumn(w *strings.Builder, col migrator.Column)
Click to show internal directories.
Click to hide internal directories.