diff options
Diffstat (limited to 'ishtar_common/migrations')
-rw-r--r-- | ishtar_common/migrations/0022_customform.py | 32 | ||||
-rw-r--r-- | ishtar_common/migrations/0023_excludedfield.py | 28 | ||||
-rw-r--r-- | ishtar_common/migrations/0024_custom_form_enabled.py | 24 |
3 files changed, 84 insertions, 0 deletions
diff --git a/ishtar_common/migrations/0022_customform.py b/ishtar_common/migrations/0022_customform.py new file mode 100644 index 000000000..8eaed6d89 --- /dev/null +++ b/ishtar_common/migrations/0022_customform.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-11-17 12:32 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0021_auto_20171110_1717'), + ] + + operations = [ + migrations.CreateModel( + name='CustomForm', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=250, verbose_name='Name')), + ('form', models.CharField(max_length=250, verbose_name='Form')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('apply_to_all', models.BooleanField(default=False, help_text='Apply this form to all users. If set to True, selecting user and user type is useless.', verbose_name='Apply to all')), + ('user_types', models.ManyToManyField(blank=True, to='ishtar_common.PersonType')), + ('users', models.ManyToManyField(blank=True, to='ishtar_common.IshtarUser')), + ], + options={ + 'ordering': ['name', 'form'], + 'verbose_name': 'Custom form', + 'verbose_name_plural': 'Custom forms', + }, + ), + ] diff --git a/ishtar_common/migrations/0023_excludedfield.py b/ishtar_common/migrations/0023_excludedfield.py new file mode 100644 index 000000000..2573219ae --- /dev/null +++ b/ishtar_common/migrations/0023_excludedfield.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-11-17 17:37 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0022_customform'), + ] + + operations = [ + migrations.CreateModel( + name='ExcludedField', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('field', models.CharField(max_length=250, verbose_name='Field')), + ('custom_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='excluded_fields', to='ishtar_common.CustomForm')), + ], + options={ + 'verbose_name': 'Custom form - excluded field', + 'verbose_name_plural': 'Custom form - excluded fields', + }, + ), + ] diff --git a/ishtar_common/migrations/0024_custom_form_enabled.py b/ishtar_common/migrations/0024_custom_form_enabled.py new file mode 100644 index 000000000..92fd32f6e --- /dev/null +++ b/ishtar_common/migrations/0024_custom_form_enabled.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2017-11-21 09:55 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0023_excludedfield'), + ] + + operations = [ + migrations.AlterModelOptions( + name='excludedfield', + options={'verbose_name': 'Excluded field', 'verbose_name_plural': 'Excluded fields'}, + ), + migrations.AddField( + model_name='customform', + name='enabled', + field=models.BooleanField(default=True, help_text='Disable with caution: disabling a form with mandatory fields may lead to database errors.', verbose_name='Enable this form'), + ), + ] |