def __init__(self):
     uname = PkName('username')
     section = PkName('section')
     option = PkBigname('option')
     value = Text('value')
     cols = [uname, section, option, value]
     Table.__init__(self, 'config', cols)
 def __init__(self):
     clientid = PkNum('clientid')
     clientid.set_fk('clients')
     ticketid = PkNum('ticketid')
     ticketid.set_fk('tickets')
     status = Name('status')
     Table.__init__(self, 'client_tickets', [clientid, ticketid, status])
 def __init__(self):
     idcol = AutoId('contactid', 'contact_ident')
     name = PkName('name')
     address = Num('addressid')
     address.set_fk('addresses', 'addressid')
     email = PkBigname('email')
     desc = Text('description')
     Table.__init__(self, 'contacts', [idcol, name, address, email, desc])
 def __init__(self):
     idcol = AutoId('ticketid', 'ticket_ident', pk=True)
     title = Name('title')
     title.constraint.null = False
     author = Name('author')
     created = Now('created')
     data = Text('data')
     cols = [idcol, title, author, created, data]
     Table.__init__(self, 'tickets', cols)
 def __init__(self):
     clientid = Num('clientid')
     clientid.set_fk('clients')
     locationid = Num('locationid')
     locationid.set_fk('locations', 'locationid')
     contactid = Num('contactid')
     contactid.set_fk('contacts', 'contactid')
     cols = [clientid, locationid, contactid]
     Table.__init__(self, 'clientinfo', cols)
 def __init__(self):
     ticket = Num('ticketid')
     ticket.set_fk('tickets')
     actionid = AutoId('actionid', 'action_ident', pk=True)
     subject = Bigname('subject')
     action = Name('action')
     author = Name('author')
     posted = Now('posted')
     data = Text('data')
     cols = [ticket, actionid, subject, action, author, posted, data]
     Table.__init__(self, 'ticketactions', cols)
 def __init__(self):
     idcol = AutoId('addressid', 'address_ident')
     s1 = PkBigname('street1')
     s2 = PkBigname('street2')
     s2.constraint.default = ('')
     city = PkName('city')
     state = Column('state', StateName)
     state.constraint.pk = True
     zip_ = Column('zip', ZipName)
     zip_.constraint.pk = True
     cols = [idcol, s1, s2, city, state, zip_]
     Table.__init__(self, 'addresses', cols)
 def __init__(self):
     idcol = AutoId('locationid', 'location_ident')
     name = PkName('name')
     name.constraint.default = 'main office'
     addressid = PkNum('addressid')
     addressid.set_fk('addresses', 'addressid')
     isp = PkName('isp')
     conn = PkName('connection')
     ip = PkName('ip')
     static = Bool('static')
     static.constraint.pk = True
     serviced = Bool('serviced')
     serviced.constraint.pk = True
     cols = [idcol, name, addressid, isp, conn, ip, static, serviced]
     Table.__init__(self, 'locations', cols)
 def __init__(self):
     ticketid = PkNum('ticketid')
     ticketid.set_fk('tickets')
     status = Name('status')
     Table.__init__(self, 'ticketstatus', [ticketid, status])
 def __init__(self):
     actionid = PkNum('actionid')
     actionid.set_fk('ticketactions', 'actionid')
     parent = PkNum('parent')
     parent.set_fk('ticketactions')
     Table.__init__(self, 'ticketactionparent', [actionid, parent])
 def __init__(self):
     idcol = PkNum('clientid')
     idcol.set_auto_increment('client_ident')
     client = Name('client')
     client.constraint.unique = True
     Table.__init__(self, 'clients', [idcol, client])