Skip to content

File-level disable for assume_in_transactionΒ #990

@reteps

Description

@reteps

We have our migrations tooling run with assume_in_transaction by default. We use a hand-rolled system with a keyword to bail out of this; specifically a comment at the top of the file:

-- prairielearn:migrations NO TRANSACTION
CREATE INDEX CONCURRENTLY IF NOT EXISTS pt_audit_events_exam_id_idx ON pt_audit_events (exam_id)
WHERE
  exam_id IS NOT NULL;

It would be nice if we could add a comment telling squawk we are not in a transaction, e.g. squawk-transaction on / off.

-- prairielearn:migrations NO TRANSACTION
-- squawk-transaction off
CREATE INDEX CONCURRENTLY IF NOT EXISTS pt_audit_events_exam_id_idx ON pt_audit_events (exam_id)
WHERE
  exam_id IS NOT NULL;

Related: #705

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions