Commit f1a33987 authored by Serial Lab's avatar Serial Lab

migrations

parent bc720766
Pipeline #18787649 passed with stages
in 5 minutes and 18 seconds
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-09-05 22:51
from __future__ import unicode_literals
# Generated by Django 2.0.2 on 2018-03-11 17:29
import django.core.validators
from django.db import migrations, models
......@@ -30,6 +28,28 @@ class Migration(migrations.Migration):
'abstract': False,
},
),
migrations.CreateModel(
name='RandomizedRegion',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(auto_now_add=True, db_index=True, help_text='The date and time that this record was created', verbose_name='Created Date')),
('modified_date', models.DateTimeField(auto_now=True, db_index=True, help_text='The date and time that this record was modified last.', verbose_name='Last Modified')),
('readable_name', models.CharField(help_text='A human-readable name for use in GUIs and reports and such.', max_length=100, unique=True, verbose_name='Readable Name')),
('machine_name', models.CharField(help_text='A url/api-friendly machine name for use in API calls and such.', max_length=100, unique=True, validators=[django.core.validators.RegexValidator('^[A-Za-z0-9]*$', 'Only numbers and letters are allowed. Invalid Machine Name.')], verbose_name='Machine Name')),
('active', models.BooleanField(default=True, help_text='Whether or not this pool is active/in-use. If marked false the pool will no longer be able to be used in API calls, etc.', verbose_name='Active')),
('order', models.IntegerField(blank=True, help_text='The order in which this region will be consumed as numbers are issued from the pool overall', null=True, verbose_name='Order')),
('min', models.BigIntegerField(default=1, help_text='The minimum value in the randomized region.', verbose_name='Minimum')),
('max', models.BigIntegerField(default=9223372036854775807, help_text='The maximum value in the randomized region.', verbose_name='Maximum')),
('start', models.BigIntegerField(blank=True, help_text='The start number will fall somewhere in between the minimum and maximum numbers. This number will be randomly selected by the system to assure the most randomized range possible', null=True, verbose_name='Start Number')),
('current', models.BigIntegerField(blank=True, help_text='The current number represents the next number in the generator. The current number is used by the system as a state variable that, along with the start, can be used to re-position the random number generator where it left off.', null=True, verbose_name='Current')),
('remaining', models.BigIntegerField(blank=True, help_text='The number of remaining serial numbers in this randomized region.', null=True, verbose_name='Remaining')),
('pool', models.ForeignKey(blank=True, help_text='The Number Pool this region will belong to.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='serialbox.Pool', verbose_name='Number Pool')),
],
options={
'verbose_name': 'Randomized Region',
'verbose_name_plural': 'Randomized Regions',
},
),
migrations.CreateModel(
name='Response',
fields=[
......@@ -78,7 +98,7 @@ class Migration(migrations.Migration):
('start', models.BigIntegerField(help_text='The starting number for this region.', verbose_name='Starting Number')),
('end', models.BigIntegerField(help_text='The ending number for this region.', verbose_name='Ending Number')),
('state', models.BigIntegerField(help_text='The State represents the current number in use if an API request were to come in now.', verbose_name='State')),
('pool', models.ForeignKey(blank=True, help_text='The Number Pool this region will belong to.', null=True, on_delete=django.db.models.deletion.CASCADE, to='serialbox.Pool', verbose_name='Number Pool')),
('pool', models.ForeignKey(blank=True, help_text='The Number Pool this region will belong to.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='serialbox.Pool', verbose_name='Number Pool')),
],
options={
'verbose_name': 'Sequential Region',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment