- OR-Mapping test with SQLAlchemy and migrate
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@203 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
bf7992a600
commit
4d6fb63343
11 changed files with 427 additions and 0 deletions
14
backend/gnuviechadmin/ormaptest_repo/versions/1/1.py
Normal file
14
backend/gnuviechadmin/ormaptest_repo/versions/1/1.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from sqlalchemy import *
|
||||
from migrate import *
|
||||
|
||||
meta = BoundMetaData(migrate_engine)
|
||||
account = Table('account', meta,
|
||||
Column('id', Integer, primary_key=True),
|
||||
Column('login', String(40)),
|
||||
Column('passwd', String(40)))
|
||||
|
||||
def upgrade():
|
||||
account.create()
|
||||
|
||||
def downgrade():
|
||||
account.drop()
|
Loading…
Add table
Add a link
Reference in a new issue