mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Moved South migrations out of the way and added Django migrations.
This commit is contained in:
parent
69221ba2b4
commit
6e2c4503e5
5 changed files with 58 additions and 29 deletions
|
|
@ -235,6 +235,8 @@ v1.0 (unreleased)
|
|||
* Added new autofill feature for the database backend cache which is enabled
|
||||
by default.
|
||||
|
||||
* Added Django >= 1.7 migrations and moved South migrations to own folder.
|
||||
Please upgrade to South >= 1.0 to use the new South migration location.
|
||||
|
||||
v0.6 (2013/04/12)
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
|
|
@ -1,33 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import picklefield.fields
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = []
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding model 'Constance'
|
||||
db.create_table('constance_config', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(
|
||||
primary_key=True)),
|
||||
('key', self.gf('django.db.models.fields.TextField')()),
|
||||
('value', self.gf('picklefield.fields.PickledObjectField')()),
|
||||
))
|
||||
db.send_create_signal('database', ['Constance'])
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'Constance'
|
||||
db.delete_table('constance_config')
|
||||
|
||||
models = {
|
||||
'database.constance': {
|
||||
'Meta': {'object_name': 'Constance',
|
||||
'db_table': "'constance_config'"},
|
||||
'id': ('django.db.models.fields.AutoField', [],
|
||||
{'primary_key': 'True'}),
|
||||
'key': ('django.db.models.fields.TextField', [], {}),
|
||||
'value': ('picklefield.fields.PickledObjectField', [], {})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['database']
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Constance',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True,
|
||||
auto_created=True, serialize=False)),
|
||||
('key', models.CharField(unique=True, max_length=255)),
|
||||
('value', picklefield.fields.PickledObjectField(editable=False)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'constance',
|
||||
'verbose_name_plural': 'constances',
|
||||
'db_table': 'constance_config',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
||||
|
|
|
|||
33
constance/backends/database/south_migrations/0001_initial.py
Normal file
33
constance/backends/database/south_migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding model 'Constance'
|
||||
db.create_table('constance_config', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(
|
||||
primary_key=True)),
|
||||
('key', self.gf('django.db.models.fields.TextField')()),
|
||||
('value', self.gf('picklefield.fields.PickledObjectField')()),
|
||||
))
|
||||
db.send_create_signal('database', ['Constance'])
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'Constance'
|
||||
db.delete_table('constance_config')
|
||||
|
||||
models = {
|
||||
'database.constance': {
|
||||
'Meta': {'object_name': 'Constance',
|
||||
'db_table': "'constance_config'"},
|
||||
'id': ('django.db.models.fields.AutoField', [],
|
||||
{'primary_key': 'True'}),
|
||||
'key': ('django.db.models.fields.TextField', [], {}),
|
||||
'value': ('picklefield.fields.PickledObjectField', [], {})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['database']
|
||||
0
constance/backends/database/south_migrations/__init__.py
Normal file
0
constance/backends/database/south_migrations/__init__.py
Normal file
Loading…
Reference in a new issue