blob: 861aff21eefc605681d0c18ce6a3a42e13e3b0ec [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 -*-
Matteo Scandolo17962fc2019-06-21 10:17:47 -070016# Generated by Django 1.11.21 on 2019-06-21 17:13
Matteo Scandoloa2b2e222019-06-18 18:32:43 -070017from __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):
Matteo Scandoloa2b2e222019-06-18 18:32:43 -070026 # set a default value on tech_profile_id for existing subscribers
27 subscribers = apps.get_model('rcord', 'RCORDSubscriber')
28
29 for s in subscribers.objects.all():
30 s.tech_profile_id = "64"
31 s.save()
32
33 dependencies = [
34 ('rcord', '0010_bandwidth_profile_values'),
35 ]
36
37 operations = [
38 migrations.RunPython(forwards),
39 migrations.AlterField(
40 model_name='rcordsubscriber_decl',
41 name='tech_profile_id',
Matteo Scandolo17962fc2019-06-21 10:17:47 -070042 field=models.IntegerField(help_text=b"Technology profile id to be used along with Technology type to retreive the profile. Make sure that the profile ID specified exists for the technology this subscriber's OLT is using.", validators=[django.core.validators.MaxValueValidator(255), django.core.validators.MinValueValidator(64)]),
Matteo Scandoloa2b2e222019-06-18 18:32:43 -070043 ),
44 ]