Files
mayan-edms/mayan/apps/control_codes/migrations/0001_initial.py
Roberto Rosario 9448b148e9 Improve tests, update migrations
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-09-05 22:18:59 -04:00

51 lines
2.2 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-09-06 02:11
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import mayan.apps.common.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ControlSheet',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('label', models.CharField(help_text='Short text to describe the control sheet.', max_length=196, unique=True, verbose_name='Label')),
],
options={
'ordering': ('label',),
'verbose_name': 'Control sheet',
'verbose_name_plural': 'Control sheets',
},
),
migrations.CreateModel(
name='ControlSheetCode',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('order', models.PositiveIntegerField(blank=True, db_index=True, default=0, help_text='Order in which the control sheet codes will be interpreted. If left unchanged, an automatic order value will be assigned.', verbose_name='Order')),
('name', models.CharField(max_length=128, verbose_name='Name')),
('arguments', models.TextField(blank=True, help_text='The arguments for the control sheet code as a YAML dictionary.', validators=[mayan.apps.common.validators.YAMLValidator()], verbose_name='Arguments')),
('enabled', models.BooleanField(default=True, verbose_name='Enabled')),
('control_sheet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='codes', to='control_codes.ControlSheet', verbose_name='Control sheet')),
],
options={
'ordering': ('order',),
'verbose_name': 'Control sheet code',
'verbose_name_plural': 'Control sheet codes',
},
managers=[
('business_logic', django.db.models.manager.Manager()),
],
),
]