From ebdef1b0e9d33a5ca475ab4c2ec2fb44d11d4595 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Tue, 19 Nov 2024 20:57:37 +0100 Subject: [PATCH] fix: pass correct 'transactional' parameter --- migrate/auto.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrate/auto.go b/migrate/auto.go index ace3e9442..16804cd99 100644 --- a/migrate/auto.go +++ b/migrate/auto.go @@ -217,7 +217,7 @@ func (am *AutoMigrator) Migrate(ctx context.Context, opts ...MigrationOption) (* // CreateSQLMigration writes required changes to a new migration file. // Use migrate.Migrator to apply the generated migrations. func (am *AutoMigrator) CreateSQLMigrations(ctx context.Context) ([]*MigrationFile, error) { - _, files, err := am.createSQLMigrations(ctx, true) + _, files, err := am.createSQLMigrations(ctx, false) if err == errNothingToMigrate { return files, nil } @@ -227,7 +227,7 @@ func (am *AutoMigrator) CreateSQLMigrations(ctx context.Context) ([]*MigrationFi // CreateTxSQLMigration writes required changes to a new migration file making sure they will be executed // in a transaction when applied. Use migrate.Migrator to apply the generated migrations. func (am *AutoMigrator) CreateTxSQLMigrations(ctx context.Context) ([]*MigrationFile, error) { - _, files, err := am.createSQLMigrations(ctx, false) + _, files, err := am.createSQLMigrations(ctx, true) if err == errNothingToMigrate { return files, nil }