-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Drayer
committed
Jul 17, 2015
1 parent
52e411d
commit b7fefaa
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# -*- coding: utf-8 -*- | ||
from south.utils import datetime_utils as 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 'Organization' | ||
db.create_table('organizations_organization', ( | ||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | ||
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), | ||
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), | ||
('name', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), | ||
('description', self.gf('django.db.models.fields.TextField')()), | ||
('active', self.gf('django.db.models.fields.BooleanField')(default=True)), | ||
)) | ||
db.send_create_signal('organizations', ['Organization']) | ||
|
||
# Adding model 'OrganizationCourse' | ||
db.create_table('organizations_organizationcourse', ( | ||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | ||
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), | ||
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), | ||
('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), | ||
('organization', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['organizations.Organization'])), | ||
('active', self.gf('django.db.models.fields.BooleanField')(default=True)), | ||
)) | ||
db.send_create_signal('organizations', ['OrganizationCourse']) | ||
|
||
# Adding unique constraint on 'OrganizationCourse', fields ['course_id', 'organization'] | ||
db.create_unique('organizations_organizationcourse', ['course_id', 'organization_id']) | ||
|
||
|
||
def backwards(self, orm): | ||
# Removing unique constraint on 'OrganizationCourse', fields ['course_id', 'organization'] | ||
db.delete_unique('organizations_organizationcourse', ['course_id', 'organization_id']) | ||
|
||
# Deleting model 'Organization' | ||
db.delete_table('organizations_organization') | ||
|
||
# Deleting model 'OrganizationCourse' | ||
db.delete_table('organizations_organizationcourse') | ||
|
||
|
||
models = { | ||
'organizations.organization': { | ||
'Meta': {'object_name': 'Organization'}, | ||
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), | ||
'description': ('django.db.models.fields.TextField', [], {}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) | ||
}, | ||
'organizations.organizationcourse': { | ||
'Meta': {'unique_together': "(('course_id', 'organization'),)", 'object_name': 'OrganizationCourse'}, | ||
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), | ||
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), | ||
'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}) | ||
} | ||
} | ||
|
||
complete_apps = ['organizations'] |
Empty file.