Commit 2b9aaa57 authored by fred's avatar fred

Upgrade to Django 1.7 migrations

parent dca16c31
# -*- coding: 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 'Subscriber'
db.create_table(u'newsletter_subscriber', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('email', self.gf('django.db.models.fields.EmailField')(unique=True, max_length=75)),
('inscription_date', self.gf('django.db.models.fields.DateField')(auto_now_add=True, blank=True)),
('is_validated', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
('is_registered', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
('password', self.gf('django.db.models.fields.CharField')(max_length=100)),
))
db.send_create_signal(u'newsletter', ['Subscriber'])
def backwards(self, orm):
# Deleting model 'Subscriber'
db.delete_table(u'newsletter_subscriber')
models = {
u'newsletter.subscriber': {
'Meta': {'object_name': 'Subscriber'},
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inscription_date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'is_registered': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'is_validated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['newsletter']
\ No newline at end of file
from __future__ import unicode_literals
from django.db import models, migrations
import ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Newsletter',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('subject', models.CharField(max_length=50, verbose_name='Title')),
('date', models.DateField(verbose_name='Date')),
('text', ckeditor.fields.RichTextField(null=True, verbose_name='Text', blank=True)),
('expedition_datetime', models.DateTimeField(null=True, verbose_name='Expedition Date/time', blank=True)),
],
options={
'ordering': ['date'],
'verbose_name': 'Newsletter',
'verbose_name_plural': 'Newsletters',
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Subscriber',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('email', models.EmailField(unique=True, max_length=75)),
('inscription_date', models.DateField(auto_now_add=True)),
('is_validated', models.NullBooleanField()),
('is_registered', models.NullBooleanField()),
('password', models.CharField(max_length=100)),
],
options={
},
bases=(models.Model,),
),
]
# -*- coding: 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 'Newsletter'
db.create_table(u'newsletter_newsletter', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('subject', self.gf('django.db.models.fields.CharField')(max_length=50)),
('date', self.gf('django.db.models.fields.DateField')()),
('text', self.gf('ckeditor.fields.RichTextField')(null=True, blank=True)),
('expedition_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
))
db.send_create_signal(u'newsletter', ['Newsletter'])
def backwards(self, orm):
# Deleting model 'Newsletter'
db.delete_table(u'newsletter_newsletter')
models = {
u'newsletter.newsletter': {
'Meta': {'ordering': "['date']", 'object_name': 'Newsletter'},
'date': ('django.db.models.fields.DateField', [], {}),
'expedition_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'text': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'})
},
u'newsletter.subscriber': {
'Meta': {'object_name': 'Subscriber'},
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inscription_date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'is_registered': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'is_validated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['newsletter']
\ No newline at end of file
# -*- coding: 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):
# Deleting field 'Newsletter.expedition_date'
db.delete_column(u'newsletter_newsletter', 'expedition_date')
# Adding field 'Newsletter.expedition_datetime'
db.add_column(u'newsletter_newsletter', 'expedition_datetime',
self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
keep_default=False)
def backwards(self, orm):
# Adding field 'Newsletter.expedition_date'
db.add_column(u'newsletter_newsletter', 'expedition_date',
self.gf('django.db.models.fields.DateField')(null=True, blank=True),
keep_default=False)
# Deleting field 'Newsletter.expedition_datetime'
db.delete_column(u'newsletter_newsletter', 'expedition_datetime')
models = {
u'newsletter.newsletter': {
'Meta': {'ordering': "['date']", 'object_name': 'Newsletter'},
'date': ('django.db.models.fields.DateField', [], {}),
'expedition_datetime': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'text': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'})
},
u'newsletter.subscriber': {
'Meta': {'object_name': 'Subscriber'},
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inscription_date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'is_registered': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'is_validated': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['newsletter']
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment