Ejemplo n.º 1
0
 def setUp(self):
     self.conn = config.db.connect()
     self.conn.execute("""
         create table foo(
             id integer primary key,
             data varchar(50),
             x integer
         )
     """)
     context = MigrationContext.configure(self.conn)
     self.op = op.Operations(context)
     self.t1 = table("foo", column("id"), column("data"), column("x"))
Ejemplo n.º 2
0
 def setUp(self):
     from sqlalchemy import create_engine
     from alembic.migration import MigrationContext
     self.conn = create_engine("sqlite://").connect()
     self.conn.execute("""
         create table foo(
             id integer primary key,
             data varchar(50),
             x integer
         )
     """)
     context = MigrationContext.configure(self.conn)
     self.op = op.Operations(context)
     self.t1 = table('foo', column('id'), column('data'), column('x'))