- repository reorganization
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/trunk@242 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
5c1a97e82d
commit
dea15a6c4f
29 changed files with 1053 additions and 0 deletions
40
testdb/dbschema/gnuviechadmin/versions/2/2.py
Normal file
40
testdb/dbschema/gnuviechadmin/versions/2/2.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
from sqlalchemy import *
|
||||
from migrate import *
|
||||
|
||||
meta = BoundMetaData(migrate_engine)
|
||||
client_table = Table(
|
||||
'client', meta,
|
||||
Column('clientid', Integer, primary_key = True),
|
||||
Column('firstname', String(40), nullable = False),
|
||||
Column('lastname', String(40), nullable = False),
|
||||
Column('address1', String(40), nullable = False),
|
||||
Column('address2', String(40)),
|
||||
Column('country', String(40)),
|
||||
Column('town', String(50), nullable = False),
|
||||
Column('zipcode', String(5), nullable = False),
|
||||
Column('state', String(40)),
|
||||
Column('active', Boolean, default = False, nullable = False),
|
||||
Column('phone', String(20)),
|
||||
Column('mobile', String(20)))
|
||||
|
||||
sysuser_table = Table(
|
||||
'sysuser', meta,
|
||||
Column('sysuserid', Integer, primary_key = True),
|
||||
Column('name', String(12), nullable = False),
|
||||
Column('type', Integer, default = 0, nullable = False),
|
||||
Column('home', String(128)),
|
||||
Column('shell', Boolean),
|
||||
Column('password', String(64)),
|
||||
Column('clientid', Integer, ForeignKey('client.clientid'),
|
||||
nullable = False),
|
||||
Column('toupdate', Boolean, default = False, nullable = False),
|
||||
Column('md5pass', String(34)),
|
||||
Column('sysuid', Integer))
|
||||
|
||||
def upgrade():
|
||||
client_table.create()
|
||||
sysuser_table.create()
|
||||
|
||||
def downgrade():
|
||||
sysuser_table.drop()
|
||||
client_table.drop()
|
Loading…
Add table
Add a link
Reference in a new issue