-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
169 additions
and
4 deletions.
There are no files selected for viewing
156 changes: 156 additions & 0 deletions
156
...migrations/0005_auto__add_finetoothuser__add_field_comment_commenter__add_field_vote_v.py
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,156 @@ | ||
# -*- 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 'FinetoothUser' | ||
db.create_table('core_finetoothuser', ( | ||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | ||
('password', self.gf('django.db.models.fields.CharField')(max_length=128)), | ||
('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), | ||
('is_superuser', self.gf('django.db.models.fields.BooleanField')(default=False)), | ||
('username', self.gf('django.db.models.fields.CharField')(max_length=30, unique=True)), | ||
('first_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)), | ||
('last_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)), | ||
('email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)), | ||
('is_staff', self.gf('django.db.models.fields.BooleanField')(default=False)), | ||
('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)), | ||
('date_joined', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), | ||
('location', self.gf('django.db.models.fields.CharField')(max_length=100)), | ||
('url', self.gf('django.db.models.fields.URLField')(max_length=200)), | ||
)) | ||
db.send_create_signal('core', ['FinetoothUser']) | ||
|
||
# Adding M2M table for field groups on 'FinetoothUser' | ||
m2m_table_name = db.shorten_name('core_finetoothuser_groups') | ||
db.create_table(m2m_table_name, ( | ||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), | ||
('finetoothuser', models.ForeignKey(orm['core.finetoothuser'], null=False)), | ||
('group', models.ForeignKey(orm['auth.group'], null=False)) | ||
)) | ||
db.create_unique(m2m_table_name, ['finetoothuser_id', 'group_id']) | ||
|
||
# Adding M2M table for field user_permissions on 'FinetoothUser' | ||
m2m_table_name = db.shorten_name('core_finetoothuser_user_permissions') | ||
db.create_table(m2m_table_name, ( | ||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), | ||
('finetoothuser', models.ForeignKey(orm['core.finetoothuser'], null=False)), | ||
('permission', models.ForeignKey(orm['auth.permission'], null=False)) | ||
)) | ||
db.create_unique(m2m_table_name, ['finetoothuser_id', 'permission_id']) | ||
|
||
# Adding field 'Comment.commenter' | ||
db.add_column('core_comment', 'commenter', | ||
self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['core.FinetoothUser']), | ||
keep_default=False) | ||
|
||
# Adding field 'Vote.voter' | ||
db.add_column('core_vote', 'voter', | ||
self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['core.FinetoothUser']), | ||
keep_default=False) | ||
|
||
# Adding field 'Post.author' | ||
db.add_column('core_post', 'author', | ||
self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['core.FinetoothUser']), | ||
keep_default=False) | ||
|
||
|
||
def backwards(self, orm): | ||
# Deleting model 'FinetoothUser' | ||
db.delete_table('core_finetoothuser') | ||
|
||
# Removing M2M table for field groups on 'FinetoothUser' | ||
db.delete_table(db.shorten_name('core_finetoothuser_groups')) | ||
|
||
# Removing M2M table for field user_permissions on 'FinetoothUser' | ||
db.delete_table(db.shorten_name('core_finetoothuser_user_permissions')) | ||
|
||
# Deleting field 'Comment.commenter' | ||
db.delete_column('core_comment', 'commenter_id') | ||
|
||
# Deleting field 'Vote.voter' | ||
db.delete_column('core_vote', 'voter_id') | ||
|
||
# Deleting field 'Post.author' | ||
db.delete_column('core_post', 'author_id') | ||
|
||
|
||
models = { | ||
'auth.group': { | ||
'Meta': {'object_name': 'Group'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}), | ||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'blank': 'True', 'to': "orm['auth.Permission']"}) | ||
}, | ||
'auth.permission': { | ||
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, | ||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | ||
}, | ||
'contenttypes.contenttype': { | ||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'", 'object_name': 'ContentType'}, | ||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | ||
}, | ||
'core.comment': { | ||
'Meta': {'object_name': 'Comment'}, | ||
'commenter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.FinetoothUser']"}), | ||
'content': ('django.db.models.fields.TextField', [], {}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'post': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Post']"}) | ||
}, | ||
'core.commentvote': { | ||
'Meta': {'_ormbases': ['core.Vote'], 'object_name': 'CommentVote'}, | ||
'comment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Comment']"}), | ||
'vote_ptr': ('django.db.models.fields.related.OneToOneField', [], {'primary_key': 'True', 'unique': 'True', 'to': "orm['core.Vote']"}) | ||
}, | ||
'core.finetoothuser': { | ||
'Meta': {'object_name': 'FinetoothUser'}, | ||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | ||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | ||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'blank': 'True', 'to': "orm['auth.Group']", 'related_name': "'user_set'"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | ||
'location': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | ||
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), | ||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'blank': 'True', 'to': "orm['auth.Permission']", 'related_name': "'user_set'"}), | ||
'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'}) | ||
}, | ||
'core.post': { | ||
'Meta': {'object_name': 'Post'}, | ||
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.FinetoothUser']"}), | ||
'content': ('django.db.models.fields.TextField', [], {}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) | ||
}, | ||
'core.postvote': { | ||
'Meta': {'_ormbases': ['core.Vote'], 'object_name': 'PostVote'}, | ||
'post': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Post']"}), | ||
'vote_ptr': ('django.db.models.fields.related.OneToOneField', [], {'primary_key': 'True', 'unique': 'True', 'to': "orm['core.Vote']"}) | ||
}, | ||
'core.vote': { | ||
'Meta': {'object_name': 'Vote'}, | ||
'end_index': ('django.db.models.fields.PositiveIntegerField', [], {}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'start_index': ('django.db.models.fields.PositiveIntegerField', [], {}), | ||
'value': ('django.db.models.fields.IntegerField', [], {}), | ||
'voter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.FinetoothUser']"}) | ||
} | ||
} | ||
|
||
complete_apps = ['core'] |
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
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