@@ -372,17 +372,16 @@ MySQL.
372372 from sqlalchemy import CheckConstraint
373373
374374 metadata_obj = MetaData()
375- mytable = Table('mytable', metadata_obj,
376-
375+ mytable = Table(
376+ "mytable",
377+ metadata_obj,
377378 # per-column CHECK constraint
378- Column('col1', Integer, CheckConstraint('col1>5')),
379-
380- Column('col2', Integer),
381- Column('col3', Integer),
382-
379+ Column("col1", Integer, CheckConstraint("col1>5")),
380+ Column("col2", Integer),
381+ Column("col3", Integer),
383382 # table level CHECK constraint. 'name' is optional.
384- CheckConstraint(' col2 > col3 + 5' , name=' check1')
385- )
383+ CheckConstraint(" col2 > col3 + 5" , name=" check1"),
384+ )
386385
387386 {sql}mytable.create(engine)
388387 CREATE TABLE mytable (
@@ -852,25 +851,24 @@ INDEX" is issued right after the create statements for the table:
852851.. sourcecode :: python+sql
853852
854853 metadata_obj = MetaData()
855- mytable = Table('mytable', metadata_obj,
854+ mytable = Table(
855+ "mytable",
856+ metadata_obj,
856857 # an indexed column, with index "ix_mytable_col1"
857- Column('col1', Integer, index=True),
858-
858+ Column("col1", Integer, index=True),
859859 # a uniquely indexed column with index "ix_mytable_col2"
860- Column('col2', Integer, index=True, unique=True),
861-
862- Column('col3', Integer),
863- Column('col4', Integer),
864-
865- Column('col5', Integer),
866- Column('col6', Integer),
867- )
860+ Column("col2", Integer, index=True, unique=True),
861+ Column("col3", Integer),
862+ Column("col4", Integer),
863+ Column("col5", Integer),
864+ Column("col6", Integer),
865+ )
868866
869867 # place an index on col3, col4
870- Index(' idx_col34' , mytable.c.col3, mytable.c.col4)
868+ Index(" idx_col34" , mytable.c.col3, mytable.c.col4)
871869
872870 # place a unique index on col5, col6
873- Index(' myindex' , mytable.c.col5, mytable.c.col6, unique=True)
871+ Index(" myindex" , mytable.c.col5, mytable.c.col6, unique=True)
874872
875873 {sql}mytable.create(engine)
876874 CREATE TABLE mytable (
@@ -910,7 +908,7 @@ The :class:`~sqlalchemy.schema.Index` object also supports its own ``create()``
910908
911909.. sourcecode :: python+sql
912910
913- i = Index(' someindex' , mytable.c.col5)
911+ i = Index(" someindex" , mytable.c.col5)
914912 {sql}i.create(engine)
915913 CREATE INDEX someindex ON mytable (col5){stop}
916914
0 commit comments