- 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
33
testdb/dbschema/gnuviechadmin/versions/1/1.py
Normal file
33
testdb/dbschema/gnuviechadmin/versions/1/1.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
# setup tables for spamassassin
|
||||
from sqlalchemy import *
|
||||
from migrate import *
|
||||
|
||||
meta = BoundMetaData(migrate_engine)
|
||||
domains = Table('domains', meta, autoload = True)
|
||||
mailalias = Table(
|
||||
'mailalias', meta,
|
||||
Column('mailaliasid', Integer, primary_key = True),
|
||||
Column('domainid', Integer, ForeignKey('domains.id'), nullable = False),
|
||||
Column('email', String(255), nullable = False),
|
||||
Column('target', TEXT, nullable = False),
|
||||
UniqueConstraint('email', 'domainid'))
|
||||
|
||||
mailpassword = Table(
|
||||
'mailpassword', meta,
|
||||
Column('id', String(18), primary_key = True),
|
||||
Column('domainid', Integer, ForeignKey('domains.id'), nullable = False),
|
||||
Column('uid', Integer, nullable = False),
|
||||
Column('gid', Integer, nullable = False),
|
||||
Column('home', String(255), nullable = False),
|
||||
Column('cryptpass', String(34), nullable = False),
|
||||
Column('clearpass', String(64), nullable = False),
|
||||
Column('spamcheck', Boolean, default = False),
|
||||
Column('sajunkscore', Integer))
|
||||
|
||||
def upgrade():
|
||||
mailalias.create()
|
||||
mailpassword.create()
|
||||
|
||||
def downgrade():
|
||||
mailpassword.drop()
|
||||
mailalias.drop()
|
Loading…
Add table
Add a link
Reference in a new issue