migration to repair db

The migrations needed to migrate our db to django 1.8 are as follows:
django-admin.py migrate default 0001_initial --fake
django-admin.py migrate --fake-initial auth
django-admin.py migrate default 0002_add_related_name --fake
django-admin.py migrate core --fake
django-admin.py migrate libraryauth
django-admin.py migrate --fake-initial
pull/1/head
eric 2016-07-28 10:10:05 -04:00
parent c7ddfa1fed
commit 4ff63359b3
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import social
# this migration repairs the state of our database so that social auth migrations can be applied
class Migration(migrations.Migration):
dependencies =[
('libraryauth', '0001_initial'),
]
operations = [] if settings.TESTING else [
migrations.CreateModel(
name='Code',
fields=[
('id', models.AutoField(
verbose_name='ID', serialize=False, auto_created=True,
primary_key=True)),
('email', models.EmailField(max_length=75)),
('code', models.CharField(max_length=32, db_index=True)),
('verified', models.BooleanField(default=False)),
],
options={
'db_table': 'social_auth_code',
},
bases=(models.Model, social.storage.django_orm.DjangoCodeMixin),
),
]

View File

@ -1,5 +1,6 @@
import datetime
import mimetypes
import sys
from os.path import dirname, realpath, join
import regluit
@ -12,6 +13,7 @@ LANGUAGES = (
('en', 'English'),
)
LOCAL_TEST = False
TESTING = sys.argv[1:2] == ['test'] # detect if we're running tests (used to turn off a repair migration)
ALLOWED_HOSTS = ['.unglue.it', '.unglueit.com',]
WISHED_LANGS = ('en','fr','es','de','el','pt','it','ru','cs','ja','zh','nl','ut','ar','la','id','ca','fa','sv','sl','ko','tr')