Skip to content

Commit 77d7337

Browse files
committed
Миграция схемы после 09.06.2016
1 parent 400d9fb commit 77d7337

File tree

6 files changed

+63
-6
lines changed

6 files changed

+63
-6
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.9.9 on 2016-08-17 07:34
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('fias', '0001_initial'),
12+
]
13+
14+
operations = [
15+
migrations.AddField(
16+
model_name='addrobj',
17+
name='cadnum',
18+
field=models.CharField(blank=True, max_length=100, null=True),
19+
),
20+
migrations.AddField(
21+
model_name='addrobj',
22+
name='divtype',
23+
field=models.CharField(default=0, max_length=1),
24+
),
25+
migrations.AddField(
26+
model_name='house',
27+
name='cadnum',
28+
field=models.CharField(blank=True, max_length=100, null=True),
29+
),
30+
migrations.AddField(
31+
model_name='house',
32+
name='divtype',
33+
field=models.CharField(default=0, max_length=1),
34+
),
35+
migrations.AddField(
36+
model_name='house',
37+
name='regioncode',
38+
field=models.CharField(blank=True, max_length=2, null=True),
39+
),
40+
migrations.AddField(
41+
model_name='landmark',
42+
name='cadnum',
43+
field=models.CharField(blank=True, max_length=100, null=True),
44+
),
45+
]

fias/models/address.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class Meta:
7878
apartment = models.CharField(_('apartment'), null=True, blank=True)
7979

8080

81-
8281
class GetAddressMixin(object):
8382

8483
def _get_full_address(self):

fias/models/addrobj.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from django.db import models
77

88
from fias.fields import UUIDField
9-
from fias.models.common import Common
9+
from fias.models.common import June2016Update
1010

1111

1212
__all__ = ['AddrObj']
1313

1414

1515
@python_2_unicode_compatible
16-
class AddrObj(Common):
16+
class AddrObj(June2016Update):
1717

1818
class Meta:
1919
app_label = 'fias'

fias/models/common.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from django.db import models
55
from fias.fields import UUIDField
66

7-
__all__ = ['Common']
7+
__all__ = ['Common', 'June2016Update']
88

99

1010
class Common(models.Model):
@@ -26,3 +26,12 @@ class Meta:
2626
startdate = models.DateField()
2727
enddate = models.DateField()
2828
normdoc = UUIDField(blank=True, null=True)
29+
30+
31+
class June2016Update(Common):
32+
33+
class Meta:
34+
abstract = True
35+
36+
cadnum = models.CharField(max_length=100, blank=True, null=True)
37+
divtype = models.CharField(max_length=1, default=0)

fias/models/house.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
from django.db import models
55

66
from fias.fields import UUIDField
7-
from fias.models.common import Common
7+
from fias.models.common import Common, June2016Update
88

99
__all__ = ['House', 'HouseInt']
1010

1111

12-
class House(Common):
12+
class House(June2016Update):
1313

1414
class Meta:
1515
app_label = 'fias'
@@ -26,6 +26,8 @@ class Meta:
2626

2727
statstatus = models.PositiveSmallIntegerField()
2828

29+
regioncode = models.CharField(max_length=2, blank=True, null=True)
30+
2931
counter = models.IntegerField()
3032

3133

fias/models/landmark.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ class Meta:
1919
aoguid = UUIDField()
2020

2121
location = models.TextField()
22+
23+
cadnum = models.CharField(max_length=100, blank=True, null=True)

0 commit comments

Comments
 (0)