blob: 861aff21eefc605681d0c18ce6a3a42e13e3b0ec [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-06-21 17:13
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
def forwards(apps, schema_editor):
# set a default value on tech_profile_id for existing subscribers
subscribers = apps.get_model('rcord', 'RCORDSubscriber')
for s in subscribers.objects.all():
s.tech_profile_id = "64"
s.save()
dependencies = [
('rcord', '0010_bandwidth_profile_values'),
]
operations = [
migrations.RunPython(forwards),
migrations.AlterField(
model_name='rcordsubscriber_decl',
name='tech_profile_id',
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)]),
),
]