dialect/sql/schema: support setting schema name for migration (#4327)

This commit is contained in:
Ariel Mashraki
2025-02-12 18:18:03 +02:00
committed by GitHub
parent da9f897368
commit c5db03c30e
11 changed files with 115 additions and 31 deletions

View File

@@ -57,6 +57,14 @@ func WithErrNoPlan(b bool) MigrateOption {
}
}
// WithSchemaName sets the database schema for the migration.
// If not set, the CURRENT_SCHEMA() is used.
func WithSchemaName(ns string) MigrateOption {
return func(a *Atlas) {
a.schema = ns
}
}
// WithDropColumn sets the columns dropping option to the migration.
// Defaults to false.
func WithDropColumn(b bool) MigrateOption {