-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functions that let you do pre- and post- auto-migration hooks that run in the same transaction #50
base: develop
Are you sure you want to change the base?
Commits on Aug 3, 2022
-
Overhall Constraint/Sequence naming
Table constraints are now keyed according to what they constrain instead of all of their attributes, including names. No "type of all constraints, one at a time". separate types for PRIMARY KEY, UNIQUE, and FOREIGN KEY constraints; all split into the "match" and "extra" parts. All such constraints are now collected into a record of maps, with the key being the match part of that constraint type and all other data in the value of the map. In most places for constraint/sequence, the name is wrapped in a Maybe, to instruct beam-automigrate to allow postgres to choose the name, or use the name from the db for existing, matching entity. Sequences are now (optionally) owned by "SERIAL" columns using the built in "OWNED BY" syntax in postgres. A serial column can have an optional name; beam-migrate will learn the name chosen by postgres at startup when it already exists. string parsing of DEFAULT constraints are now handled with a self contained attoparsec based parser in `D.B.A.Parser`. It's only parsing the fragment of sql that beam-automigrate needs to understand to do it's job; but is a good start for gradually improving its precision as the need arises (future check-constraint support, as an example) More liberal use of `"lens"` library to make some code a little easier to understand. Fixes dodgy catalog sql query for retrieving foreign key constraints. how did this ever work?
Configuration menu - View commit details
-
Copy full SHA for 46d29e6 - Browse repository at this point
Copy the full SHA 46d29e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d62243 - Browse repository at this point
Copy the full SHA 3d62243View commit details -
Remove pgSerialTyColumnType, as it had been rendered pointless almost…
… as soon as it was added
Configuration menu - View commit details
-
Copy full SHA for 369bcfd - Browse repository at this point
Copy the full SHA 369bcfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1cb1624 - Browse repository at this point
Copy the full SHA 1cb1624View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2845b09 - Browse repository at this point
Copy the full SHA 2845b09View commit details -
Fix missing space resulting in incorrect sql
Before ("NULLDEFAULT"): CREATE TABLE cities (capital BOOL NOT NULLDEFAULT 'false'::boolean, city VARCHAR NOT NULL, location VARCHAR NOT NULL); After: CREATE TABLE cities (capital BOOL NOT NULL DEFAULT 'false'::boolean, city VARCHAR NOT NULL , location VARCHAR NOT NULL );
Configuration menu - View commit details
-
Copy full SHA for 9ef494d - Browse repository at this point
Copy the full SHA 9ef494dView commit details
Commits on Aug 11, 2022
-
Previous commits introduce a bug where no migration is assumed if both versions of a table have a primary key at all, This commit fixes the case when both versions have a PK but with different columns. This also exposed a related bug that primary key migrations must be handled differently to unique key migrations. a table can have only one PK, which has further affects on when foreign key constraints must be added or removed.
Configuration menu - View commit details
-
Copy full SHA for 20f77cd - Browse repository at this point
Copy the full SHA 20f77cdView commit details
Commits on Sep 27, 2022
-
Fix the priority of SequenceRenamed
Otherwise, SequenceSetOwner will be executed on the new name before it has been renamed
Configuration menu - View commit details
-
Copy full SHA for c890b27 - Browse repository at this point
Copy the full SHA c890b27View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a1b978 - Browse repository at this point
Copy the full SHA 4a1b978View commit details -
Configuration menu - View commit details
-
Copy full SHA for 99afb98 - Browse repository at this point
Copy the full SHA 99afb98View commit details
Commits on Jan 25, 2023
-
Add ways to run the migration that allow additional hooks to run insi…
…de the same transaction
Configuration menu - View commit details
-
Copy full SHA for 4bd47e7 - Browse repository at this point
Copy the full SHA 4bd47e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0f357c - Browse repository at this point
Copy the full SHA a0f357cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25dc22d - Browse repository at this point
Copy the full SHA 25dc22dView commit details
Commits on Feb 21, 2023
-
Add "dry run" migration runners
Namely runMigrationWithEditUpdateAndHooksDryRun and tryRunMigrationsWithEditUpdateAndHooksDryRun
Configuration menu - View commit details
-
Copy full SHA for 06ddc24 - Browse repository at this point
Copy the full SHA 06ddc24View commit details
Commits on Mar 24, 2023
-
Add
editUpdate
argument to the "tryRunMigrationsWithEditUpdate"-fun……ctions As the function name implies, the functions that start with "tryRunMigrationsWithEditUpdate" should take an "editUpdate" argument -- just like their "runMigrationWithEditUpdate"-counterparts.
Configuration menu - View commit details
-
Copy full SHA for d903167 - Browse repository at this point
Copy the full SHA d903167View commit details
Commits on May 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 92be676 - Browse repository at this point
Copy the full SHA 92be676View commit details
Commits on Jul 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b88a91a - Browse repository at this point
Copy the full SHA b88a91aView commit details -
Merge branch 'cg/pre-post-hooks' of github.com:obsidiansystems/beam-a…
…utomigrate into cg/pre-post-hooks
Configuration menu - View commit details
-
Copy full SHA for 82cec77 - Browse repository at this point
Copy the full SHA 82cec77View commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 614c0dc - Browse repository at this point
Copy the full SHA 614c0dcView commit details