Don't consider partial unique index creation as making a column not nullable.

This commit is contained in:
Deven Dayal authored and David Wobrock committed 2024-03-30 11:48:49 +01:00
1 parent b15924ca0f
commit a230681de5
3 files changed
+8 -1

No files matched your search

+4
View File
@@ -336,6 +336,10 @@ class PostgresqlAnalyserTestCase(SqlAnalyserTestCase):
sql = 'CREATE INDEX CONCURRENTLY "index_name" ON "table_name" ("a_column") WHERE ("some_column" IS NOT NULL);'
self.assertValidSql(sql)
def test_create_unique_index_concurrently_where(self):
sql = 'CREATE UNIQUE INDEX CONCURRENTLY "index_name" ON "table_name" ("a_column") WHERE ("some_column" IS NOT NULL);'
self.assertBackwardIncompatibleSql(sql, "ADD_UNIQUE")
def test_drop_index_non_concurrently(self):
sql = "DROP INDEX ON films"
self.assertWarningSql(sql)