fix(dsql): allow explicit NULL in ALTER TABLE ADD COLUMN (#8489)

DSQL's statement checker listed NULL among the column constraints that
ALTER TABLE ADD COLUMN refuses, so an explicit nullable marker, which
Laravel's schema builder writes for every nullable column, was rejected
with 0A000. A bare NULL now passes through to PostgreSQL; NOT NULL,
DEFAULT and the other column constraints are still refused.

Closes #8485
This commit is contained in:
Koushik Dutta authored and GitHub committed 2026-11-15 14:43:51 -04:00
1 parent be18211c98
commit 07ef865dfa
3 files changed
+11 -2

No files matched your search

@@ -22,8 +22,7 @@ public final class DsqlStatements {
"pg_try_advisory_xact_lock_shared", "pg_advisory_unlock", "pg_advisory_unlock_shared",
"pg_advisory_unlock_all");
private static final Set<String> COLUMN_CONSTRAINTS = Set.of(
"DEFAULT", "NOT", "NULL", "CHECK", "UNIQUE", "PRIMARY", "REFERENCES", "GENERATED", "CONSTRAINT",
"COLLATE");
"DEFAULT", "NOT", "CHECK", "UNIQUE", "PRIMARY", "REFERENCES", "GENERATED", "CONSTRAINT", "COLLATE");
private static final Set<String> TABLE_CONSTRAINTS = Set.of(
"CONSTRAINT", "PRIMARY", "UNIQUE", "CHECK", "FOREIGN", "EXCLUDE");
private static final String RESERVED_PREFIX = "dsql.";