-
Ryuta Kamizono authored
In PostgreSQL, FOREIGN KEY and CHECK constraints allows the NOT VALID option to ADD table constraint in ALTER TABLE statement. https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-ADD-TABLE-CONSTRAINT Fortunately, foreign keys are not dumped as part of `create_table` so the ALTER TABLE specific options are restored correctly. CHECK constraints are a feature supported by all adapters, but NOT VALID is a PostgreSQL-specific option, so only NOT VALID constraints are dumped as ALTER TABLE statements so as not to affect the behavior of other adapters. Fixes #53732.
Ryuta Kamizono authoredIn PostgreSQL, FOREIGN KEY and CHECK constraints allows the NOT VALID option to ADD table constraint in ALTER TABLE statement. https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-ADD-TABLE-CONSTRAINT Fortunately, foreign keys are not dumped as part of `create_table` so the ALTER TABLE specific options are restored correctly. CHECK constraints are a feature supported by all adapters, but NOT VALID is a PostgreSQL-specific option, so only NOT VALID constraints are dumped as ALTER TABLE statements so as not to affect the behavior of other adapters. Fixes #53732.
Loading