11# -*- coding: utf-8 -*-
22# Generated by Django 1.9.1 on 2016-02-12 19:03
3- from __future__ import unicode_literals
43
54from querybuilder .tests .utils import get_postgres_version
65
76# These migrations should only be run during tests and not in your installed app.
8- try :
9- if get_postgres_version () < (9 , 4 ):
10- raise ImportError ('Invalid Postgres version' )
11- import django .contrib .postgres .fields .jsonb
12- json_field = django .contrib .postgres .fields .jsonb .JSONField ()
13- except ImportError :
14- import jsonfield .fields
15- json_field = jsonfield .fields .JSONField ()
167from django .db import migrations , models
178import django .db .models .deletion
189
@@ -38,7 +29,7 @@ class Migration(migrations.Migration):
3829 fields = [
3930 ('id' , models .AutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
4031 ('other_value' , models .FloatField (default = 0 )),
41- ('data' , json_field ),
32+ ('data' , models . JSONField () ),
4233 ],
4334 ),
4435 migrations .CreateModel (
@@ -63,7 +54,7 @@ class Migration(migrations.Migration):
6354 ('field5' , models .CharField (default = None , max_length = 16 , null = True )),
6455 ('field6' , models .CharField (max_length = 16 )),
6556 ('field7' , models .CharField (max_length = 16 )),
66- ('field8' , json_field ),
57+ ('field8' , models . JSONField () ),
6758 ('custom_field_name' , models .CharField (max_length = 16 , null = True , default = 'foo' , db_column = 'actual_db_column_name' )),
6859 ],
6960 ),
0 commit comments