Skip to content

Allow to run migration without transaction #64

@smacker

Description

@smacker

We have migration with CREATE INDEX CONCURRENTLY. It can't be done in transaction.
Will you be welcome for pull request similar to this commit? smacker@a56fc24

Migration example:

-- +goose DisableTransaction

-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied

-- IF NOT EXISTS allows to run queries manually
-- CONCURRENTLY doesn't lock table, so it's safe to run on production without downtime
CREATE INDEX CONCURRENTLY
IF NOT EXISTS journey_last_miles_tracking_number_index
ON journey_last_miles (tracking_number);

-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back

DROP INDEX journey_last_miles_tracking_number_index;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions