-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql2pgroll: Support set and drop column defaults (#526)
Support translating the following alter table statements into pgroll operations: ```sql ALTER TABLE foo COLUMN bar SET DEFAULT 'foo' ALTER TABLE foo COLUMN bar SET DEFAULT 123 ALTER TABLE foo COLUMN bar SET DEFAULT 123.456 ALTER TABLE foo COLUMN bar SET DEFAULT true ALTER TABLE foo COLUMN bar SET DEFAULT B'0101' ALTER TABLE foo COLUMN bar SET DEFAULT null ALTER TABLE foo COLUMN bar DROP DEFAULT ``` For cases where the default is set to something other than a simple literal, we fall back to raw SQL.
- Loading branch information
Showing
3 changed files
with
143 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters