Refs #32858, Refs #32392 -- Restored using :: shortcut syntax in Cast() on PostgreSQL.

This partly reverts commit fdfbc66331
unnecessary since b69b0c3fe8.
This commit is contained in:
Mariusz Felisiak 2021-06-22 06:10:54 +02:00
parent b69b0c3fe8
commit e07609a0d1
3 changed files with 24 additions and 1 deletions

View file

@ -305,7 +305,7 @@ class SchemaTests(PostgreSQLTestCase):
self.assertIn(index_name, constraints)
self.assertIn(constraints[index_name]['type'], GinIndex.suffix)
self.assertIs(sql.references_column(table, 'field'), True)
self.assertIn(' AS tsvector', str(sql))
self.assertIn('::tsvector', str(sql))
with connection.schema_editor() as editor:
editor.remove_index(TextFieldModel, index)
self.assertNotIn(index_name, self.get_constraints(table))