def __init__(self): scol = PkName('script') tcol = Name('type') tcol.set_fk('scriptnames') fcol = Text('scriptfile') columns = [scol, tcol] + suiteversion_cols() + [fcol] Table.__init__(self, 'scripts', columns)
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)
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)
def suiteversion_cols(): scol = Name('suite') scol.set_fk('suites') vcol = PkNum('version') return [vcol, scol]