1
1
# -*- coding: utf-8 -*-
2
2
# Generated by Django 1.9.1 on 2016-02-12 19:03
3
- from __future__ import unicode_literals
4
3
5
4
from querybuilder .tests .utils import get_postgres_version
6
5
7
6
# 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 ()
16
7
from django .db import migrations , models
17
8
import django .db .models .deletion
18
9
@@ -38,7 +29,7 @@ class Migration(migrations.Migration):
38
29
fields = [
39
30
('id' , models .AutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
40
31
('other_value' , models .FloatField (default = 0 )),
41
- ('data' , json_field ),
32
+ ('data' , models . JSONField () ),
42
33
],
43
34
),
44
35
migrations .CreateModel (
@@ -63,7 +54,7 @@ class Migration(migrations.Migration):
63
54
('field5' , models .CharField (default = None , max_length = 16 , null = True )),
64
55
('field6' , models .CharField (max_length = 16 )),
65
56
('field7' , models .CharField (max_length = 16 )),
66
- ('field8' , json_field ),
57
+ ('field8' , models . JSONField () ),
67
58
('custom_field_name' , models .CharField (max_length = 16 , null = True , default = 'foo' , db_column = 'actual_db_column_name' )),
68
59
],
69
60
),
0 commit comments