File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ class DatabaseFeatures(PostgresDatabaseFeatures):
4848 # https://github.com/cockroachdb/cockroach/issues/95068
4949 supports_comments = False
5050
51+ # CockroachDB doesn't support UNIQUE NULLS NOT DISTINCT:
52+ # https://github.com/cockroachdb/cockroach/issues/115836
53+ supports_nulls_distinct_unique_constraints = False
54+
5155 @cached_property
5256 def introspected_field_types (self ):
5357 return {
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ class DatabaseSchemaEditor(PostgresDatabaseSchemaEditor):
1818
1919 # The PostgreSQL backend uses "SET CONSTRAINTS ... IMMEDIATE" after
2020 # creating this foreign key. This isn't supported by CockroachDB.
21- sql_create_column_inline_fk = 'CONSTRAINT %(name)s REFERENCES %(to_table)s(%(to_column)s)%(deferrable)s'
21+ sql_create_column_inline_fk = (
22+ 'CONSTRAINT %(name)s REFERENCES %(to_table)s(%(to_column)s)'
23+ '%(on_delete_db)s%(deferrable)s'
24+ )
2225
2326 # The PostgreSQL backend uses "SET CONSTRAINTS ... IMMEDIATE" after this
2427 # statement. This isn't supported by CockroachDB.
You can’t perform that action at this time.
0 commit comments