Code style changes
* make code PEP8 clean (addresses #18) * add copyright information to all python files git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/trunk@257 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
7c4d25da43
commit
09180938f1
45 changed files with 759 additions and 514 deletions
|
@ -7,8 +7,10 @@ account = Table('account', meta,
|
|||
Column('login', String(40)),
|
||||
Column('passwd', String(40)))
|
||||
|
||||
|
||||
def upgrade():
|
||||
account.create()
|
||||
|
||||
|
||||
def downgrade():
|
||||
account.drop()
|
||||
|
|
|
@ -4,8 +4,10 @@ from migrate import *
|
|||
meta = BoundMetaData(migrate_engine)
|
||||
account = Table('account', meta)
|
||||
|
||||
|
||||
def upgrade():
|
||||
account.drop()
|
||||
|
||||
|
||||
def downgrade():
|
||||
account.create()
|
||||
|
|
|
@ -15,8 +15,7 @@ domains = Table('domains', meta,
|
|||
Column('type', String(6), nullable=False),
|
||||
Column('notified_serial', Integer),
|
||||
Column('account', String(40)),
|
||||
UniqueConstraint('name', name='name_index')
|
||||
)
|
||||
UniqueConstraint('name', name='name_index'))
|
||||
|
||||
records = Table('records', meta,
|
||||
Column('id', Integer, primary_key=True),
|
||||
|
@ -28,17 +27,18 @@ records = Table('records', meta,
|
|||
Column('prio', Integer),
|
||||
Column('change_date', Integer),
|
||||
ForeignKeyConstraint(['domain_id'], ['domains.id'],
|
||||
ondelete='CASCADE', name='domain_exists')
|
||||
)
|
||||
ondelete='CASCADE', name='domain_exists'))
|
||||
Index('domain_id', records.c.domain_id)
|
||||
Index('nametype_index', records.c.name, records.c.type)
|
||||
Index('rec_name_index', records.c.name)
|
||||
|
||||
|
||||
def upgrade():
|
||||
supermasters.create()
|
||||
domains.create()
|
||||
records.create()
|
||||
|
||||
|
||||
def downgrade():
|
||||
records.drop()
|
||||
domains.drop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue