forked from un33k/django-emailmgr
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
7a64543
commit 0942cdc
Showing
4 changed files
with
47 additions
and
175 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 |
---|---|---|
@@ -1,83 +1,39 @@ | ||
# 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 'EmailAddress' | ||
db.create_table('emailmgr_emailaddress', ( | ||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | ||
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='emailaddress', to=orm['auth.User'])), | ||
('email', self.gf('django.db.models.fields.EmailField')(max_length=75)), | ||
('is_primary', self.gf('django.db.models.fields.BooleanField')(default=False)), | ||
('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)), | ||
('identifier', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)), | ||
)) | ||
db.send_create_signal('emailmgr', ['EmailAddress']) | ||
|
||
# Adding unique constraint on 'EmailAddress', fields ['user', 'email'] | ||
db.create_unique('emailmgr_emailaddress', ['user_id', 'email']) | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# Removing unique constraint on 'EmailAddress', fields ['user', 'email'] | ||
db.delete_unique('emailmgr_emailaddress', ['user_id', 'email']) | ||
|
||
# Deleting model 'EmailAddress' | ||
db.delete_table('emailmgr_emailaddress') | ||
|
||
|
||
models = { | ||
'auth.group': { | ||
'Meta': {'object_name': 'Group'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | ||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | ||
}, | ||
'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'}) | ||
}, | ||
'auth.user': { | ||
'Meta': {'object_name': 'User'}, | ||
'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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | ||
'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'}), | ||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | ||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | ||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | ||
}, | ||
'contenttypes.contenttype': { | ||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, | ||
'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'}) | ||
}, | ||
'emailmgr.emailaddress': { | ||
'Meta': {'unique_together': "(('user', 'email'),)", 'object_name': 'EmailAddress'}, | ||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), | ||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'is_primary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailaddress'", 'to': "orm['auth.User']"}) | ||
} | ||
} | ||
|
||
complete_apps = ['emailmgr'] | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.6 on 2017-03-19 15:00 | ||
from __future__ import unicode_literals | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='EmailAddress', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('email', models.EmailField(max_length=254, verbose_name='Email Address')), | ||
('is_primary', models.BooleanField(default=False)), | ||
('is_active', models.BooleanField(default=False)), | ||
('is_activation_sent', models.BooleanField(default=False)), | ||
('identifier', models.CharField(max_length=255, null=True)), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='emailaddress', to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name': 'email address', | ||
'verbose_name_plural': 'email addresses', | ||
}, | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='emailaddress', | ||
unique_together=set([('user', 'email')]), | ||
), | ||
] |
70 changes: 0 additions & 70 deletions
70
emailmgr/migrations/0002_auto__add_field_emailaddress_is_activation_sent.py
This file was deleted.
Oops, something went wrong.
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