File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -433,9 +433,9 @@ class FooBar(Base):
433433 self .assertIn ("CrateDB does not support unique constraints, "
434434 "they will be omitted when generating DDL statements." , str (w [- 1 ].message ))
435435
436- def test_ddl_with_reserved_words (self ):
436+ def test_ddl_with_reserved_words_and_uppercase (self ):
437437 """
438- Verify CrateDB's reserved words like `object` are quoted properly.
438+ Verify CrateDB's reserved words and columns using uppercase characters are quoted properly.
439439 """
440440
441441 Base = declarative_base (metadata = self .metadata )
@@ -445,18 +445,20 @@ class FooBar(Base):
445445
446446 __tablename__ = "foobar"
447447
448- index = sa .Column (sa .Integer , primary_key = True )
448+ ID = sa .Column (sa .Integer , primary_key = True )
449+ index = sa .Column (sa .Integer )
449450 array = sa .Column (sa .String )
450451 object = sa .Column (sa .String )
451452
452453 # Verify SQL DDL statement.
453454 self .metadata .create_all (self .engine , tables = [FooBar .__table__ ], checkfirst = False )
454455 self .assertEqual (self .executed_statement , dedent ("""
455456 CREATE TABLE testdrive.foobar (
456- \t "index" INT NOT NULL,
457+ \t "ID" INT NOT NULL,
458+ \t "index" INT,
457459 \t "array" STRING,
458460 \t "object" STRING,
459- \t PRIMARY KEY ("index ")
461+ \t PRIMARY KEY ("ID ")
460462 )
461463
462464 """ )) # noqa: W291, W293
You can’t perform that action at this time.
0 commit comments