Changeset 2535 for trunk/packages
- Timestamp:
- Oct 29, 2009, 3:40:41 AM (15 years ago)
- Location:
- trunk/packages/invirt-database
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-database/debian/changelog
r2222 r2535 1 invirt-database (0.2.2) unstable; urgency=low 2 3 * Add builds table for storing build history. 4 5 -- Evan Broder <broder@mit.edu> Sun, 25 Oct 2009 18:45:23 -0400 6 1 7 invirt-database (0.2.1) unstable; urgency=low 2 8 -
trunk/packages/invirt-database/python/database/models.py
r2225 r2535 5 5 from sqlalchemy.ext.sessioncontext import SessionContext 6 6 from sqlalchemy.ext.assignmapper import assign_mapper 7 8 import datetime 7 9 8 10 from invirt.database import record … … 21 23 'owners_table', 22 24 'admins_table', 25 'builds_table', 23 26 'Machine', 24 27 'MachineAccess', … … 31 34 'Owner', 32 35 'Admin', 36 'Build', 33 37 'or_', 34 38 ] … … 99 103 Column('vms_quota_active', Integer, nullable=True, default=None)) 100 104 105 builds_table = Table('builds', meta, 106 Column('build_id', Integer, primary_key=True, nullable=False), 107 Column('package', String, nullable=False), 108 Column('pocket', String, nullable=False), 109 Column('commit', String, nullable=False), 110 Column('version', String, nullable=True, default=None), 111 Column('principal', String, nullable=False), 112 Column('succeeded', Boolean, nullable=False), 113 Column('failed_stage', String, nullable=True, default=None), 114 Column('inserted_at', DateTime, nullable=False, default=datetime.datetime.utcnow)) 115 101 116 machine_access_table = Table('machine_access', meta, 102 117 Column('machine_id', Integer, ForeignKey('machines.machine_id', ondelete='CASCADE'), nullable=False, index=True), … … 134 149 _identity_field = 'user' 135 150 151 class Build(record.Record): 152 _identity_field = 'build_id' 153 136 154 from invirt.database.owner import Owner 137 155 … … 151 169 session.mapper(Owner, owners_table) 152 170 session.mapper(Admin, admins_table) 171 session.mapper(Build, builds_table) 153 172 154 173 def clear_cache():
Note: See TracChangeset
for help on using the changeset viewer.