Commit 6ae2798c authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

Change projects, eliminate development migrations

Change Project's state field and ProjectMembershipHistory's person field;
replace all migrations starting 0015 with a single new one.

Need to check for missing data migrations.
parent 7304e6f0
......@@ -55,7 +55,7 @@ class Command(NoArgsCommand):
labels = (
'Application', 'Precursor', 'Status', 'Name', 'Project', 'Status'
)
columns = (11, 10, 10, 30, 10, 10)
columns = (11, 10, 14, 30, 10, 10)
if not options['csv']:
line = ' '.join(l.rjust(w) for l, w in zip(labels, columns))
......@@ -85,7 +85,7 @@ class Command(NoArgsCommand):
fields = (
str(app.id),
str(prec_id),
app.state,
app.state_display(),
app.name,
str(project_id),
status
......
......@@ -8,26 +8,301 @@ class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'PendingThirdPartyUser.first_name'
db.alter_column('im_pendingthirdpartyuser', 'first_name', self.gf('django.db.models.fields.CharField')(max_length=30, null=True))
# Removing unique constraint on 'AstakosUser', fields ['third_party_identifier', 'provider']
db.delete_unique('im_astakosuser', ['third_party_identifier', 'provider'])
# Changing field 'PendingThirdPartyUser.last_name'
db.alter_column('im_pendingthirdpartyuser', 'last_name', self.gf('django.db.models.fields.CharField')(max_length=30, null=True))
# Adding model 'Chain'
db.create_table('im_chain', (
('chain', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
))
db.send_create_signal('im', ['Chain'])
# Changing field 'PendingThirdPartyUser.affiliation'
db.alter_column('im_pendingthirdpartyuser', 'affiliation', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
# Adding model 'Project'
db.create_table('im_project', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('application', self.gf('django.db.models.fields.related.OneToOneField')(related_name='project', unique=True, to=orm['im.ProjectApplication'])),
('last_approval_date', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('deactivation_reason', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)),
('deactivation_date', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('creation_date', self.gf('django.db.models.fields.DateTimeField')()),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=80, db_index=True)),
('is_modified', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
('is_active', self.gf('django.db.models.fields.BooleanField')(default=True, db_index=True)),
('state', self.gf('django.db.models.fields.IntegerField')(default=1, db_index=True)),
))
db.send_create_signal('im', ['Project'])
# Adding model 'ProjectMembership'
db.create_table('im_projectmembership', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
('request_date', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2013, 1, 11, 12, 54, 30, 986304))),
('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Project'])),
('state', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True)),
('is_pending', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
('is_active', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
('application', self.gf('django.db.models.fields.related.ForeignKey')(related_name='memberships', null=True, to=orm['im.ProjectApplication'])),
('pending_application', self.gf('django.db.models.fields.related.ForeignKey')(related_name='pending_memebrships', null=True, to=orm['im.ProjectApplication'])),
('pending_serial', self.gf('django.db.models.fields.BigIntegerField')(null=True, db_index=True)),
('acceptance_date', self.gf('django.db.models.fields.DateField')(null=True, db_index=True)),
('leave_request_date', self.gf('django.db.models.fields.DateField')(null=True)),
))
db.send_create_signal('im', ['ProjectMembership'])
# Adding unique constraint on 'ProjectMembership', fields ['person', 'project']
db.create_unique('im_projectmembership', ['person_id', 'project_id'])
# Adding model 'ResourceMetadata'
db.create_table('im_resourcemetadata', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
('value', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('im', ['ResourceMetadata'])
# Adding model 'AstakosUserAuthProvider'
db.create_table('im_astakosuserauthprovider', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('affiliation', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True, blank=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='auth_providers', to=orm['im.AstakosUser'])),
('module', self.gf('django.db.models.fields.CharField')(default='local', max_length=255)),
('identifier', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('active', self.gf('django.db.models.fields.BooleanField')(default=True)),
('auth_backend', self.gf('django.db.models.fields.CharField')(default='astakos', max_length=255)),
('info_data', self.gf('django.db.models.fields.TextField')(default='', null=True, blank=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
))
db.send_create_signal('im', ['AstakosUserAuthProvider'])
# Adding unique constraint on 'AstakosUserAuthProvider', fields ['identifier', 'module', 'user']
db.create_unique('im_astakosuserauthprovider', ['identifier', 'module', 'user_id'])
# Adding model 'Serial'
db.create_table('im_serial', (
('serial', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
))
db.send_create_signal('im', ['Serial'])
# Adding model 'Resource'
db.create_table('im_resource', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
('service', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Service'])),
('desc', self.gf('django.db.models.fields.TextField')(null=True)),
('unit', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)),
('group', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)),
))
db.send_create_signal('im', ['Resource'])
# Adding M2M table for field meta on 'Resource'
db.create_table('im_resource_meta', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('resource', models.ForeignKey(orm['im.resource'], null=False)),
('resourcemetadata', models.ForeignKey(orm['im.resourcemetadata'], null=False))
))
db.create_unique('im_resource_meta', ['resource_id', 'resourcemetadata_id'])
# Adding unique constraint on 'Resource', fields ['name', 'service']
db.create_unique('im_resource', ['name', 'service_id'])
# Adding model 'SessionCatalog'
db.create_table('im_sessioncatalog', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('session_key', self.gf('django.db.models.fields.CharField')(max_length=40)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='sessions', null=True, to=orm['im.AstakosUser'])),
))
db.send_create_signal('im', ['SessionCatalog'])
# Adding model 'ProjectMembershipHistory'
db.create_table('im_projectmembershiphistory', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('person', self.gf('django.db.models.fields.BigIntegerField')()),
('project', self.gf('django.db.models.fields.BigIntegerField')()),
('date', self.gf('django.db.models.fields.DateField')(default=datetime.datetime.now)),
('reason', self.gf('django.db.models.fields.IntegerField')()),
('serial', self.gf('django.db.models.fields.BigIntegerField')()),
))
db.send_create_signal('im', ['ProjectMembershipHistory'])
# Adding model 'AstakosUserQuota'
db.create_table('im_astakosuserquota', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('capacity', self.gf('django.db.models.fields.BigIntegerField')(null=True)),
('quantity', self.gf('django.db.models.fields.BigIntegerField')(null=True)),
('export_limit', self.gf('django.db.models.fields.BigIntegerField')(null=True)),
('import_limit', self.gf('django.db.models.fields.BigIntegerField')(null=True)),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
))
db.send_create_signal('im', ['AstakosUserQuota'])
# Adding unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.create_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Adding model 'ProjectResourceGrant'
db.create_table('im_projectresourcegrant', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('project_application', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.ProjectApplication'], null=True)),
('project_capacity', self.gf('synnefo.lib.db.intdecimalfield.IntDecimalField')(default=100000000000000000000000000000000L, max_digits=38, decimal_places=0)),
('project_import_limit', self.gf('synnefo.lib.db.intdecimalfield.IntDecimalField')(default=100000000000000000000000000000000L, max_digits=38, decimal_places=0)),
('project_export_limit', self.gf('synnefo.lib.db.intdecimalfield.IntDecimalField')(default=100000000000000000000000000000000L, max_digits=38, decimal_places=0)),
('member_capacity', self.gf('synnefo.lib.db.intdecimalfield.IntDecimalField')(default=100000000000000000000000000000000L, max_digits=38, decimal_places=0)),
('member_import_limit', self.gf('synnefo.lib.db.intdecimalfield.IntDecimalField')(default=100000000000000000000000000000000L, max_digits=38, decimal_places=0)),
('member_export_limit', self.gf('synnefo.lib.db.intdecimalfield.IntDecimalField')(default=100000000000000000000000000000000L, max_digits=38, decimal_places=0)),
))
db.send_create_signal('im', ['ProjectResourceGrant'])
# Adding unique constraint on 'ProjectResourceGrant', fields ['resource', 'project_application']
db.create_unique('im_projectresourcegrant', ['resource_id', 'project_application_id'])
# Adding model 'PendingThirdPartyUser'
db.create_table('im_pendingthirdpartyuser', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('third_party_identifier', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('provider', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('email', self.gf('django.db.models.fields.EmailField')(max_length=75, null=True, blank=True)),
('first_name', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
('last_name', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
('affiliation', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)),
('token', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True)),
('info', self.gf('django.db.models.fields.TextField')(default='', null=True, blank=True)),
))
db.send_create_signal('im', ['PendingThirdPartyUser'])
# Adding unique constraint on 'PendingThirdPartyUser', fields ['provider', 'third_party_identifier']
db.create_unique('im_pendingthirdpartyuser', ['provider', 'third_party_identifier'])
# Adding model 'ProjectApplication'
db.create_table('im_projectapplication', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('applicant', self.gf('django.db.models.fields.related.ForeignKey')(related_name='projects_applied', to=orm['im.AstakosUser'])),
('state', self.gf('django.db.models.fields.IntegerField')(default=0)),
('owner', self.gf('django.db.models.fields.related.ForeignKey')(related_name='projects_owned', to=orm['im.AstakosUser'])),
('chain', self.gf('django.db.models.fields.IntegerField')()),
('precursor_application', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['im.ProjectApplication'], unique=True, null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=80)),
('homepage', self.gf('django.db.models.fields.URLField')(max_length=255, null=True)),
('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('start_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('end_date', self.gf('django.db.models.fields.DateTimeField')()),
('member_join_policy', self.gf('django.db.models.fields.IntegerField')()),
('member_leave_policy', self.gf('django.db.models.fields.IntegerField')()),
('limit_on_members_number', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)),
('comments', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('issue_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
))
db.send_create_signal('im', ['ProjectApplication'])
# Adding unique constraint on 'ProjectApplication', fields ['chain', 'id']
db.create_unique('im_projectapplication', ['chain', 'id'])
# Adding field 'Service.order'
db.add_column('im_service', 'order', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
# Adding index on 'Service', fields ['name']
db.create_index('im_service', ['name'])
# Adding field 'AstakosUser.uuid'
db.add_column('im_astakosuser', 'uuid', self.gf('django.db.models.fields.CharField')(max_length=255, unique=True, null=True), keep_default=False)
# Adding field 'AstakosUser.disturbed_quota'
db.add_column('im_astakosuser', 'disturbed_quota', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True), keep_default=False)
# Changing field 'AstakosUser.affiliation'
db.alter_column('im_astakosuser', 'affiliation', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
# Changing field 'AstakosUser.provider'
db.alter_column('im_astakosuser', 'provider', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
def backwards(self, orm):
# Changing field 'PendingThirdPartyUser.first_name'
db.alter_column('im_pendingthirdpartyuser', 'first_name', self.gf('django.db.models.fields.CharField')(default='', max_length=30))
# Removing index on 'Service', fields ['name']
db.delete_index('im_service', ['name'])
# Removing unique constraint on 'ProjectApplication', fields ['chain', 'id']
db.delete_unique('im_projectapplication', ['chain', 'id'])
# Removing unique constraint on 'PendingThirdPartyUser', fields ['provider', 'third_party_identifier']
db.delete_unique('im_pendingthirdpartyuser', ['provider', 'third_party_identifier'])
# Removing unique constraint on 'ProjectResourceGrant', fields ['resource', 'project_application']
db.delete_unique('im_projectresourcegrant', ['resource_id', 'project_application_id'])
# Removing unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.delete_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Removing unique constraint on 'Resource', fields ['name', 'service']
db.delete_unique('im_resource', ['name', 'service_id'])
# Removing unique constraint on 'AstakosUserAuthProvider', fields ['identifier', 'module', 'user']
db.delete_unique('im_astakosuserauthprovider', ['identifier', 'module', 'user_id'])
# Removing unique constraint on 'ProjectMembership', fields ['person', 'project']
db.delete_unique('im_projectmembership', ['person_id', 'project_id'])
# Deleting model 'Chain'
db.delete_table('im_chain')
# Deleting model 'Project'
db.delete_table('im_project')
# Deleting model 'ProjectMembership'
db.delete_table('im_projectmembership')
# Deleting model 'ResourceMetadata'
db.delete_table('im_resourcemetadata')
# Deleting model 'AstakosUserAuthProvider'
db.delete_table('im_astakosuserauthprovider')
# Deleting model 'Serial'
db.delete_table('im_serial')
# Deleting model 'Resource'
db.delete_table('im_resource')
# Removing M2M table for field meta on 'Resource'
db.delete_table('im_resource_meta')
# Deleting model 'SessionCatalog'
db.delete_table('im_sessioncatalog')
# Deleting model 'ProjectMembershipHistory'
db.delete_table('im_projectmembershiphistory')
# Deleting model 'AstakosUserQuota'
db.delete_table('im_astakosuserquota')
# Deleting model 'ProjectResourceGrant'
db.delete_table('im_projectresourcegrant')
# Deleting model 'PendingThirdPartyUser'
db.delete_table('im_pendingthirdpartyuser')
# Deleting model 'ProjectApplication'
db.delete_table('im_projectapplication')
# Deleting field 'Service.order'
db.delete_column('im_service', 'order')
# Deleting field 'AstakosUser.uuid'
db.delete_column('im_astakosuser', 'uuid')
# Deleting field 'AstakosUser.disturbed_quota'
db.delete_column('im_astakosuser', 'disturbed_quota')
# Changing field 'AstakosUser.affiliation'
db.alter_column('im_astakosuser', 'affiliation', self.gf('django.db.models.fields.CharField')(default='', max_length=255))
# Changing field 'PendingThirdPartyUser.last_name'
db.alter_column('im_pendingthirdpartyuser', 'last_name', self.gf('django.db.models.fields.CharField')(default='', max_length=30))
# Changing field 'AstakosUser.provider'
db.alter_column('im_astakosuser', 'provider', self.gf('django.db.models.fields.CharField')(default='', max_length=255))
# Changing field 'PendingThirdPartyUser.affiliation'
db.alter_column('im_pendingthirdpartyuser', 'affiliation', self.gf('django.db.models.fields.CharField')(default='', max_length=255))
# Adding unique constraint on 'AstakosUser', fields ['third_party_identifier', 'provider']
db.create_unique('im_astakosuser', ['third_party_identifier', 'provider'])
models = {
......@@ -75,7 +350,7 @@ class Migration(SchemaMigration):
},
'im.approvalterms': {
'Meta': {'object_name': 'ApprovalTerms'},
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 11, 10, 45, 47, 968841)', 'db_index': 'True'}),
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 11, 12, 54, 30, 982234)', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
......@@ -132,7 +407,7 @@ class Migration(SchemaMigration):
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 11, 10, 45, 47, 969658)'}),
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 11, 12, 54, 30, 983023)'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
},
'im.invitation': {
......@@ -192,7 +467,7 @@ class Migration(SchemaMigration):
'precursor_application': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['im.ProjectApplication']", 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}),
'start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'Pending'", 'max_length': '80'})
'state': ('django.db.models.fields.IntegerField', [], {'default': '0'})
},
'im.projectmembership': {
'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'},
......@@ -206,14 +481,14 @@ class Migration(SchemaMigration):
'pending_serial': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'db_index': 'True'}),
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}),
'request_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2013, 1, 11, 10, 45, 47, 973568)'}),
'request_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2013, 1, 11, 12, 54, 30, 986304)'}),
'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
},
'im.projectmembershiphistory': {
'Meta': {'object_name': 'ProjectMembershipHistory'},
'date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'person': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'person': ('django.db.models.fields.BigIntegerField', [], {}),
'project': ('django.db.models.fields.BigIntegerField', [], {}),
'reason': ('django.db.models.fields.IntegerField', [], {}),
'serial': ('django.db.models.fields.BigIntegerField', [], {})
......
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'GroupKind'
db.create_table('im_groupkind', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
))
db.send_create_signal('im', ['GroupKind'])
# Adding model 'AstakosGroup'
db.create_table('im_astakosgroup', (
('group_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.Group'], unique=True, primary_key=True)),
('kind', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.GroupKind'])),
('desc', self.gf('django.db.models.fields.TextField')(null=True)),
('creation_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2012, 12, 4, 9, 50, 9, 334623))),
('issue_date', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('expiration_date', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('moderation_enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
('approval_date', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('estimated_participants', self.gf('django.db.models.fields.PositiveIntegerField')(null=True)),
))
db.send_create_signal('im', ['AstakosGroup'])
# Adding model 'ResourceMetadata'
db.create_table('im_resourcemetadata', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
('value', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('im', ['ResourceMetadata'])
# Adding model 'AstakosGroupQuota'
db.create_table('im_astakosgroupquota', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('limit', self.gf('django.db.models.fields.PositiveIntegerField')()),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosGroup'], blank=True)),
))
db.send_create_signal('im', ['AstakosGroupQuota'])
# Adding unique constraint on 'AstakosGroupQuota', fields ['resource', 'group']
db.create_unique('im_astakosgroupquota', ['resource_id', 'group_id'])
# Adding model 'Resource'
db.create_table('im_resource', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
('service', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Service'])),
))
db.send_create_signal('im', ['Resource'])
# Adding M2M table for field meta on 'Resource'
db.create_table('im_resource_meta', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('resource', models.ForeignKey(orm['im.resource'], null=False)),
('resourcemetadata', models.ForeignKey(orm['im.resourcemetadata'], null=False))
))
db.create_unique('im_resource_meta', ['resource_id', 'resourcemetadata_id'])
# Adding model 'Membership'
db.create_table('im_membership', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosGroup'])),
('date_requested', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2012, 12, 4, 9, 50, 9, 338510))),
('date_joined', self.gf('django.db.models.fields.DateField')(null=True, db_index=True)),
))
db.send_create_signal('im', ['Membership'])
# Adding unique constraint on 'Membership', fields ['person', 'group']
db.create_unique('im_membership', ['person_id', 'group_id'])
# Adding model 'AstakosUserQuota'
db.create_table('im_astakosuserquota', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('limit', self.gf('django.db.models.fields.PositiveIntegerField')()),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
))
db.send_create_signal('im', ['AstakosUserQuota'])
# Adding unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.create_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Adding index on 'Service', fields ['name']
db.create_index('im_service', ['name'])
# Adding M2M table for field owner on 'AstakosUser'
db.create_table('im_astakosuser_owner', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('astakosuser', models.ForeignKey(orm['im.astakosuser'], null=False)),
('astakosgroup', models.ForeignKey(orm['im.astakosgroup'], null=False))
))
db.create_unique('im_astakosuser_owner', ['astakosuser_id', 'astakosgroup_id'])
def backwards(self, orm):
# Removing index on 'Service', fields ['name']
db.delete_index('im_service', ['name'])
# Removing unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.delete_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Removing unique constraint on 'Membership', fields ['person', 'group']
db.delete_unique('im_membership', ['person_id', 'group_id'])
# Removing unique constraint on 'AstakosGroupQuota', fields ['resource', 'group']
db.delete_unique('im_astakosgroupquota', ['resource_id', 'group_id'])
# Deleting model 'GroupKind'
db.delete_table('im_groupkind')
# Deleting model 'AstakosGroup'
db.delete_table('im_astakosgroup')
# Deleting model 'ResourceMetadata'
db.delete_table('im_resourcemetadata')
# Deleting model 'AstakosGroupQuota'
db.delete_table('im_astakosgroupquota')
# Deleting model 'Resource'
db.delete_table('im_resource')
# Removing M2M table for field meta on 'Resource'
db.delete_table('im_resource_meta')
# Deleting model 'Membership'
db.delete_table('im_membership')
# Deleting model 'AstakosUserQuota'
db.delete_table('im_astakosuserquota')
# Removing M2M table for field owner on 'AstakosUser'
db.delete_table('im_astakosuser_owner')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},