Documentation
¶
Index ¶
- func Type__bool(f attrs.Field) string
- func Type__datetime(f attrs.Field) string
- func Type__float(f attrs.Field) string
- func Type__int(f attrs.Field) string
- func Type__string(f attrs.Field) string
- type PostgresSchemaEditor
- func (m *PostgresSchemaEditor) AddField(table migrator.Table, col migrator.Column) error
- func (m *PostgresSchemaEditor) AddIndex(table migrator.Table, index migrator.Index) error
- func (m *PostgresSchemaEditor) AlterField(table migrator.Table, oldCol migrator.Column, newCol migrator.Column) error
- func (m *PostgresSchemaEditor) CreateTable(table migrator.Table) error
- func (m *PostgresSchemaEditor) DropIndex(table migrator.Table, index migrator.Index) error
- func (m *PostgresSchemaEditor) DropTable(table migrator.Table) error
- func (m *PostgresSchemaEditor) Execute(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (m *PostgresSchemaEditor) HasMigration(appName string, modelName string, migrationName string) (bool, error)
- func (m *PostgresSchemaEditor) RemoveField(table migrator.Table, col migrator.Column) error
- func (m *PostgresSchemaEditor) RemoveMigration(appName string, modelName string, migrationName string) error
- func (m *PostgresSchemaEditor) RenameIndex(table migrator.Table, oldName string, newName string) error
- func (m *PostgresSchemaEditor) RenameTable(table migrator.Table, newName string) error
- func (m *PostgresSchemaEditor) Setup() error
- func (m *PostgresSchemaEditor) StoreMigration(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__bool ¶
func Type__datetime ¶
func Type__float ¶
func Type__string ¶
Types ¶
type PostgresSchemaEditor ¶
type PostgresSchemaEditor struct {
// contains filtered or unexported fields
}
func NewPostgresSchemaEditor ¶
func NewPostgresSchemaEditor(db *sql.DB) *PostgresSchemaEditor
func (*PostgresSchemaEditor) AlterField ¶
func (*PostgresSchemaEditor) CreateTable ¶
func (m *PostgresSchemaEditor) CreateTable(table migrator.Table) error
func (*PostgresSchemaEditor) DropTable ¶
func (m *PostgresSchemaEditor) DropTable(table migrator.Table) error
func (*PostgresSchemaEditor) HasMigration ¶
func (*PostgresSchemaEditor) RemoveField ¶
func (*PostgresSchemaEditor) RemoveMigration ¶
func (m *PostgresSchemaEditor) RemoveMigration(appName string, modelName string, migrationName string) error
func (*PostgresSchemaEditor) RenameIndex ¶
func (*PostgresSchemaEditor) RenameTable ¶
func (m *PostgresSchemaEditor) RenameTable(table migrator.Table, newName string) error
func (*PostgresSchemaEditor) Setup ¶
func (m *PostgresSchemaEditor) Setup() error
func (*PostgresSchemaEditor) StoreMigration ¶
func (m *PostgresSchemaEditor) StoreMigration(appName string, modelName string, migrationName string) error
func (*PostgresSchemaEditor) WriteColumn ¶
func (m *PostgresSchemaEditor) WriteColumn(w *strings.Builder, col migrator.Column)
Click to show internal directories.
Click to hide internal directories.