Change back the way we guess the public group (as per Greg) and add a

deleted column to Group so groups can be undeleted.

ALTER TABLE galaxy_group ADD COLUMN deleted BOOLEAN;
This commit is contained in:
Nate Coraor
2008-08-12 14:53:22 -04:00
parent 56b45a3fce
commit d4474cd22f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ class Group( object ):
def guess_public_group( cls ):
# TODO, Nate: Make sure this method is functionally correct.
#retrieve from database and store public group id, assume first created group is public
cls.set_public_group( Group.select_by( name = 'public' ) )
cls.set_public_group( Group.select( order_by = Group.table.c.create_time )[0] )
class UserGroupAssociation( object ):
def __init__( self, user, group ):
+2 -1
View File
@@ -120,7 +120,8 @@ Group.table = Table( "galaxy_group", metadata,
Column( "create_time", DateTime, default=now ),
Column( "update_time", DateTime, default=now, onupdate=now ),
Column( "name", TEXT ),
Column( "priority", Integer ) )
Column( "priority", Integer ),
Column( "deleted", Boolean, index=True, default=False ) )
UserGroupAssociation.table = Table( "user_group_association", metadata,
Column( "id", Integer, primary_key=True ),