18 lines
461 B
Python
18 lines
461 B
Python
|
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)
|
||
|
|
||
|
def upgrade():
|
||
|
sysuidrefcol.create(domains)
|
||
|
|
||
|
def downgrade():
|
||
|
col = domains.c.sysuserid
|
||
|
col.drop()
|