-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
E-easycliConcerns `sqlx-cli`Concerns `sqlx-cli`migrationsProposals or bugs involving migrationsProposals or bugs involving migrationsproposal
Description
As far as my understanding goes, all migration scripts are currently run within a SQL transaction.
This creates issue in Postgres when trying to change a type (e.g. add a variant to an enum):
error: while executing migrations:
error returned from database:
ALTER TYPE ... ADD cannot run inside a transaction block
I'd say there are two ways forward:
- make it the user responsibility to wrap its migration query in a transaction, if it makes sense;
- add a way to "disable" transaction wrapping to the CLI.
What do you think?
dani-garcia, alexchilcott, markhildreth-deepgram, HartS, kujeger and 1 more
Metadata
Metadata
Assignees
Labels
E-easycliConcerns `sqlx-cli`Concerns `sqlx-cli`migrationsProposals or bugs involving migrationsProposals or bugs involving migrationsproposal