Skip to content

etl: make all migrations idempotent#196

Closed
raymondjacobson wants to merge 1 commit intorj/etl-parity-testfrom
rj/etl-idempotent-migrations
Closed

etl: make all migrations idempotent#196
raymondjacobson wants to merge 1 commit intorj/etl-parity-testfrom
rj/etl-idempotent-migrations

Conversation

@raymondjacobson
Copy link
Copy Markdown
Contributor

  • Wrap etl_proof_status enum creation in DO/EXCEPTION block
  • Add DROP TRIGGER IF EXISTS before CREATE TRIGGER
  • Add DROP MATERIALIZED VIEW IF EXISTS before CREATE MATERIALIZED VIEW
  • Name materialized view indexes for IF NOT EXISTS support

This ensures migrations can run safely against databases where
these objects already exist (e.g., production clones).

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

- Wrap etl_proof_status enum creation in DO/EXCEPTION block
- Add DROP TRIGGER IF EXISTS before CREATE TRIGGER
- Add DROP MATERIALIZED VIEW IF EXISTS before CREATE MATERIALIZED VIEW
- Name materialized view indexes for IF NOT EXISTS support

This ensures migrations can run safely against databases where
these objects already exist (e.g., production clones).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

@raymondjacobson raymondjacobson marked this pull request as ready for review April 3, 2026 21:57
@raymondjacobson
Copy link
Copy Markdown
Contributor Author

Superseded by #200 (squash merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant