Skip to content

Commit

Permalink
Online foreign key support
Browse files Browse the repository at this point in the history
  • Loading branch information
bplunkett-stripe committed Jul 7, 2024
1 parent 8509c7f commit 8611c63
Show file tree
Hide file tree
Showing 7 changed files with 387 additions and 124 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $ pg-schema-diff plan --dsn "postgres://postgres:postgres@localhost:5432/postgre
* The use of postgres native operations for zero-downtime migrations wherever possible:
* Concurrent index builds
* Online index replacement: If some index is changed, the new version will be built before the old version is dropped, preventing a window where no index is backing queries
* Online check constraint builds: Check constraints are added as `INVALID` before being validated, eliminating the need
* Online constraint builds: Constraints (check, foreign key) are added as `INVALID` before being validated, eliminating the need
for a long access-exclusive lock on the table
* Online `NOT NULL` constraint creation using check constraints to eliminate the need for an access-exclusive lock on the table
* Prioritized index builds: Building new indexes is always prioritized over deleting old indexes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ var backCompatAcceptanceTestCases = []acceptanceTestCase{
`,
},
expectedHazardTypes: []diff.MigrationHazardType{
diff.MigrationHazardTypeAcquiresShareRowExclusiveLock,
diff.MigrationHazardTypeDeletesData,
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ var databaseSchemaSourceTestCases = []acceptanceTestCase{
`,
},
expectedHazardTypes: []diff.MigrationHazardType{
diff.MigrationHazardTypeAcquiresShareRowExclusiveLock,
diff.MigrationHazardTypeDeletesData,
},

Expand Down
Loading

0 comments on commit 8611c63

Please sign in to comment.