コード例 #1
0
async def create_tables(conn: SAConnection) -> None:

    for enum in enums:
        await conn.execute(CreateEnumType(enum))

    for table in tables:
        await conn.execute(CreateTable(table))
コード例 #2
0
 async def create_async(self, bind=None, checkfirst=True):
     if not checkfirst or \
         not await bind.dialect.has_type(
             bind, self.name, schema=self.schema):
         await bind.status(CreateEnumType(self))