blob: a1a2fbd40c1116bfcbe21d7363bffbc9f9a96d1d [file] [log] [blame]
Matteo Scandoloa2b2e222019-06-18 18:32:43 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# -*- coding: utf-8 -*-
16# Generated by Django 1.11.20 on 2019-06-19 01:31
17from __future__ import unicode_literals
18
19import django.core.validators
20from django.db import migrations, models
21
22
23class Migration(migrations.Migration):
24
25 def forwards(apps, schema_editor):
26
27 # set a default value on tech_profile_id for existing subscribers
28 subscribers = apps.get_model('rcord', 'RCORDSubscriber')
29
30 for s in subscribers.objects.all():
31 s.tech_profile_id = "64"
32 s.save()
33
34 dependencies = [
35 ('rcord', '0010_bandwidth_profile_values'),
36 ]
37
38 operations = [
39 migrations.RunPython(forwards),
40 migrations.AlterField(
41 model_name='rcordsubscriber_decl',
42 name='tech_profile_id',
43 field=models.IntegerField(help_text=b'Technology profile id to be used along with Technology type to retreive the profile', validators=[django.core.validators.MaxValueValidator(65535), django.core.validators.MinValueValidator(0)]),
44 ),
45 ]