Skip to content

Commit 2c14a0a

Browse files
author
Victor Tsang
committed
disable unsupported alter table statements
1 parent d9daed6 commit 2c14a0a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

aurora_dsql_django/schema.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,24 @@ class DatabaseSchemaEditor(schema.DatabaseSchemaEditor):
4949
sql_create_fk = "SELECT 'sql_create_fk' WHERE FALSE"
5050
# ALTER TABLE ADD CONSTRAINT CHECK is not supported
5151
sql_create_check = "SELECT 'sql_create_check' WHERE FALSE"
52+
# ALTER TABLE DROP CONSTRAINT is not supported
5253
sql_delete_check = "SELECT 'sql_delete_check' WHERE FALSE"
5354
# ALTER TABLE DROP CONSTRAINT is not supported
5455
sql_delete_constraint = "SELECT 'sql_delete_constraint' WHERE FALSE"
56+
# ALTER TABLE ADD COLUMN is not supported
57+
sql_create_column = "SELECT 'sql_create_column' WHERE FALSE"
5558
# ALTER TABLE DROP COLUMN is not supported
5659
sql_delete_column = "SELECT 'sql_delete_column' WHERE FALSE"
60+
# ALTER TABLE SET TABLESPACE is not supported
61+
sql_retablespace_table = "SELECT 'sql_retablespace_table' WHERE FALSE"
62+
# ALTER TABLE ALTER COLUMN is not supported
63+
sql_alter_column = "SELECT 'sql_alter_column' WHERE FALSE"
5764

5865
sql_create_index = (
5966
"CREATE INDEX ASYNC %(name)s ON %(table)s%(using)s "
6067
"(%(columns)s)%(include)s%(extra)s%(condition)s"
6168
)
6269

63-
sql_alter_column = "SELECT 'sql_alter_column' WHERE FALSE"
6470

6571
def __enter__(self):
6672
super().__enter__()

0 commit comments

Comments
 (0)