You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you have multiple -- +migrate Up blocks within a single file?
I'm specifically wondering about mixing transactional and non-transactional migrations.
ie,
-- +migrate Up
. . .
-- +migrate Up notransaction
. . .
-- +migrate Up
. . .
-- +migrate Down
. . .
As an example use case, I'd like to:
create some tables within a transaction
concurrently create some indexes (which postgres requires happens outside of a transaction)
use the new indexes to create some constraints (this can again happen within a transaction)
I'm currently looking at creating multiple migration files, but if it's possible to simply put them all in a single file then that seems like a much better solution.
The text was updated successfully, but these errors were encountered:
On Wed, May 31, 2023, 19:08 Timothy Warren ***@***.***> wrote:
Can you have multiple -- +migrate Up blocks within a single file?
I'm specifically wondering about mixing transactional and
non-transactional migrations.
ie,
-- +migrate Up
. . .
-- +migrate Up notransaction
. . .
-- +migrate Up
. . .
-- +migrate Down
. . .
As an example use case, I'd like to:
- create some tables within a transaction
- concurrently create some indexes (which postgres requires happens
outside of a transaction)
- use the new indexes to create some constraints (this can again
happen within a transaction)
I'm currently looking at creating multiple migration files, but if it's
possible to simply put them all in a single file then that seems like a
much better solution.
—
Reply to this email directly, view it on GitHub
<#244>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKPGDY37LNKBJGONGVBM3XI53ITANCNFSM6AAAAAAYVYKKCU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Can you have multiple
-- +migrate Up
blocks within a single file?I'm specifically wondering about mixing transactional and non-transactional migrations.
ie,
As an example use case, I'd like to:
I'm currently looking at creating multiple migration files, but if it's possible to simply put them all in a single file then that seems like a much better solution.
The text was updated successfully, but these errors were encountered: