2008-01-12 23:24:08 +01:00
|
|
|
from sqlalchemy import *
|
|
|
|
from migrate import *
|
|
|
|
import migrate.changeset
|
|
|
|
|
|
|
|
meta = BoundMetaData(migrate_engine)
|
|
|
|
sysuser = Table('sysuser', meta, autoload = True)
|
|
|
|
domains = Table('domains', meta, autoload = True)
|
|
|
|
sysuidrefcol = Column('sysuserid', Integer,
|
|
|
|
ForeignKey('sysuser.sysuserid'),
|
|
|
|
nullable = False)
|
|
|
|
|
2008-06-06 21:20:18 +02:00
|
|
|
|
2008-01-12 23:24:08 +01:00
|
|
|
def upgrade():
|
|
|
|
sysuidrefcol.create(domains)
|
|
|
|
|
2008-06-06 21:20:18 +02:00
|
|
|
|
2008-01-12 23:24:08 +01:00
|
|
|
def downgrade():
|
|
|
|
col = domains.c.sysuserid
|
|
|
|
col.drop()
|