Browse Source

- use a schema for the gnuviechadmin tables

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@228 a67ec6bc-e5d5-0310-a910-815c51eb3124
master
Jan Dittberner 14 years ago
parent
commit
0d12afc71e
  1. 1
      gnuviechadmin/backend/client.py
  2. 19
      gnuviechadmin/backend/tables.py
  3. 1
      gnuviechadmin/defaults.cfg

1
gnuviechadmin/backend/client.py

@ -23,6 +23,7 @@ from sqlalchemy import *
from tables import client_table
from gnuviechadmin.exceptions import *
import sysuser
from BackendEntity import *
from BackendEntityHandler import *

19
gnuviechadmin/backend/tables.py

@ -41,7 +41,9 @@ client_table = Table(
Column('phone', String(32), nullable=False),
Column('mobile', String(32)),
Column('fax', String(32)),
Column('email', String(64), unique=True, nullable=False))
Column('email', String(64), unique=True, nullable=False),
schema = config.get('database', 'schema')
)
client_table.create(checkfirst=True)
sysuser_table = Table(
@ -55,7 +57,8 @@ sysuser_table = Table(
Column('md5pass', String(34)),
Column('clientid', Integer, ForeignKey("client.clientid"), nullable=False),
Column('sysuid', Integer, nullable=False, unique=True),
Column('lastchange', DateTime, default=func.now())
Column('lastchange', DateTime, default=func.now()),
schema = config.get('database', 'schema')
)
sysuser_table.create(checkfirst=True)
@ -68,7 +71,9 @@ domain_table = Table(
Column('type', String(6), nullable=False),
Column('notified_serial', Integer),
Column('sysuserid', Integer, ForeignKey("sysuser.sysuserid"),
nullable=False))
nullable=False),
schema = config.get('database', 'schema')
)
domain_table.create(checkfirst=True)
record_table = Table(
@ -81,7 +86,9 @@ record_table = Table(
Column('content', String(255)),
Column('ttl', Integer),
Column('prio', Integer),
Column('change_date', Integer))
Column('change_date', Integer),
schema = config.get('database', 'schema')
)
record_table.create(checkfirst=True)
supermaster_table = Table(
@ -89,5 +96,7 @@ supermaster_table = Table(
Column('ip', String(25), nullable=False),
Column('nameserver', String(255), nullable=False),
Column('account', Integer, ForeignKey("sysuser.sysuserid"),
nullable=False))
nullable=False),
schema = config.get('database', 'schema')
)
supermaster_table.create(checkfirst=True)

1
gnuviechadmin/defaults.cfg

@ -32,6 +32,7 @@
# very usable for a real installation.
#
uri = sqlite:///:memory:
schema = gva
[common]
suwrapper = sudo

Loading…
Cancel
Save