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-initialpull/1/head
parent
c7ddfa1fed
commit
4ff63359b3
|
@ -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),
|
||||
),
|
||||
]
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue