def setup_class(cls): cls.bind = db_for_dialect("postgresql") cls.bind.execute(""" create table tab ( col varchar(50) ) """) cls.bind.execute(""" insert into tab (col) values ('old data 1'), ('old data 2.1'), ('old data 3') """)
def setup_class(cls): cls.bind = db_for_dialect("postgresql") staging_env() context = MigrationContext.configure( connection = cls.bind.connect(), opts = { 'compare_type':True, 'compare_server_default':True } ) connection = context.bind cls.autogen_context = { 'imports':set(), 'connection':connection, 'dialect':connection.dialect, 'context':context }
def _get_bind(cls): return db_for_dialect('mysql') #sqlite_db()
def _get_bind(cls): cls.test_schema_name = "test_schema" return db_for_dialect('postgresql')