def __init__(self, profiles_table, traits_table):
     profile_col = PkName('profile')
     profile_col.set_fk(profiles_table)
     trait_col = PkName('trait')
     trait_col.set_fk(traits_table)
     ord_col = Num('ord')
     Table.__init__(self, 'profile_trait', [profile_col, trait_col, ord_col])
 def __init__(self, fs_table, disks_table):
     fs_col = PkName('filesystem')
     fs_col.set_fk(fs_table)
     diskname_col = PkName('diskname')
     diskname_col.set_fk(disks_table)
     columns = [fs_col, diskname_col]
     Table.__init__(self, 'filesystem_disks', columns)
Exemple #3
0
 def __init__(self, machines_table):
     machine_col = PkName('machine')
     machine_col.set_fk(machines_table)
     family_col = PkName('family')
     family_col.set_fk('families')
     columns = [machine_col, family_col]
     Table.__init__(self, 'machine_family', columns)
 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):
     taskid = PkNum('taskid')
     taskid.set_auto_increment('task_ident')
     name = Name('name')
     desc = Text('description')
     cols = [taskid, name, desc]
     Table.__init__(self, 'tasks', cols)
 def __init__(self):
     clientid = PkNum('clientid')
     clientid.set_fk('clients')
     name = PkName('name')
     value = Text('value')
     cols = [clientid, name, value]
     Table.__init__(self, 'clientdata', cols)
 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):
     idcol = PkName('name')
     keyid = Name('keyid')
     keyid.constraint.unique = True
     data = Text('data')
     columns = [idcol, keyid, data]
     Table.__init__(self, 'archive_keys', columns)
 def __init__(self, name, mach_types_table, disks_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     diskname_col = PkName('diskname')
     diskname_col.set_fk(disks_table)
     columns = [mtype_col, diskname_col, PkName('device')]
     Table.__init__(self, name, columns)
Exemple #10
0
 def __init__(self, machines_table):
     machine_col = PkName('machine')
     machine_col.set_fk(machines_table)
     parent_col = PkName('parent')
     parent_col.set_fk(machines_table)
     columns = [machine_col, parent_col]
     Table.__init__(self, 'machine_parent', columns)
 def __init__(self):
     idcol = PkNum('fileid')
     idcol.set_auto_increment('textfile_ident')
     mcol = Name('md5size')
     mcol.constraint.unique = True
     dcol = Text('data')
     columns = [idcol, mcol, dcol]
     Table.__init__(self, 'textfiles', columns)
 def __init__(self):
     idcol = AutoId('workid')
     type_ = Name('type')
     title = Bigname('title')
     url = Bigname('url')
     desc = Text('description')
     cols= [idcol, type_, title, url, desc]
     Table.__init__(self, 'all_works', cols)
 def __init__(self):
     idcol = PkName('apt_id')
     uri = Bigname('uri')
     dist = Name('dist')
     sections = Bigname('sections')
     local_path = Bigname('local_path')
     columns = [idcol, uri, dist, sections, local_path]
     Table.__init__(self, 'apt_sources', columns)
 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, idtable, name):
     id_ = PkNum(idcol)
     id_.set_fk(idtable)
     tagname = PkName('tag')
     tagname.set_fk('tagnames')
     tagval = Text('value')
     cols = [id_, tagname, tagval]
     Table.__init__(self, name, cols)
 def __init__(self):
     entityid = PkNum('entityid')
     fieldname = PkBigname('fieldname')
     # value defaults to text type, it needs to be coerced into
     # it's supported type
     value = Text('value')
     cols = [entityid, fieldname, value]
     Table.__init__(self, 'entity_extfields', cols)
 def __init__(self, suite, traits_table, prio_table):
     tablename = ujoin(suite, 'traits')
     columns = trait_columns()
     trait = getcolumn('trait', columns)
     priority = getcolumn('priority', columns)
     trait.set_fk(traits_table)
     priority.set_fk(prio_table)
     Table.__init__(self, tablename, columns)
 def __init__(self, fs_table, mounts_table):
     fs_col = PkName('filesystem')
     fs_col.set_fk(fs_table)
     mnt_name_col = PkName('mnt_name')
     mnt_name_col.set_fk(mounts_table)
     ord_col = Num('ord')
     partition_column = Num('partition')
     columns = [fs_col, mnt_name_col, ord_col, partition_column]
     Table.__init__(self, 'filesystem_mounts', columns)
 def __init__(self, profiles_table):
     profile_col = PkName('profile')
     profile_col.set_fk(profiles_table)
     trait_col = PkName('trait')
     name_col = PkBigname('name')
     value_col = Text('value')
     cols = [profile_col, trait_col, name_col, value_col]
     tablename = ujoin('profile', 'variables')
     Table.__init__(self, tablename, cols)
 def __init__(self):
     # etype is foreign key to EntityTypeTable
     etype = PkName('type')
     # fieldname is foreign key to ExtraFieldsTable
     fieldname = PkBigname('fieldname')
     # the supported types will be bool, int, name, url, and text
     fieldtype = Name('fieldtype')
     fieldtype.set_default('name')
     Table.__init__(self, 'entity_type_extfields', [etype, fieldname, fieldtype])
 def __init__(self):
     idcol = AutoId('entityid')
     # etype should be foreign key to EntityTypeTable
     etype = Name('type')
     name = Bigname('name')
     url = Text('url')
     desc = Text('desc')
     cols = [idcol, etype, name, url, desc]
     Table.__init__(self, 'entities', cols)
 def __init__(self):
     idcol = AutoId('guestid')
     fname = Name('firstname')
     lname = Name('lastname')
     salutation = Name('salutation')
     title = Bigname('title')
     desc = Text('description')
     cols = [idcol, fname, lname, salutation, title, desc]
     Table.__init__(self, 'guests', cols)
 def __init__(self):
     gmcol = PkName('game')
     gncol = Name('genre')
     fncol = Bigname('fullname')
     dbpth = Bigname('dosboxpath')
     launch = Bigname('launchcmd')
     desc  = Text('desc')
     cols = [gmcol, gncol, fncol, dbpth, launch, desc]
     Table.__init__(self, 'games', cols)
 def __init__(self, profiles_table):
     profile_col = PkName('profile')
     profile_col.set_fk(profiles_table)
     trait_col = PkName('trait')
     name_col = PkBigname('name')
     value_col = Text('value')
     cols = [profile_col, trait_col, name_col, value_col]
     tablename = ujoin('profile', 'variables')
     Table.__init__(self, tablename, cols)
 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)
Exemple #26
0
 def __init__(self):
     columns = [
         PkName('suite'),
         Bool('nonUS'),
         Bool('updates'),
         Bool('local'),
         Bool('common')
         ]
     Table.__init__(self, 'suites', columns)
 def __init__(self, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     trait_col = PkName('trait')
     name_col = PkBigname('name')
     value_col = Text('value')
     cols = [mtype_col, trait_col, name_col, value_col]
     tablename = ujoin('machine_type', 'variables')
     Table.__init__(self, tablename, cols)
 def __init__(self):
     columns = [
         PkName('suite'),
         Bool('nonUS'),
         Bool('updates'),
         Bool('local'),
         Bool('common')
         ]
     Table.__init__(self, 'suites', columns)
 def __init__(self):
     gamenum = PkNum('gamenum')
     title = Bigname('title')
     desc = Text('desc')
     # we are going to store a dictionary in
     # smallinfo for a little while
     smallinfo = Text('smallinfo')
     cols = [gamenum, title, desc, smallinfo]
     Table.__init__(self, 'abandonia_games', 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)
Exemple #31
0
 def __init__(self, kernels_table, profiles_table, diskconfig_table):
     machine_col = PkName('machine')
     kernel_col = Name('kernel')
     kernel_col.set_fk(kernels_table)
     profile_col = Name('profile')
     profile_col.set_fk(profiles_table)
     diskconfig_col = Name('diskconfig')
     diskconfig_col.set_fk(diskconfig_table)
     columns = [machine_col, kernel_col, profile_col, diskconfig_col]
     Table.__init__(self, 'machines', columns)
Exemple #32
0
 def __init__(self, machines_table):
     machine_col = PkName('machine')
     machine_col.set_fk(machines_table)
     tablename = ujoin('machine', 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     columns = [machine_col, script_column, sfile_column]
     Table.__init__(self, tablename, columns)
 def __init__(self, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     tablename = ujoin('machine_type', 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     script_columns = [mtype_col, script_column, sfile_column]
     Table.__init__(self, tablename, script_columns)
Exemple #34
0
 def __init__(self, fs_table, mounts_table):
     fs_col = PkName('filesystem')
     fs_col.set_fk(fs_table)
     mnt_name_col = PkName('mnt_name')
     mnt_name_col.set_fk(mounts_table)
     ord_col = Num('ord')
     partition_column = Num('partition')
     size = Name('size')
     columns = [fs_col, mnt_name_col, ord_col, partition_column, size]
     Table.__init__(self, 'filesystem_mounts', columns)
Exemple #35
0
 def __init__(self, machines_table):
     machine_col = PkName('machine')
     machine_col.set_fk(machines_table)
     trait_col = PkName('trait')
     trait_col.set_fk('traits')
     name_col = PkBigname('name')
     value_col = Text('value')
     columns = [machine_col, trait_col, name_col, value_col]
     tablename = ujoin('machine', 'variables')
     Table.__init__(self, tablename, columns)
Exemple #36
0
 def __init__(self, kernels_table, profiles_table, diskconfig_table):
     machine_col = PkName('machine')
     kernel_col = Name('kernel')
     kernel_col.set_fk(kernels_table)
     profile_col = Name('profile')
     profile_col.set_fk(profiles_table)
     diskconfig_col = Name('diskconfig')
     diskconfig_col.set_fk(diskconfig_table)
     columns = [machine_col, kernel_col, profile_col, diskconfig_col]
     Table.__init__(self, 'machines', columns)
Exemple #37
0
 def __init__(self):
     columns = [
         PkName('suite'),
         Name('os'),
         # the columns below aren't being used anymore
         Bool('nonUS'),
         Bool('updates'),
         Bool('local'),
         Bool('common')
     ]
     Table.__init__(self, 'suites', columns)
Exemple #38
0
 def __init__(self, mach_types_table, kernels_table, profiles_table,
              filesystem_table):
     machine_col = PkName('machine')
     mtype_col = Name('machine_type')
     mtype_col.set_fk(mach_types_table)
     kernel_col = Name('kernel')
     kernel_col.set_fk(kernels_table)
     profile_col = Name('profile')
     profile_col.set_fk(profiles_table)
     fs_col = Name('filesystem')
     fs_col.set_fk(filesystem_table, 'filesystem')
     columns = [machine_col, mtype_col, kernel_col, profile_col, fs_col]
     Table.__init__(self, 'machines', columns)
Exemple #39
0
 def __init__(self):
     fcol = PkName('family')
     fcol.set_fk('families')
     pcol = PkName('parent')
     pcol.set_fk('families')
     Table.__init__(self, 'family_parent', [fcol, pcol])
Exemple #40
0
def primary_tables():
    tables = []
    # Textfiles
    tables.append(TextFilesTable())
    # Archive Keys
    tables.append(ArchiveKeyTable())
    # All Suites
    tables.append(SuitesTable())
    # Apt Sources Table
    tables.append(AptSourcesTable())
    # Apt Source Packages Table
    tables.append(AptSourcePackagesTable())
    # Suite-AptSource Relation
    tables.append(SuiteAptSourcesTable())
    # All Traits
    tables.append(PkNameTable('traits', 'trait'))
    # All Priorities
    tables.append(PkNameTable('priorities', 'priority'))
    # All Families
    tables.append(FamilyTable())
    # Family Parents
    tables.append(FamilyParentsTable())
    # Family Environment
    tables.append(FamilyEnviromentTable())
    # All Profiles
    profiles = ProfileTable('suites')
    tables.append(profiles)
    # All Script Names
    scripts = PkNameTable('scriptnames', 'script')
    tables.append(scripts)
    # Profile - Trait relation
    profile_trait_table = ProfileTrait('profiles', 'traits')
    tables.append(profile_trait_table)
    # Profile Environment
    profile_variables = ProfileEnvironment('profiles')
    tables.append(profile_variables)
    # Profile Family
    tables.append(ProfileFamilyTable())
    # Default Environment
    defaultenv = Table('default_environment', defaultenv_columns())
    tables.append(defaultenv)
    # Current Environment
    currentenv = Table('current_environment', currentenv_columns())
    tables.append(currentenv)
    # Disks
    tables.append(DisksTable())
    # Machine Types
    tables.append(MachineTypesTable())
    # Mounts
    tables.append(MountsTable())
    # Kernels
    tables.append(KernelsTable())
    # Partitions
    tables.append(PartitionsTable('partitions', 'disks'))
    # Partition Workspace
    pwcols = [PkName('diskname')] + partition_columns()
    tables.append(Table('partition_workspace', pwcols))
    # MachineTypesTables
    mtparent = MachineTypeParentsTable('machine_types')
    tables.append(mtparent)
    mtfamily = MachineTypeFamilyTable('machine_types')
    tables.append(mtfamily)
    mtenviron = MachineTypeEnvironment('machine_types')
    tables.append(mtenviron)
    mtscript = MachineTypeScript('machine_types')
    tables.append(mtscript)
    # Machine Disks
    machine_disks = MachineDisksTable('machine_disks', 'machine_types',
                                      'disks')
    tables.append(machine_disks)
    # Machine Modules
    machine_modules = MachineModulesTable('machine_modules', 'machine_types')
    tables.append(machine_modules)
    # Filesystems
    tables.append(FilesystemsTable())
    # Filesystem Mounts
    tables.append(FilesystemMountsTable('filesystems', 'mounts'))
    # Filesystem Disks
    tables.append(FilesystemDisksTable('filesystems', 'disks'))
    # Machines
    machines = MachinesTable('machine_types', 'kernels', 'profiles',
                             'filesystems')
    tables.append(machines)

    return tables, dict([(t.name, t) for t in tables])
Exemple #41
0
 def __init__(self):
     columns = family_env_columns()
     columns[0].set_fk('families')
     columns[1].set_fk('traits')
     Table.__init__(self, 'family_environment', columns)
Exemple #42
0
 def __init__(self):
     idcol = PkName('script')
     typecol = Name('type')
     cols = [idcol, typecol]
     Table.__init__(self, 'scriptnames', cols)
Exemple #43
0
 def __init__(self, name):
     cols = [Name('system')]
     Table.__init__(self, name, system)
Exemple #44
0
 def __init__(self, suite):
     tablename = ujoin(suite, 'packages')
     Table.__init__(self, tablename, packages_columns())
Exemple #45
0
 def __init__(self):
     apt_id = PkName('apt_id')
     pkg_columns = packages_columns()
     Table.__init__(self, 'apt_source_packages', [apt_id] + pkg_columns)
Exemple #46
0
 def __init__(self, suite, traits_table):
     tablename = ujoin(suite, 'traits')
     columns = trait_columns()
     trait = getcolumn('trait', columns)
     trait.set_fk(traits_table)
     Table.__init__(self, tablename, columns)
Exemple #47
0
 def __init__(self, name):
     Table.__init__(self, name, md5sums_columns)
Exemple #48
0
 def __init__(self):
     suite = PkName('suite')
     apt_id = PkName('apt_id')
     order = Num('ord')
     name = 'suite_apt_sources'
     Table.__init__(self, name, [suite, apt_id, order])
Exemple #49
0
 def __init__(self):
     idcol = PkName('name')
     diskconf_col = Text('content')
     disklist_col = Text('disklist')
     columns = [idcol, diskconf_col, disklist_col]
     Table.__init__(self, 'diskconfig', columns)
Exemple #50
0
 def __init__(self, name, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     columns = [mtype_col, PkName('module'), Num('ord')]
     Table.__init__(self, name, columns)
Exemple #51
0
 def __init__(self, mounts_table):
     mnt_name_col = PkName('mnt_name')
     mnt_name_col.set_fk(mounts_table)
     partition_col = Num('partition')
     columns = [mnt_name_col, partition_col]
     Table.__init__(self, 'partition_mounts', columns)
Exemple #52
0
 def __init__(self, suite_table):
     columns = profile_columns()
     suite = getcolumn('suite', columns)
     suite.set_fk(suite_table)
     Table.__init__(self, 'profiles', columns)
Exemple #53
0
 def __init__(self):
     columns = [PkName('family'), Name('type')]
     Table.__init__(self, 'families', columns)
Exemple #54
0
 def __init__(self, name):
     Table.__init__(self, name, filelist_columns)
Exemple #55
0
 def __init__(self):
     fs_col = PkName('filesystem')
     Table.__init__(self, 'filesystems', [fs_col])
Exemple #56
0
 def __init__(self, name='kernels'):
     kernel_column = PkName('kernel')
     columns = [kernel_column]
     Table.__init__(self, name, columns)
Exemple #57
0
 def __init__(self, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     fcol = PkName('family')
     fcol.set_fk('families')
     Table.__init__(self, 'machine_type_family', [mtype_col, fcol])
Exemple #58
0
 def __init__(self, name):
     Table.__init__(self, name, available_columns)
Exemple #59
0
 def __init__(self):
     pcol = PkName('profile')
     pcol.set_fk('profiles')
     fcol = PkName('family')
     fcol.set_fk('families')
     Table.__init__(self, 'profile_family', [pcol, fcol])
Exemple #60
0
 def __init__(self, name):
     Table.__init__(self, name, status_columns)