|
| 1 | +# encoding: utf-8 |
| 2 | +import datetime |
| 3 | +from south.db import db |
| 4 | +from south.v2 import SchemaMigration |
| 5 | +from django.db import models |
| 6 | + |
| 7 | +class Migration(SchemaMigration): |
| 8 | + |
| 9 | + def forwards(self, orm): |
| 10 | + |
| 11 | + # Removing unique constraint on 'SelectedNotificationsType', fields ['user', 'notification_type'] |
| 12 | + db.delete_unique('notifications_selectednotificationstype', ['user_id', 'notification_type']) |
| 13 | + |
| 14 | + # Deleting model 'SelectedNotificationsType' |
| 15 | + db.delete_table('notifications_selectednotificationstype') |
| 16 | + |
| 17 | + # Adding model 'DisabledNotificationsTypeBackend' |
| 18 | + db.create_table('notifications_disablednotificationstypebackend', ( |
| 19 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 20 | + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), |
| 21 | + ('notification_type', self.gf('django.db.models.fields.CharField')(max_length=255)), |
| 22 | + ('notification_backends', self.gf('django.db.models.fields.TextField')()), |
| 23 | + )) |
| 24 | + db.send_create_signal('notifications', ['DisabledNotificationsTypeBackend']) |
| 25 | + |
| 26 | + # Adding unique constraint on 'DisabledNotificationsTypeBackend', fields ['user', 'notification_type'] |
| 27 | + db.create_unique('notifications_disablednotificationstypebackend', ['user_id', 'notification_type']) |
| 28 | + |
| 29 | + |
| 30 | + def backwards(self, orm): |
| 31 | + |
| 32 | + # Removing unique constraint on 'DisabledNotificationsTypeBackend', fields ['user', 'notification_type'] |
| 33 | + db.delete_unique('notifications_disablednotificationstypebackend', ['user_id', 'notification_type']) |
| 34 | + |
| 35 | + # Adding model 'SelectedNotificationsType' |
| 36 | + db.create_table('notifications_selectednotificationstype', ( |
| 37 | + ('notification_type', self.gf('django.db.models.fields.CharField')(max_length=255)), |
| 38 | + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 39 | + ('notification_backends', self.gf('django.db.models.fields.TextField')()), |
| 40 | + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), |
| 41 | + )) |
| 42 | + db.send_create_signal('notifications', ['SelectedNotificationsType']) |
| 43 | + |
| 44 | + # Adding unique constraint on 'SelectedNotificationsType', fields ['user', 'notification_type'] |
| 45 | + db.create_unique('notifications_selectednotificationstype', ['user_id', 'notification_type']) |
| 46 | + |
| 47 | + # Deleting model 'DisabledNotificationsTypeBackend' |
| 48 | + db.delete_table('notifications_disablednotificationstypebackend') |
| 49 | + |
| 50 | + |
| 51 | + models = { |
| 52 | + 'auth.group': { |
| 53 | + 'Meta': {'object_name': 'Group'}, |
| 54 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 55 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
| 56 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
| 57 | + }, |
| 58 | + 'auth.permission': { |
| 59 | + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
| 60 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 61 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
| 62 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 63 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
| 64 | + }, |
| 65 | + 'auth.user': { |
| 66 | + 'Meta': {'object_name': 'User'}, |
| 67 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
| 68 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'unique': 'True', 'null': 'True'}), |
| 69 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
| 70 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
| 71 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 72 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
| 73 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
| 74 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
| 75 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
| 76 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
| 77 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
| 78 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
| 79 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
| 80 | + }, |
| 81 | + 'contenttypes.contenttype': { |
| 82 | + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
| 83 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 84 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 85 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 86 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
| 87 | + }, |
| 88 | + 'notifications.disablednotificationstypebackend': { |
| 89 | + 'Meta': {'unique_together': "(['user', 'notification_type'],)", 'object_name': 'DisabledNotificationsTypeBackend'}, |
| 90 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 91 | + 'notification_backends': ('django.db.models.fields.TextField', [], {}), |
| 92 | + 'notification_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
| 93 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) |
| 94 | + }, |
| 95 | + 'notifications.notificationbackendsettings': { |
| 96 | + 'Meta': {'unique_together': "(['user', 'notification_backend'],)", 'object_name': 'NotificationBackendSettings'}, |
| 97 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 98 | + 'notification_backend': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
| 99 | + 'settings': ('django.db.models.fields.TextField', [], {'default': "'{}'"}), |
| 100 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) |
| 101 | + }, |
| 102 | + 'notifications.notificationqueue': { |
| 103 | + 'Meta': {'object_name': 'NotificationQueue'}, |
| 104 | + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 105 | + 'notification_backend': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
| 106 | + 'subject': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
| 107 | + 'text': ('django.db.models.fields.TextField', [], {'blank': 'True'}), |
| 108 | + 'tries': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), |
| 109 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notifications'", 'to': "orm['auth.User']"}) |
| 110 | + } |
| 111 | + } |
| 112 | + |
| 113 | + complete_apps = ['notifications'] |
0 commit comments