

def setUp(self):
    super(ModelsMigrationSyncMixin, self).setUp()
    self.metadata = sa.MetaData()
    self.metadata_migrations = sa.MetaData()
    sa.Table('testtbl', self.metadata_migrations, sa.Column('id', sa.Integer, primary_key=True), sa.Column('spam', sa.String(10), nullable=False), sa.Column('eggs', sa.DateTime), sa.Column('foo', sa.Boolean, server_default=sa.sql.expression.true()), sa.Column('bool_wo_default', sa.Boolean), sa.Column('bar', sa.Numeric(10, 5)), sa.Column('defaulttest', sa.Integer, server_default='5'), sa.Column('defaulttest2', sa.String(8), server_default=''), sa.Column('defaulttest3', sa.String(5), server_default='test'), sa.Column('defaulttest4', sa.Enum('first', 'second', name='testenum'), server_default='first'), sa.Column('variant', sa.BigInteger()), sa.Column('variant2', sa.BigInteger(), server_default='0'), sa.Column('fk_check', sa.String(36), nullable=False), sa.UniqueConstraint('spam', 'eggs', name='uniq_cons'))
    BASE = sa_decl.declarative_base(metadata=self.metadata)

    class TestModel(BASE):
        __tablename__ = 'testtbl'
        __table_args__ = (sa.UniqueConstraint('spam', 'eggs', name='uniq_cons'),)
        id = sa.Column('id', sa.Integer, primary_key=True)
        spam = sa.Column('spam', sa.String(10), nullable=False)
        eggs = sa.Column('eggs', sa.DateTime)
        foo = sa.Column('foo', sa.Boolean, server_default=sa.sql.expression.true())
        fk_check = sa.Column('fk_check', sa.String(36), nullable=False)
        bool_wo_default = sa.Column('bool_wo_default', sa.Boolean)
        defaulttest = sa.Column('defaulttest', sa.Integer, server_default='5')
        defaulttest2 = sa.Column('defaulttest2', sa.String(8), server_default='')
        defaulttest3 = sa.Column('defaulttest3', sa.String(5), server_default='test')
        defaulttest4 = sa.Column('defaulttest4', sa.Enum('first', 'second', name='testenum'), server_default='first')
        variant = sa.Column(sa.BigInteger().with_variant(sa.Integer(), 'sqlite'))
        variant2 = sa.Column(sa.BigInteger().with_variant(sa.Integer(), 'sqlite'), server_default='0')
        bar = sa.Column('bar', sa.Numeric(10, 5))

    class ModelThatShouldNotBeCompared(BASE):
        __tablename__ = 'testtbl2'
        id = sa.Column('id', sa.Integer, primary_key=True)
        spam = sa.Column('spam', sa.String(10), nullable=False)

dataset/ETHPy150Open openstack/oslo.db/oslo_db/tests/sqlalchemy/test_migrations.py ModelsMigrationSyncMixin.setUp/original