Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't extract the default column value twice
The column default setting, not its value, should be used when creating a new PostgreSQLColumn because PostgreSQLColumn#initialize calls extract_value_from_default. When called on an already extracted default value, the result is a nil value being used instead of the actual default value defined in the DDL, thus leading to INSERT errors when the column has a not-NULL constraint and no value is specifed when the record is created.
- Loading branch information
Showing
5 changed files
with
57 additions
and
9 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--colour | ||
--format profile | ||
--timeout 20 | ||
--colour | ||
--format profile | ||
--timeout 20 | ||
--diff |
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