Skip to content

Commit d9daed6

Browse files
author
Victor Tsang
committed
updated comments
1 parent 1bcb155 commit d9daed6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

aurora_dsql_django/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ class DatabaseWrapper(base.DatabaseWrapper):
125125
)
126126
data_types_suffix = dict(
127127
base.DatabaseWrapper.data_types_suffix,
128-
BigAutoField="", # Default value auto generated from gen_rand_int64
128+
BigAutoField="", # The default value is auto generated locally from gen_rand_int64
129129
# For now skipping small int because uuid does not fit in a smallint?
130130
SmallAutoField="",
131-
AutoField="", # Default value auto generated from gen_rand_int32
131+
AutoField="", # The default value is auto generated locally from gen_rand_int32
132132
)
133133

134134
SchemaEditorClass = DatabaseSchemaEditor

aurora_dsql_django/schema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class DatabaseSchemaEditor(schema.DatabaseSchemaEditor):
4141
"UPDATE %(table)s SET %(column)s = %(default)s WHERE %(column)s IS NULL"
4242
)
4343

44-
# ALTER TABLE ADD CONSTRAINT is not supported, but create unique index async works as an alternative
44+
# ALTER TABLE ADD CONSTRAINT is not supported
45+
# The equivalent workaround is to create an unique index
4546
sql_create_unique = "CREATE UNIQUE INDEX ASYNC %(name)s ON %(table)s (%(columns)s)"
4647

4748
# ALTER TABLE ADD CONSTRAINT FOREIGN KEY is not supported

examples/pet-clinic-app/project/project/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
'USER': 'admin',
7272
'NAME': 'postgres',
7373
'ENGINE': 'aurora_dsql_django',
74-
'DISABLE_SERVER_SIDE_CURSORS': True,
74+
'DISABLE_SERVER_SIDE_CURSORS': True, # Fixes unsupported statement: DeclareCursor
7575
'OPTIONS': {
7676
'sslmode': 'require',
7777
'region': 'us-east-1'

0 commit comments

Comments
 (0)