Add start_date field in schedule model

This commit is contained in:
hunytalk
2019-11-20 22:22:19 +05:00
parent df35dfd94c
commit 75b4b04607
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.26 on 2019-11-21 18:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schedules', '0007_scheduleconfig_hold_back_ratio'),
]
operations = [
migrations.AddField(
model_name='schedule',
name='start_date',
field=models.DateTimeField(blank=True, db_index=True, help_text='Date this schedule went into effect', null=True),
),
]

View File

@@ -18,10 +18,18 @@ class Schedule(TimeStampedModel):
default=True,
help_text=_('Indicates if this schedule is actively used')
)
# TODO Delete this field during last stage of rolling out field renames
start = models.DateTimeField(
db_index=True,
help_text=_('Date this schedule went into effect')
)
start_date = models.DateTimeField(
# TODO remove blank=True and null=True once data migration is complete in column rename release.
blank=True,
db_index=True,
null=True,
help_text=_('Date this schedule went into effect')
)
upgrade_deadline = models.DateTimeField(
blank=True,
db_index=True,