*** empty log message ***

svn path=/trunk/boinc/; revision=2235
This commit is contained in:
Karl Chen 2003-09-03 08:47:49 +00:00
parent 2ceaebe7d8
commit 60346e2f5a
1 changed files with 13 additions and 25 deletions

View File

@ -299,7 +299,7 @@ class DatabaseObject:
self.__dict__.update(self._table.defdict) # set defaults to None self.__dict__.update(self._table.defdict) # set defaults to None
# set this first so that if we get a DatabaseInconsistency we can see # set this first so that if we get a DatabaseInconsistency we can see
# the id # the id
self.id = dict['id'] self.id = dict.get('id')
for (key, value) in dict.items(): for (key, value) in dict.items():
if key == 'id': if key == 'id':
# self.id = value # self.id = value
@ -366,29 +366,26 @@ class DatabaseObject:
class Project(DatabaseObject): class Project(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'project', table = 'project',
columns = [ 'id', 'short_name', 'long_name' ] ) columns = [ 'short_name', 'long_name' ] )
class Platform(DatabaseObject): class Platform(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'platform', table = 'platform',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'name', 'name',
'user_friendly_name' ]) 'user_friendly_name' ])
class Platform(DatabaseObject): class Platform(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'platform', table = 'platform',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'name', 'name',
'user_friendly_name' ]) 'user_friendly_name' ])
class CoreVersion(DatabaseObject): class CoreVersion(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'core_version', table = 'core_version',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'version_num', 'version_num',
'platformid', 'platformid',
'xml_doc', 'xml_doc',
@ -398,16 +395,14 @@ class CoreVersion(DatabaseObject):
class App(DatabaseObject): class App(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'app', table = 'app',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'name', 'name',
'min_version' ]) 'min_version' ])
class AppVersion(DatabaseObject): class AppVersion(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'app_version', table = 'app_version',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'appid', 'appid',
'version_num', 'version_num',
'platformid', 'platformid',
@ -418,8 +413,7 @@ class AppVersion(DatabaseObject):
class User(DatabaseObject): class User(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'user', table = 'user',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'email_addr', 'email_addr',
'name', 'name',
'authenticator', 'authenticator',
@ -440,8 +434,7 @@ class User(DatabaseObject):
class Team(DatabaseObject): class Team(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'team', table = 'team',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'userid', 'userid',
'name', 'name',
'name_lc', 'name_lc',
@ -454,12 +447,10 @@ class Team(DatabaseObject):
'total_credit', 'total_credit',
'expavg_credit' ]) 'expavg_credit' ])
class Host(DatabaseObject): class Host(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'host', table = 'host',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'userid', 'userid',
'rpc_seqno', 'rpc_seqno',
'rpc_time', 'rpc_time',
@ -499,8 +490,7 @@ class Host(DatabaseObject):
class Workunit(DatabaseObject): class Workunit(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'workunit', table = 'workunit',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'appid', 'appid',
'name', 'name',
'xml_doc', 'xml_doc',
@ -529,8 +519,7 @@ class Workunit(DatabaseObject):
class Result(DatabaseObject): class Result(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'result', table = 'result',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'workunitid', 'workunitid',
'server_state', 'server_state',
'outcome', 'outcome',
@ -556,8 +545,7 @@ class Result(DatabaseObject):
class Workseq(DatabaseObject): class Workseq(DatabaseObject):
_table = DatabaseTable( _table = DatabaseTable(
table = 'workseq', table = 'workseq',
columns = [ 'id', columns = [ 'create_time',
'create_time',
'state', 'state',
'hostid', 'hostid',
'wuid_last_done', 'wuid_last_done',