diff --git a/orchestra/contrib/accounts/migrations/0001_squashed_0004_auto_20210422_1108.py b/orchestra/contrib/accounts/migrations/0001_squashed_0004_auto_20210422_1108.py
new file mode 100644
index 00000000..69810092
--- /dev/null
+++ b/orchestra/contrib/accounts/migrations/0001_squashed_0004_auto_20210422_1108.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:08
+from __future__ import unicode_literals
+
+import django.contrib.auth.models
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+import django.utils.timezone
+import orchestra.contrib.accounts.models
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('accounts', '0001_initial'), ('accounts', '0002_auto_20170528_2005'), ('accounts', '0003_auto_20210330_1049'), ('accounts', '0004_auto_20210422_1108')]
+
+ initial = True
+
+ dependencies = [
+ ('systemusers', '0001_initial'),
+ ('auth', '0006_require_contenttypes_0002'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Account',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('password', models.CharField(max_length=128, verbose_name='password')),
+ ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
+ ('username', models.CharField(help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', max_length=32, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.-]+$', 'Enter a valid username.', 'invalid')], verbose_name='username')),
+ ('short_name', models.CharField(blank=True, max_length=64, verbose_name='short name')),
+ ('full_name', models.CharField(max_length=256, verbose_name='full name')),
+ ('email', models.EmailField(help_text='Used for password recovery', max_length=254, verbose_name='email address')),
+ ('type', models.CharField(choices=[('INDIVIDUAL', 'Individual'), ('ASSOCIATION', 'Association'), ('CUSTOMER', 'Customer'), ('COMPANY', 'Company'), ('PUBLICBODY', 'Public body'), ('STAFF', 'Staff'), ('FRIEND', 'Friend')], default='INDIVIDUAL', max_length=32, verbose_name='type')),
+ ('language', models.CharField(choices=[('EN', 'English')], default='EN', max_length=2, verbose_name='language')),
+ ('comments', models.TextField(blank=True, max_length=256, verbose_name='comments')),
+ ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
+ ('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
+ ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
+ ('main_systemuser', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='accounts_main', to='systemusers.SystemUser')),
+ ],
+ options={
+ 'abstract': False,
+ },
+ managers=[
+ ('objects', django.contrib.auth.models.UserManager()),
+ ],
+ ),
+ migrations.AlterModelManagers(
+ name='account',
+ managers=[
+ ('objects', orchestra.contrib.accounts.models.AccountManager()),
+ ],
+ ),
+ migrations.AlterField(
+ model_name='account',
+ name='language',
+ field=models.CharField(choices=[('CA', 'Catalan'), ('ES', 'Spanish'), ('EN', 'English')], default='CA', max_length=2, verbose_name='language'),
+ ),
+ migrations.AlterField(
+ model_name='account',
+ name='type',
+ field=models.CharField(choices=[('INDIVIDUAL', 'Individual'), ('ASSOCIATION', 'Association'), ('CUSTOMER', 'Customer'), ('STAFF', 'Staff'), ('FRIEND', 'Friend')], default='INDIVIDUAL', max_length=32, verbose_name='type'),
+ ),
+ migrations.AlterField(
+ model_name='account',
+ name='username',
+ field=models.CharField(help_text='Required. 32 characters or fewer. Letters, digits and ./-/_ only.', max_length=32, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.-]+$', 'Enter a valid username.', 'invalid')], verbose_name='username'),
+ ),
+ migrations.AlterField(
+ model_name='account',
+ name='language',
+ field=models.CharField(choices=[('EN', 'English')], default='EN', max_length=2, verbose_name='language'),
+ ),
+ migrations.AlterField(
+ model_name='account',
+ name='type',
+ field=models.CharField(choices=[('INDIVIDUAL', 'Individual'), ('ASSOCIATION', 'Association'), ('CUSTOMER', 'Customer'), ('COMPANY', 'Company'), ('PUBLICBODY', 'Public body'), ('STAFF', 'Staff'), ('FRIEND', 'Friend')], default='INDIVIDUAL', max_length=32, verbose_name='type'),
+ ),
+ migrations.AlterField(
+ model_name='account',
+ name='main_systemuser',
+ field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='accounts_main', to='systemusers.SystemUser'),
+ ),
+ ]
diff --git a/orchestra/contrib/bills/migrations/0001_squashed_0017_auto_20210422_1108.py b/orchestra/contrib/bills/migrations/0001_squashed_0017_auto_20210422_1108.py
new file mode 100644
index 00000000..7070870d
--- /dev/null
+++ b/orchestra/contrib/bills/migrations/0001_squashed_0017_auto_20210422_1108.py
@@ -0,0 +1,189 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:08
+from __future__ import unicode_literals
+
+from django.conf import settings
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('bills', '0001_initial'), ('bills', '0002_auto_20150429_1417'), ('bills', '0003_auto_20150612_0944'), ('bills', '0004_auto_20150618_1311'), ('bills', '0005_auto_20150623_1031'), ('bills', '0006_auto_20150709_1016'), ('bills', '0007_auto_20170528_2011'), ('bills', '0008_auto_20170625_1813'), ('bills', '0009_auto_20170625_1840'), ('bills', '0010_auto_20170625_1840'), ('bills', '0011_auto_20170625_1840'), ('bills', '0012_auto_20170625_1841'), ('bills', '0013_auto_20190805_1134'), ('bills', '0014_auto_20200204_1217'), ('bills', '0015_auto_20200204_1218'), ('bills', '0016_auto_20210330_1049'), ('bills', '0017_auto_20210422_1108')]
+
+ initial = True
+
+ dependencies = [
+ ('orders', '__first__'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Bill',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('number', models.CharField(blank=True, max_length=16, unique=True, verbose_name='number')),
+ ('type', models.CharField(choices=[('INVOICE', 'Invoice'), ('AMENDMENTINVOICE', 'Amendment invoice'), ('FEE', 'Fee'), ('AMENDMENTFEE', 'Amendment Fee'), ('PROFORMA', 'Pro forma')], max_length=16, verbose_name='type')),
+ ('created_on', models.DateField(auto_now_add=True, verbose_name='created on')),
+ ('closed_on', models.DateField(blank=True, null=True, verbose_name='closed on')),
+ ('is_open', models.BooleanField(default=True, verbose_name='open')),
+ ('is_sent', models.BooleanField(default=False, verbose_name='sent')),
+ ('due_on', models.DateField(blank=True, null=True, verbose_name='due on')),
+ ('updated_on', models.DateField(auto_now=True, verbose_name='updated on')),
+ ('total', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
+ ('comments', models.TextField(blank=True, verbose_name='comments')),
+ ('html', models.TextField(blank=True, verbose_name='HTML')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bill', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ],
+ options={
+ 'get_latest_by': 'id',
+ },
+ ),
+ migrations.CreateModel(
+ name='BillContact',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(blank=True, help_text='Account full name will be used when left blank.', max_length=256, verbose_name='name')),
+ ('address', models.TextField(verbose_name='address')),
+ ('city', models.CharField(default='Barcelona', max_length=128, verbose_name='city')),
+ ('zipcode', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator('^[0-9A-Z]{3,10}$', 'Enter a valid zipcode.')], verbose_name='zip code')),
+ ('country', models.CharField(choices=[('AF', 'Afghanistan'), ('AX', 'Åland Islands'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AS', 'American Samoa'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua and Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia (Plurinational State of)'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('BA', 'Bosnia and Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei Darussalam'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('CV', 'Cabo Verde'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('KY', 'Cayman Islands'), ('CF', 'Central African Republic'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CG', 'Congo'), ('CD', 'Congo (the Democratic Republic of the)'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('CI', "Côte d'Ivoire"), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curaçao'), ('CY', 'Cyprus'), ('CZ', 'Czechia'), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('SZ', 'Eswatini'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands (Malvinas)'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern Territories'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island and McDonald Islands'), ('VA', 'Holy See'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran (Islamic Republic of)'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', "Korea (the Democratic People's Republic of)"), ('KR', 'Korea (the Republic of)'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', "Lao People's Democratic Republic"), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macao'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia (Federated States of)'), ('MD', 'Moldova (the Republic of)'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MK', 'North Macedonia'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestine, State of'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RE', 'Réunion'), ('RO', 'Romania'), ('RU', 'Russian Federation'), ('RW', 'Rwanda'), ('BL', 'Saint Barthélemy'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('KN', 'Saint Kitts and Nevis'), ('LC', 'Saint Lucia'), ('MF', 'Saint Martin (French part)'), ('PM', 'Saint Pierre and Miquelon'), ('VC', 'Saint Vincent and the Grenadines'), ('WS', 'Samoa'), ('SM', 'San Marino'), ('ST', 'Sao Tome and Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SX', 'Sint Maarten (Dutch part)'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia and the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard and Jan Mayen'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syrian Arab Republic'), ('TW', 'Taiwan (Province of China)'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania, the United Republic of'), ('TH', 'Thailand'), ('TL', 'Timor-Leste'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks and Caicos Islands'), ('TV', 'Tuvalu'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('UM', 'United States Minor Outlying Islands'), ('US', 'United States of America'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('VN', 'Viet Nam'), ('VG', 'Virgin Islands (British)'), ('VI', 'Virgin Islands (U.S.)'), ('WF', 'Wallis and Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')], default='ES', max_length=20, verbose_name='country')),
+ ('vat', models.CharField(max_length=64, verbose_name='VAT number')),
+ ('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='billcontact', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='BillLine',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('description', models.CharField(max_length=256, verbose_name='description')),
+ ('rate', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True, verbose_name='rate')),
+ ('quantity', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='quantity')),
+ ('verbose_quantity', models.CharField(max_length=16, verbose_name='Verbose quantity')),
+ ('subtotal', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='subtotal')),
+ ('tax', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='tax')),
+ ('start_on', models.DateField(verbose_name='start')),
+ ('end_on', models.DateField(null=True, verbose_name='end')),
+ ('order_billed_on', models.DateField(blank=True, null=True, verbose_name='order billed')),
+ ('order_billed_until', models.DateField(blank=True, null=True, verbose_name='order billed until')),
+ ('created_on', models.DateField(auto_now_add=True, verbose_name='created')),
+ ('amended_line', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='amendment_lines', to='bills.BillLine', verbose_name='amended line')),
+ ('bill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lines', to='bills.Bill', verbose_name='bill')),
+ ('order', models.ForeignKey(blank=True, help_text='Informative link back to the order', null=True, on_delete=django.db.models.deletion.SET_NULL, to='orders.Order')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='BillSubline',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('description', models.CharField(max_length=256, verbose_name='description')),
+ ('total', models.DecimalField(decimal_places=2, max_digits=12)),
+ ('type', models.CharField(choices=[('VOLUME', 'Volume'), ('COMPENSATION', 'Compensation'), ('OTHER', 'Other')], default='OTHER', max_length=16, verbose_name='type')),
+ ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sublines', to='bills.BillLine', verbose_name='bill line')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='AmendmentFee',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('bills.bill',),
+ ),
+ migrations.CreateModel(
+ name='AmendmentInvoice',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('bills.bill',),
+ ),
+ migrations.CreateModel(
+ name='Fee',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('bills.bill',),
+ ),
+ migrations.CreateModel(
+ name='Invoice',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('bills.bill',),
+ ),
+ migrations.CreateModel(
+ name='ProForma',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('bills.bill',),
+ ),
+ migrations.RemoveField(
+ model_name='bill',
+ name='total',
+ ),
+ migrations.AlterField(
+ model_name='billline',
+ name='quantity',
+ field=models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True, verbose_name='quantity'),
+ ),
+ migrations.AddField(
+ model_name='bill',
+ name='amend_of',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='amends', to='bills.Bill', verbose_name='amend of'),
+ ),
+ migrations.AlterField(
+ model_name='bill',
+ name='closed_on',
+ field=models.DateField(blank=True, db_index=True, null=True, verbose_name='closed on'),
+ ),
+ migrations.AlterField(
+ model_name='billline',
+ name='end_on',
+ field=models.DateField(blank=True, null=True, verbose_name='end'),
+ ),
+ migrations.AlterModelOptions(
+ name='billline',
+ options={'get_latest_by': 'id'},
+ ),
+ migrations.AlterField(
+ model_name='billline',
+ name='order',
+ field=models.ForeignKey(blank=True, help_text='Informative link back to the order', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='lines', to='orders.Order'),
+ ),
+ migrations.AlterField(
+ model_name='billline',
+ name='verbose_quantity',
+ field=models.CharField(blank=True, max_length=16, verbose_name='Verbose quantity'),
+ ),
+ migrations.CreateModel(
+ name='AbonoInvoice',
+ fields=[
+ ],
+ options={
+ 'proxy': True,
+ },
+ bases=('bills.bill',),
+ ),
+ migrations.AlterField(
+ model_name='bill',
+ name='type',
+ field=models.CharField(choices=[('INVOICE', 'Invoice'), ('AMENDMENTINVOICE', 'Amendment invoice'), ('FEE', 'Fee'), ('AMENDMENTFEE', 'Amendment Fee'), ('ABONOINVOICE', 'Abono Invoice'), ('PROFORMA', 'Pro forma')], max_length=16, verbose_name='type'),
+ ),
+ migrations.AlterField(
+ model_name='bill',
+ name='amend_of',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='amends', to='bills.Bill', verbose_name='amend of'),
+ ),
+ ]
diff --git a/orchestra/contrib/contacts/migrations/0001_squashed_0012_auto_20210422_1108.py b/orchestra/contrib/contacts/migrations/0001_squashed_0012_auto_20210422_1108.py
new file mode 100644
index 00000000..31a58dbd
--- /dev/null
+++ b/orchestra/contrib/contacts/migrations/0001_squashed_0012_auto_20210422_1108.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:08
+from __future__ import unicode_literals
+
+from django.conf import settings
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.contrib.contacts.validators
+import orchestra.models.fields
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('contacts', '0001_initial'), ('contacts', '0002_auto_20170528_2011'), ('contacts', '0003_auto_20170625_1813'), ('contacts', '0004_auto_20170625_1840'), ('contacts', '0005_auto_20170625_1840'), ('contacts', '0006_auto_20170625_1840'), ('contacts', '0007_auto_20170625_1841'), ('contacts', '0008_auto_20190805_1134'), ('contacts', '0009_auto_20200204_1217'), ('contacts', '0010_auto_20200204_1218'), ('contacts', '0011_auto_20210330_1049'), ('contacts', '0012_auto_20210422_1108')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Contact',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('short_name', models.CharField(max_length=128, verbose_name='short name')),
+ ('full_name', models.CharField(blank=True, max_length=256, verbose_name='full name')),
+ ('email', models.EmailField(max_length=254)),
+ ('email_usage', orchestra.models.fields.MultiSelectField(blank=True, choices=[('SUPPORT', 'Support tickets'), ('ADMIN', 'Administrative'), ('BILLING', 'Billing'), ('TECH', 'Technical'), ('ADDS', 'Announcements'), ('EMERGENCY', 'Emergency contact')], default=('SUPPORT', 'ADMIN', 'BILLING', 'TECH', 'ADDS', 'EMERGENCY'), max_length=256, verbose_name='email usage')),
+ ('phone', models.CharField(blank=True, max_length=32, validators=[orchestra.contrib.contacts.validators.validate_phone], verbose_name='phone')),
+ ('phone2', models.CharField(blank=True, max_length=32, validators=[orchestra.contrib.contacts.validators.validate_phone], verbose_name='alternative phone')),
+ ('address', models.TextField(blank=True, verbose_name='address')),
+ ('city', models.CharField(blank=True, max_length=128, verbose_name='city')),
+ ('zipcode', models.CharField(blank=True, max_length=10, validators=[django.core.validators.RegexValidator('^[0-9,A-Z]{3,10}$', 'Enter a valid zipcode.', 'invalid')], verbose_name='zip code')),
+ ('country', models.CharField(blank=True, choices=[('AF', 'Afghanistan'), ('AX', 'Åland Islands'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AS', 'American Samoa'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua and Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia (Plurinational State of)'), ('BQ', 'Bonaire, Sint Eustatius and Saba'), ('BA', 'Bosnia and Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei Darussalam'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('CV', 'Cabo Verde'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('KY', 'Cayman Islands'), ('CF', 'Central African Republic'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CG', 'Congo'), ('CD', 'Congo (the Democratic Republic of the)'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('CI', "Côte d'Ivoire"), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curaçao'), ('CY', 'Cyprus'), ('CZ', 'Czechia'), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('SZ', 'Eswatini'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands (Malvinas)'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern Territories'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island and McDonald Islands'), ('VA', 'Holy See'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran (Islamic Republic of)'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', "Korea (the Democratic People's Republic of)"), ('KR', 'Korea (the Republic of)'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', "Lao People's Democratic Republic"), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macao'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia (Federated States of)'), ('MD', 'Moldova (the Republic of)'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MK', 'North Macedonia'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestine, State of'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RE', 'Réunion'), ('RO', 'Romania'), ('RU', 'Russian Federation'), ('RW', 'Rwanda'), ('BL', 'Saint Barthélemy'), ('SH', 'Saint Helena, Ascension and Tristan da Cunha'), ('KN', 'Saint Kitts and Nevis'), ('LC', 'Saint Lucia'), ('MF', 'Saint Martin (French part)'), ('PM', 'Saint Pierre and Miquelon'), ('VC', 'Saint Vincent and the Grenadines'), ('WS', 'Samoa'), ('SM', 'San Marino'), ('ST', 'Sao Tome and Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SX', 'Sint Maarten (Dutch part)'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia and the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard and Jan Mayen'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syrian Arab Republic'), ('TW', 'Taiwan (Province of China)'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania, the United Republic of'), ('TH', 'Thailand'), ('TL', 'Timor-Leste'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks and Caicos Islands'), ('TV', 'Tuvalu'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('GB', 'United Kingdom of Great Britain and Northern Ireland'), ('UM', 'United States Minor Outlying Islands'), ('US', 'United States of America'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VE', 'Venezuela (Bolivarian Republic of)'), ('VN', 'Viet Nam'), ('VG', 'Virgin Islands (British)'), ('VI', 'Virgin Islands (U.S.)'), ('WF', 'Wallis and Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')], default='ES', max_length=20, verbose_name='country')),
+ ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='contacts', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ],
+ ),
+ ]
diff --git a/orchestra/contrib/databases/migrations/0001_squashed_0004_auto_20210330_1049.py b/orchestra/contrib/databases/migrations/0001_squashed_0004_auto_20210330_1049.py
new file mode 100644
index 00000000..2c12381c
--- /dev/null
+++ b/orchestra/contrib/databases/migrations/0001_squashed_0004_auto_20210330_1049.py
@@ -0,0 +1,82 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:25
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('databases', '0001_initial'), ('databases', '0002_auto_20170528_2005'), ('databases', '0003_database_comments'), ('databases', '0004_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Database',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=64, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('type', models.CharField(choices=[('mysql', 'MySQL'), ('postgres', 'PostgreSQL')], default='mysql', max_length=32, verbose_name='type')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='databases', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='DatabaseUser',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('username', models.CharField(max_length=16, validators=[orchestra.core.validators.validate_name], verbose_name='username')),
+ ('password', models.CharField(max_length=256, verbose_name='password')),
+ ('type', models.CharField(choices=[('mysql', 'MySQL'), ('postgres', 'PostgreSQL')], default='mysql', max_length=32, verbose_name='type')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='databaseusers', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ],
+ options={
+ 'verbose_name_plural': 'DB users',
+ },
+ ),
+ migrations.AddField(
+ model_name='database',
+ name='users',
+ field=models.ManyToManyField(blank=True, related_name='databases', to='databases.DatabaseUser', verbose_name='users'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='databaseuser',
+ unique_together=set([('username', 'type')]),
+ ),
+ migrations.AlterUniqueTogether(
+ name='database',
+ unique_together=set([('name', 'type')]),
+ ),
+ migrations.AlterField(
+ model_name='database',
+ name='type',
+ field=models.CharField(choices=[('mysql', 'MySQL')], default='mysql', max_length=32, verbose_name='type'),
+ ),
+ migrations.AlterField(
+ model_name='databaseuser',
+ name='type',
+ field=models.CharField(choices=[('mysql', 'MySQL')], default='mysql', max_length=32, verbose_name='type'),
+ ),
+ migrations.AddField(
+ model_name='database',
+ name='comments',
+ field=models.TextField(blank=True, default=''),
+ ),
+ migrations.AlterField(
+ model_name='database',
+ name='type',
+ field=models.CharField(choices=[('mysql', 'MySQL'), ('postgres', 'PostgreSQL')], default='mysql', max_length=32, verbose_name='type'),
+ ),
+ migrations.AlterField(
+ model_name='databaseuser',
+ name='type',
+ field=models.CharField(choices=[('mysql', 'MySQL'), ('postgres', 'PostgreSQL')], default='mysql', max_length=32, verbose_name='type'),
+ ),
+ ]
diff --git a/orchestra/contrib/domains/migrations/0001_squashed_0010_auto_20210330_1049.py b/orchestra/contrib/domains/migrations/0001_squashed_0010_auto_20210330_1049.py
new file mode 100644
index 00000000..ee8cfb2f
--- /dev/null
+++ b/orchestra/contrib/domains/migrations/0001_squashed_0010_auto_20210330_1049.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:27
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.contrib.domains.utils
+import orchestra.contrib.domains.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('domains', '0001_initial'), ('domains', '0002_auto_20150715_1017'), ('domains', '0003_auto_20150720_1121'), ('domains', '0004_auto_20150720_1121'), ('domains', '0005_auto_20160219_1034'), ('domains', '0006_auto_20170528_2011'), ('domains', '0007_auto_20190805_1134'), ('domains', '0008_domain_dns2136_address_match_list'), ('domains', '0009_auto_20200204_1217'), ('domains', '0010_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Domain',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(help_text='Domain or subdomain name.', max_length=256, unique=True, validators=[orchestra.contrib.domains.validators.validate_domain_name, orchestra.contrib.domains.validators.validate_allowed_domain], verbose_name='name')),
+ ('serial', models.IntegerField(default=orchestra.contrib.domains.utils.generate_zone_serial, help_text='Serial number', verbose_name='serial')),
+ ('account', models.ForeignKey(blank=True, help_text='Automatically selected for subdomains.', on_delete=django.db.models.deletion.CASCADE, related_name='domains', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ('top', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subdomain_set', to='domains.Domain')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Record',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('ttl', models.CharField(blank=True, help_text='Record TTL, defaults to 1h', max_length=8, validators=[orchestra.contrib.domains.validators.validate_zone_interval], verbose_name='TTL')),
+ ('type', models.CharField(choices=[('MX', 'MX'), ('NS', 'NS'), ('CNAME', 'CNAME'), ('A', 'A (IPv4 address)'), ('AAAA', 'AAAA (IPv6 address)'), ('SRV', 'SRV'), ('TXT', 'TXT'), ('SPF', 'SPF')], max_length=32, verbose_name='type')),
+ ('value', models.CharField(help_text='MX, NS and CNAME records sould end with a dot.', max_length=1024, verbose_name='value')),
+ ('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='records', to='domains.Domain', verbose_name='domain')),
+ ],
+ ),
+ migrations.AlterField(
+ model_name='domain',
+ name='serial',
+ field=models.IntegerField(default=orchestra.contrib.domains.utils.generate_zone_serial, editable=False, help_text='A revision number that changes whenever this domain is updated.', verbose_name='serial'),
+ ),
+ migrations.AddField(
+ model_name='domain',
+ name='expire',
+ field=models.CharField(blank=True, help_text='The time that a secondary server will keep trying to complete a zone transfer. If this time expires prior to a successful zone transfer, the secondary server will expire its zone file. This means the secondary will stop answering queries. The default value is 4w.', max_length=16, validators=[orchestra.contrib.domains.validators.validate_zone_interval], verbose_name='expire'),
+ ),
+ migrations.AddField(
+ model_name='domain',
+ name='min_ttl',
+ field=models.CharField(blank=True, help_text='The minimum time-to-live value applies to all resource records in the zone file. This value is supplied in query responses to inform other servers how long they should keep the data in cache. The default value is 1h.', max_length=16, validators=[orchestra.contrib.domains.validators.validate_zone_interval], verbose_name='min TTL'),
+ ),
+ migrations.AddField(
+ model_name='domain',
+ name='refresh',
+ field=models.CharField(blank=True, help_text="The time a secondary DNS server waits before querying the primary DNS server's SOA record to check for changes. When the refresh time expires, the secondary DNS server requests a copy of the current SOA record from the primary. The primary DNS server complies with this request. The secondary DNS server compares the serial number of the primary DNS server's current SOA record and the serial number in it's own SOA record. If they are different, the secondary DNS server will request a zone transfer from the primary DNS server. The default value is 1d.", max_length=16, validators=[orchestra.contrib.domains.validators.validate_zone_interval], verbose_name='refresh'),
+ ),
+ migrations.AddField(
+ model_name='domain',
+ name='retry',
+ field=models.CharField(blank=True, help_text='The time a secondary server waits before retrying a failed zone transfer. Normally, the retry time is less than the refresh time. The default value is 2h.', max_length=16, validators=[orchestra.contrib.domains.validators.validate_zone_interval], verbose_name='retry'),
+ ),
+ migrations.AlterField(
+ model_name='domain',
+ name='name',
+ field=models.CharField(db_index=True, help_text='Domain or subdomain name.', max_length=256, unique=True, validators=[orchestra.contrib.domains.validators.validate_domain_name, orchestra.contrib.domains.validators.validate_allowed_domain], verbose_name='name'),
+ ),
+ migrations.AlterField(
+ model_name='domain',
+ name='top',
+ field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subdomain_set', to='domains.Domain', verbose_name='top domain'),
+ ),
+ migrations.AddField(
+ model_name='domain',
+ name='dns2136_address_match_list',
+ field=models.CharField(blank=True, default='key pangea.key;', help_text="A bind-9 'address_match_list' that will be granted permission to perform dns2136 updates. Chiefly used to enable Let's Encrypt self-service validation.", max_length=80),
+ ),
+ ]
diff --git a/orchestra/contrib/issues/migrations/0001_squashed_0004_auto_20170528_2011.py b/orchestra/contrib/issues/migrations/0001_squashed_0004_auto_20170528_2011.py
new file mode 100644
index 00000000..2763cf79
--- /dev/null
+++ b/orchestra/contrib/issues/migrations/0001_squashed_0004_auto_20170528_2011.py
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:27
+from __future__ import unicode_literals
+
+import datetime
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+from django.utils.timezone import utc
+import orchestra.models.fields
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('issues', '0001_initial'), ('issues', '0002_auto_20150709_1018'), ('issues', '0003_auto_20160320_1127'), ('issues', '0004_auto_20170528_2011')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Message',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('author_name', models.CharField(blank=True, max_length=256, verbose_name='author name')),
+ ('content', models.TextField(verbose_name='content')),
+ ('created_on', models.DateTimeField(auto_now_add=True, verbose_name='created on')),
+ ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticket_messages', to=settings.AUTH_USER_MODEL, verbose_name='author')),
+ ],
+ options={
+ 'get_latest_by': 'id',
+ },
+ ),
+ migrations.CreateModel(
+ name='Queue',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=128, unique=True, verbose_name='name')),
+ ('verbose_name', models.CharField(blank=True, max_length=128, verbose_name='verbose_name')),
+ ('default', models.BooleanField(default=False, verbose_name='default')),
+ ('notify', orchestra.models.fields.MultiSelectField(blank=True, choices=[('SUPPORT', 'Support tickets'), ('ADMIN', 'Administrative'), ('BILLING', 'Billing'), ('TECH', 'Technical'), ('ADDS', 'Announcements'), ('EMERGENCY', 'Emergency contact')], default=('SUPPORT', 'ADMIN', 'BILLING', 'TECH', 'ADDS', 'EMERGENCY'), help_text='Contacts to notify by email', max_length=256, verbose_name='notify')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Ticket',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('creator_name', models.CharField(blank=True, max_length=256, verbose_name='creator name')),
+ ('subject', models.CharField(max_length=256, verbose_name='subject')),
+ ('description', models.TextField(verbose_name='description')),
+ ('priority', models.CharField(choices=[('HIGH', 'High'), ('MEDIUM', 'Medium'), ('LOW', 'Low')], default='MEDIUM', max_length=32, verbose_name='priority')),
+ ('state', models.CharField(choices=[('NEW', 'New'), ('IN_PROGRESS', 'In Progress'), ('RESOLVED', 'Resolved'), ('FEEDBACK', 'Feedback'), ('REJECTED', 'Rejected'), ('CLOSED', 'Closed')], default='NEW', max_length=32, verbose_name='state')),
+ ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created')),
+ ('updated_at', models.DateTimeField(auto_now=True, verbose_name='modified')),
+ ('cc', models.TextField(blank=True, help_text='emails to send a carbon copy to', verbose_name='CC')),
+ ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tickets_created', to=settings.AUTH_USER_MODEL, verbose_name='created by')),
+ ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tickets_owned', to=settings.AUTH_USER_MODEL, verbose_name='assigned to')),
+ ('queue', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tickets', to='issues.Queue')),
+ ],
+ options={
+ 'ordering': ['-updated_at'],
+ },
+ ),
+ migrations.CreateModel(
+ name='TicketTracker',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trackers', to='issues.Ticket', verbose_name='ticket')),
+ ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticket_trackers', to=settings.AUTH_USER_MODEL, verbose_name='user')),
+ ],
+ ),
+ migrations.AddField(
+ model_name='message',
+ name='ticket',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='issues.Ticket', verbose_name='ticket'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='tickettracker',
+ unique_together=set([('ticket', 'user')]),
+ ),
+ migrations.AlterField(
+ model_name='ticket',
+ name='created_at',
+ field=models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created'),
+ ),
+ migrations.RemoveField(
+ model_name='message',
+ name='created_on',
+ ),
+ migrations.AddField(
+ model_name='message',
+ name='created_at',
+ field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2016, 3, 20, 10, 27, 45, 766388, tzinfo=utc), verbose_name='created at'),
+ preserve_default=False,
+ ),
+ migrations.AlterField(
+ model_name='ticket',
+ name='creator',
+ field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tickets_created', to=settings.AUTH_USER_MODEL, verbose_name='created by'),
+ ),
+ migrations.AlterField(
+ model_name='ticket',
+ name='owner',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tickets_owned', to=settings.AUTH_USER_MODEL, verbose_name='assigned to'),
+ ),
+ migrations.AlterField(
+ model_name='ticket',
+ name='queue',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tickets', to='issues.Queue'),
+ ),
+ ]
diff --git a/orchestra/contrib/lists/migrations/0001_squashed_0004_auto_20210330_1049.py b/orchestra/contrib/lists/migrations/0001_squashed_0004_auto_20210330_1049.py
new file mode 100644
index 00000000..b630dd27
--- /dev/null
+++ b/orchestra/contrib/lists/migrations/0001_squashed_0004_auto_20210330_1049.py
@@ -0,0 +1,69 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:27
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('lists', '0001_initial'), ('lists', '0002_auto_20160912_1221'), ('lists', '0003_auto_20160912_1241'), ('lists', '0004_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ ('domains', '0001_initial'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='List',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(help_text='Default list address <name>@lists.orchestra.lan', max_length=128, unique=True, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('address_name', models.CharField(blank=True, max_length=128, validators=[orchestra.core.validators.validate_name], verbose_name='address name')),
+ ('admin_email', models.EmailField(help_text='Administration email address', max_length=254, verbose_name='admin email')),
+ ('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lists', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ('address_domain', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='domains.Domain', verbose_name='address domain')),
+ ],
+ ),
+ migrations.AlterUniqueTogether(
+ name='list',
+ unique_together=set([('address_name', 'address_domain')]),
+ ),
+ migrations.AlterField(
+ model_name='list',
+ name='address_domain',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='domains.Domain', verbose_name='address domain'),
+ ),
+ migrations.AlterField(
+ model_name='list',
+ name='address_name',
+ field=models.CharField(blank=True, max_length=52, validators=[orchestra.core.validators.validate_name], verbose_name='address name'),
+ ),
+ migrations.AlterField(
+ model_name='list',
+ name='name',
+ field=models.CharField(help_text='Default list address <name>@grups.pangea.org', max_length=52, unique=True, validators=[orchestra.core.validators.validate_name], verbose_name='name'),
+ ),
+ migrations.AlterField(
+ model_name='list',
+ name='address_name',
+ field=models.CharField(blank=True, max_length=64, validators=[orchestra.core.validators.validate_name], verbose_name='address name'),
+ ),
+ migrations.AlterField(
+ model_name='list',
+ name='name',
+ field=models.CharField(help_text='Default list address <name>@grups.pangea.org', max_length=64, unique=True, validators=[orchestra.core.validators.validate_name], verbose_name='name'),
+ ),
+ migrations.AlterField(
+ model_name='list',
+ name='name',
+ field=models.CharField(help_text='Default list address <name>@lists.orchestra.lan', max_length=64, unique=True, validators=[orchestra.core.validators.validate_name], verbose_name='name'),
+ ),
+ ]
diff --git a/orchestra/contrib/mailboxes/migrations/0001_squashed_0003_auto_20170528_2011.py b/orchestra/contrib/mailboxes/migrations/0001_squashed_0003_auto_20170528_2011.py
new file mode 100644
index 00000000..c66017bf
--- /dev/null
+++ b/orchestra/contrib/mailboxes/migrations/0001_squashed_0003_auto_20170528_2011.py
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:27
+from __future__ import unicode_literals
+
+from django.conf import settings
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.contrib.mailboxes.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('mailboxes', '0001_initial'), ('mailboxes', '0002_auto_20160219_1032'), ('mailboxes', '0003_auto_20170528_2011')]
+
+ initial = True
+
+ dependencies = [
+ ('domains', '0001_initial'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Address',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(blank=True, help_text='Address name, left blank for a catch-all address', max_length=64, validators=[orchestra.contrib.mailboxes.validators.validate_emailname], verbose_name='name')),
+ ('forward', models.CharField(blank=True, help_text='Space separated email addresses or mailboxes', max_length=256, validators=[orchestra.contrib.mailboxes.validators.validate_forward], verbose_name='forward')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='addresses', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='addresses', to='domains.Domain', verbose_name='domain')),
+ ],
+ options={
+ 'verbose_name_plural': 'addresses',
+ },
+ ),
+ migrations.CreateModel(
+ name='Autoresponse',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('subject', models.CharField(max_length=256, verbose_name='subject')),
+ ('message', models.TextField(verbose_name='message')),
+ ('enabled', models.BooleanField(default=False, verbose_name='enabled')),
+ ('address', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='autoresponse', to='mailboxes.Address', verbose_name='address')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Mailbox',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(db_index=True, help_text='Required. 32 characters or fewer. Letters, digits and ./-/_ only.', max_length=32, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.-]+$', 'Enter a valid mailbox name.')], verbose_name='name')),
+ ('password', models.CharField(max_length=128, verbose_name='password')),
+ ('filtering', models.CharField(choices=[('CUSTOM', 'Custom filtering'), ('DISABLE', 'Disable'), ('REDIRECT', 'Archive spam (Score≥8)'), ('REDIRECT5', 'Archive spam (Score≥5)'), ('REJECT', 'Reject spam (Score≥8)'), ('REJECT5', 'Reject spam (Score≥5)')], default='REDIRECT', max_length=16)),
+ ('custom_filtering', models.TextField(blank=True, help_text="Arbitrary email filtering in sieve language. This overrides any automatic junk email filtering", validators=[orchestra.contrib.mailboxes.validators.validate_sieve], verbose_name='filtering')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mailboxes', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ],
+ options={
+ 'verbose_name_plural': 'mailboxes',
+ },
+ ),
+ migrations.AddField(
+ model_name='address',
+ name='mailboxes',
+ field=models.ManyToManyField(blank=True, related_name='addresses', to='mailboxes.Mailbox', verbose_name='mailboxes'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='address',
+ unique_together=set([('name', 'domain')]),
+ ),
+ ]
diff --git a/orchestra/contrib/mailer/migrations/0001_squashed_0005_auto_20160219_1056.py b/orchestra/contrib/mailer/migrations/0001_squashed_0005_auto_20160219_1056.py
new file mode 100644
index 00000000..576ec469
--- /dev/null
+++ b/orchestra/contrib/mailer/migrations/0001_squashed_0005_auto_20160219_1056.py
@@ -0,0 +1,89 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:28
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('mailer', '0001_initial'), ('mailer', '0002_auto_20150617_1021'), ('mailer', '0003_auto_20150617_1024'), ('mailer', '0004_auto_20150805_1328'), ('mailer', '0005_auto_20160219_1056')]
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Message',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('state', models.CharField(choices=[('QUEUED', 'Queued'), ('SENT', 'Sent'), ('DEFERRED', 'Deferred'), ('FAILED', 'Failes')], default='QUEUED', max_length=16, verbose_name='State')),
+ ('priority', models.PositiveIntegerField(choices=[(0, 'Critical (not queued)'), (1, 'High'), (2, 'Normal'), (3, 'Low')], default=2, verbose_name='Priority')),
+ ('to_address', models.CharField(max_length=256)),
+ ('from_address', models.CharField(max_length=256)),
+ ('subject', models.CharField(max_length=256, verbose_name='subject')),
+ ('content', models.TextField(verbose_name='content')),
+ ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
+ ('retries', models.PositiveIntegerField(default=0, verbose_name='retries')),
+ ('last_retry', models.DateTimeField(auto_now=True, verbose_name='last try')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='SMTPLog',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('result', models.CharField(choices=[('SUCCESS', 'Success'), ('FAILURE', 'Failure')], default='SUCCESS', max_length=16)),
+ ('date', models.DateTimeField(auto_now_add=True)),
+ ('log_message', models.TextField()),
+ ('message', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='logs', to='mailer.Message')),
+ ],
+ ),
+ migrations.RenameField(
+ model_name='message',
+ old_name='last_retry',
+ new_name='last_try',
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='last_try',
+ field=models.DateTimeField(verbose_name='last try'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='subject',
+ field=models.TextField(verbose_name='subject'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='last_try',
+ field=models.DateTimeField(null=True, verbose_name='last try'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='state',
+ field=models.CharField(choices=[('QUEUED', 'Queued'), ('SENT', 'Sent'), ('DEFERRED', 'Deferred'), ('FAILED', 'Failed')], default='QUEUED', max_length=16, verbose_name='State'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='last_try',
+ field=models.DateTimeField(db_index=True, null=True, verbose_name='last try'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='priority',
+ field=models.PositiveIntegerField(choices=[(0, 'Critical (not queued)'), (1, 'High'), (2, 'Normal'), (3, 'Low')], db_index=True, default=2, verbose_name='Priority'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='retries',
+ field=models.PositiveIntegerField(db_index=True, default=0, verbose_name='retries'),
+ ),
+ migrations.AlterField(
+ model_name='message',
+ name='state',
+ field=models.CharField(choices=[('QUEUED', 'Queued'), ('SENT', 'Sent'), ('DEFERRED', 'Deferred'), ('FAILED', 'Failed')], db_index=True, default='QUEUED', max_length=16, verbose_name='State'),
+ ),
+ ]
diff --git a/orchestra/contrib/miscellaneous/migrations/0001_squashed_0002_auto_20150723_1252.py b/orchestra/contrib/miscellaneous/migrations/0001_squashed_0002_auto_20150723_1252.py
new file mode 100644
index 00000000..e5d5e6d0
--- /dev/null
+++ b/orchestra/contrib/miscellaneous/migrations/0001_squashed_0002_auto_20150723_1252.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:28
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+import orchestra.models.fields
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('miscellaneous', '0001_initial'), ('miscellaneous', '0002_auto_20150723_1252')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Miscellaneous',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('identifier', orchestra.models.fields.NullableCharField(help_text='A unique identifier for this service.', max_length=256, null=True, unique=True, verbose_name='identifier')),
+ ('description', models.TextField(blank=True, verbose_name='description')),
+ ('amount', models.PositiveIntegerField(default=1, verbose_name='amount')),
+ ('is_active', models.BooleanField(default=True, help_text='Designates whether this service should be treated as active. Unselect this instead of deleting services.', verbose_name='active')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='miscellaneous', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ],
+ options={
+ 'verbose_name_plural': 'miscellaneous',
+ },
+ ),
+ migrations.CreateModel(
+ name='MiscService',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(help_text='Raw name used for internal referenciation, i.e. service match definition', max_length=32, unique=True, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('verbose_name', models.CharField(blank=True, help_text='Human readable name', max_length=256, verbose_name='verbose name')),
+ ('description', models.TextField(blank=True, help_text='Optional description', verbose_name='description')),
+ ('has_identifier', models.BooleanField(default=True, help_text='Designates if this service has a unique text field that identifies it or not.', verbose_name='has identifier')),
+ ('has_amount', models.BooleanField(default=False, help_text='Designates whether this service has amount property or not.', verbose_name='has amount')),
+ ('is_active', models.BooleanField(default=True, help_text='Whether new instances of this service can be created or not. Unselect this instead of deleting services.', verbose_name='active')),
+ ],
+ ),
+ migrations.AddField(
+ model_name='miscellaneous',
+ name='service',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='instances', to='miscellaneous.MiscService', verbose_name='service'),
+ ),
+ migrations.AlterField(
+ model_name='miscellaneous',
+ name='identifier',
+ field=orchestra.models.fields.NullableCharField(db_index=True, help_text='A unique identifier for this service.', max_length=256, null=True, unique=True, verbose_name='identifier'),
+ ),
+ ]
diff --git a/orchestra/contrib/orchestration/migrations/0001_squashed_0009_rename_route_async_run_async.py b/orchestra/contrib/orchestration/migrations/0001_squashed_0009_rename_route_async_run_async.py
new file mode 100644
index 00000000..6e5d1c72
--- /dev/null
+++ b/orchestra/contrib/orchestration/migrations/0001_squashed_0009_rename_route_async_run_async.py
@@ -0,0 +1,149 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:27
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+import orchestra.models.fields
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('orchestration', '0001_initial'), ('orchestration', '0002_auto_20150506_1420'), ('orchestration', '0003_auto_20150512_1512'), ('orchestration', '0004_route_async_actions'), ('orchestration', '0005_auto_20150709_1016'), ('orchestration', '0006_auto_20160219_1110'), ('orchestration', '0007_auto_20170528_2011'), ('orchestration', '0008_auto_20190805_1134'), ('orchestration', '0009_rename_route_async_run_async')]
+
+ initial = True
+
+ dependencies = [
+ ('contenttypes', '0002_remove_content_type_name'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='BackendLog',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('backend', models.CharField(max_length=256, verbose_name='backend')),
+ ('state', models.CharField(choices=[('RECEIVED', 'RECEIVED'), ('TIMEOUT', 'TIMEOUT'), ('STARTED', 'STARTED'), ('SUCCESS', 'SUCCESS'), ('FAILURE', 'FAILURE'), ('ERROR', 'ERROR'), ('ABORTED', 'ABORTED'), ('REVOKED', 'REVOKED')], default='RECEIVED', max_length=16, verbose_name='state')),
+ ('script', models.TextField(verbose_name='script')),
+ ('stdout', models.TextField(verbose_name='stdout')),
+ ('stderr', models.TextField(verbose_name='stdin')),
+ ('traceback', models.TextField(verbose_name='traceback')),
+ ('exit_code', models.IntegerField(null=True, verbose_name='exit code')),
+ ('task_id', models.CharField(help_text='Celery task ID when used as execution backend', max_length=36, null=True, unique=True, verbose_name='task ID')),
+ ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created')),
+ ('updated_at', models.DateTimeField(auto_now=True, verbose_name='updated')),
+ ],
+ options={
+ 'get_latest_by': 'id',
+ },
+ ),
+ migrations.CreateModel(
+ name='BackendOperation',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('backend', models.CharField(max_length=256, verbose_name='backend')),
+ ('action', models.CharField(max_length=64, verbose_name='action')),
+ ('object_id', models.PositiveIntegerField(null=True)),
+ ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
+ ('log', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='operations', to='orchestration.BackendLog')),
+ ('instance_repr', models.CharField(default='', max_length=256, verbose_name='instance representation')),
+ ],
+ options={
+ 'verbose_name_plural': 'Operations',
+ 'verbose_name': 'Operation',
+ },
+ ),
+ migrations.CreateModel(
+ name='Route',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('backend', models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('Apache2Controller', '[S] Apache 2'), ('BSCWController', '[S] BSCW SaaS'), ('Bind9MasterDomainController', '[S] Bind9 master domain'), ('Bind9SlaveDomainController', '[S] Bind9 slave domain'), ('DokuWikiMuController', '[S] DokuWiki multisite'), ('DovecotPostfixPasswdVirtualUserController', '[S] Dovecot-Postfix virtualuser'), ('DrupalMuController', '[S] Drupal multisite'), ('GitLabSaaSController', '[S] GitLab SaaS'), ('AutoresponseController', '[S] Mail autoresponse'), ('MailmanController', '[S] Mailman'), ('MySQLController', '[S] MySQL database'), ('MySQLUserController', '[S] MySQL user'), ('PHPController', '[S] PHP FPM/FCGID'), ('PostfixAddressController', '[S] Postfix address'), ('uWSGIPythonController', '[S] Python uWSGI'), ('StaticController', '[S] Static'), ('SymbolicLinkController', '[S] Symbolic link webapp'), ('UNIXUserMaildirController', '[S] UNIX maildir user'), ('UNIXUserController', '[S] UNIX user'), ('WebalizerAppController', '[S] Webalizer App'), ('WebalizerController', '[S] Webalizer Content'), ('WordPressController', '[S] Wordpress'), ('WordpressMuController', '[S] Wordpress multisite'), ('PhpListSaaSController', '[S] phpList SaaS')], max_length=256, verbose_name='backend')),
+ ('match', models.CharField(blank=True, default='True', help_text='Python expression used for selecting the targe host, instance referes to the current object.', max_length=256, verbose_name='match')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Server',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(help_text='Verbose name or hostname of this server.', max_length=256, unique=True, verbose_name='name')),
+ ('address', orchestra.models.fields.NullableCharField(blank=True, help_text='Optional IP address or domain name. If blank, name field will be used for address resolution.
If the IP address never changes you can set this field and save DNS requests.', max_length=256, null=True, unique=True, validators=[orchestra.core.validators.OrValidator(orchestra.core.validators.validate_ip_address, orchestra.core.validators.validate_hostname)], verbose_name='address')),
+ ('description', models.TextField(blank=True, verbose_name='description')),
+ ('os', models.CharField(choices=[('LINUX', 'Linux')], default='LINUX', max_length=32, verbose_name='operative system')),
+ ],
+ ),
+ migrations.AddField(
+ model_name='route',
+ name='host',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orchestration.Server', verbose_name='host'),
+ ),
+ migrations.AddField(
+ model_name='backendlog',
+ name='server',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='execution_logs', to='orchestration.Server', verbose_name='server'),
+ ),
+ migrations.AddField(
+ model_name='route',
+ name='run_async',
+ field=models.BooleanField(default=False, help_text='Whether or not block the request/response cycle waitting this backend to finish its execution. Usually you want slave servers to run asynchronously.'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='route',
+ unique_together=set([('backend', 'host')]),
+ ),
+ migrations.AlterField(
+ model_name='backendlog',
+ name='state',
+ field=models.CharField(choices=[('RECEIVED', 'RECEIVED'), ('TIMEOUT', 'TIMEOUT'), ('STARTED', 'STARTED'), ('SUCCESS', 'SUCCESS'), ('FAILURE', 'FAILURE'), ('ERROR', 'ERROR'), ('ABORTED', 'ABORTED'), ('REVOKED', 'REVOKED'), ('NOTHING', 'NOTHING')], default='RECEIVED', max_length=16, verbose_name='state'),
+ ),
+ migrations.AlterField(
+ model_name='backendlog',
+ name='stderr',
+ field=models.TextField(verbose_name='stderr'),
+ ),
+ migrations.AlterField(
+ model_name='route',
+ name='backend',
+ field=models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('Apache2Controller', '[S] Apache 2'), ('BSCWController', '[S] BSCW SaaS'), ('Bind9MasterDomainController', '[S] Bind9 master domain'), ('Bind9SlaveDomainController', '[S] Bind9 slave domain'), ('DokuWikiMuController', '[S] DokuWiki multisite'), ('DovecotPostfixPasswdVirtualUserController', '[S] Dovecot-Postfix virtualuser'), ('DrupalMuController', '[S] Drupal multisite'), ('GitLabSaaSController', '[S] GitLab SaaS'), ('AutoresponseController', '[S] Mail autoresponse'), ('MailmanController', '[S] Mailman'), ('MailmanVirtualDomainController', '[S] Mailman virtdomain-only'), ('MySQLController', '[S] MySQL database'), ('MySQLUserController', '[S] MySQL user'), ('PHPController', '[S] PHP FPM/FCGID'), ('PostfixAddressController', '[S] Postfix address'), ('PostfixAddressVirtualDomainController', '[S] Postfix address virtdomain-only'), ('uWSGIPythonController', '[S] Python uWSGI'), ('StaticController', '[S] Static'), ('SymbolicLinkController', '[S] Symbolic link webapp'), ('SyncBind9MasterDomainController', '[S] Sync Bind9 master domain'), ('SyncBind9SlaveDomainController', '[S] Sync Bind9 slave domain'), ('UNIXUserMaildirController', '[S] UNIX maildir user'), ('UNIXUserController', '[S] UNIX user'), ('WebalizerAppController', '[S] Webalizer App'), ('WebalizerController', '[S] Webalizer Content'), ('WordPressController', '[S] Wordpress'), ('WordpressMuController', '[S] Wordpress multisite'), ('PhpListSaaSController', '[S] phpList SaaS')], max_length=256, verbose_name='backend'),
+ ),
+ migrations.AddField(
+ model_name='route',
+ name='async_actions',
+ field=orchestra.models.fields.MultiSelectField(blank=True, help_text='Specify individual actions to be executed asynchronoulsy.', max_length=256),
+ ),
+ migrations.AlterField(
+ model_name='backendlog',
+ name='created_at',
+ field=models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created'),
+ ),
+ migrations.AlterField(
+ model_name='route',
+ name='backend',
+ field=models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic'), ('Apache2Controller', '[S] Apache 2'), ('BSCWController', '[S] BSCW SaaS'), ('Bind9MasterDomainController', '[S] Bind9 master domain'), ('Bind9SlaveDomainController', '[S] Bind9 slave domain'), ('DokuWikiMuController', '[S] DokuWiki multisite'), ('DrupalMuController', '[S] Drupal multisite'), ('GitLabSaaSController', '[S] GitLab SaaS'), ('AutoresponseController', '[S] Mail autoresponse'), ('MailScannerSpamRuleController', '[S] MailScanner ruleset'), ('MailmanController', '[S] Mailman'), ('MailmanVirtualDomainController', '[S] Mailman virtdomain-only'), ('MoodleController', '[S] Moodle'), ('MoodleWWWRootController', '[S] Moodle WWWRoot (required)'), ('MoodleMuController', '[S] Moodle multisite'), ('MySQLController', '[S] MySQL database'), ('MySQLUserController', '[S] MySQL user'), ('PHPController', '[S] PHP FPM/FCGID'), ('PangeaProxmoxOVZ', '[S] PangeaProxmoxOVZ'), ('PostfixAddressController', '[S] Postfix address'), ('PostfixAddressVirtualDomainController', '[S] Postfix address virtdomain-only'), ('PostfixRecipientAccessController', '[S] Postfix recipient access'), ('ProxmoxOVZ', '[S] ProxmoxOVZ'), ('uWSGIPythonController', '[S] Python uWSGI'), ('StaticController', '[S] Static'), ('SymbolicLinkController', '[S] Symbolic link webapp'), ('SyncBind9MasterDomainController', '[S] Sync Bind9 master domain'), ('SyncBind9SlaveDomainController', '[S] Sync Bind9 slave domain'), ('UNIXUserMaildirController', '[S] UNIX maildir user'), ('UNIXUserController', '[S] UNIX user'), ('WebalizerAppController', '[S] Webalizer App'), ('WebalizerController', '[S] Webalizer Content'), ('WordPressURLController', '[S] WordPress URL'), ('WordPressController', '[S] Wordpress'), ('WordpressMuController', '[S] Wordpress multisite'), ('OwnCloudController', '[S] ownCloud SaaS'), ('PhpListSaaSController', '[S] phpList SaaS')], max_length=256, verbose_name='backend'),
+ ),
+ migrations.AlterIndexTogether(
+ name='backendoperation',
+ index_together=set([('content_type', 'object_id')]),
+ ),
+ migrations.AlterField(
+ model_name='route',
+ name='backend',
+ field=models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('ProxmoxOpenVZTraffic', '[M] ProxmoxOpenVZTraffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('NextCloudDiskQuota', '[M] nextCloud SaaS Disk Quota'), ('NextcloudTraffic', '[M] nextCloud SaaS Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic'), ('Apache2Controller', '[S] Apache 2'), ('BSCWController', '[S] BSCW SaaS'), ('Bind9MasterDomainController', '[S] Bind9 master domain'), ('Bind9SlaveDomainController', '[S] Bind9 slave domain'), ('DokuWikiMuController', '[S] DokuWiki multisite'), ('DrupalMuController', '[S] Drupal multisite'), ('GitLabSaaSController', '[S] GitLab SaaS'), ('LetsEncryptController', "[S] Let's encrypt!"), ('LxcController', '[S] LxcController'), ('AutoresponseController', '[S] Mail autoresponse'), ('MailScannerSpamRuleController', '[S] MailScanner ruleset'), ('MailmanController', '[S] Mailman'), ('MailmanVirtualDomainController', '[S] Mailman virtdomain-only'), ('MoodleController', '[S] Moodle'), ('MoodleWWWRootController', '[S] Moodle WWWRoot (required)'), ('MoodleMuController', '[S] Moodle multisite'), ('MySQLController', '[S] MySQL database'), ('MySQLUserController', '[S] MySQL user'), ('PHPController', '[S] PHP FPM/FCGID'), ('PangeaProxmoxOVZ', '[S] PangeaProxmoxOVZ'), ('PostfixAddressController', '[S] Postfix address'), ('PostfixAddressVirtualDomainController', '[S] Postfix address virtdomain-only'), ('PostfixRecipientAccessController', '[S] Postfix recipient access'), ('ProxmoxOVZ', '[S] ProxmoxOVZ'), ('uWSGIPythonController', '[S] Python uWSGI'), ('StaticController', '[S] Static'), ('SymbolicLinkController', '[S] Symbolic link webapp'), ('SyncBind9MasterDomainController', '[S] Sync Bind9 master domain'), ('SyncBind9SlaveDomainController', '[S] Sync Bind9 slave domain'), ('UNIXUserMaildirController', '[S] UNIX maildir user'), ('UNIXUserController', '[S] UNIX user'), ('WebalizerAppController', '[S] Webalizer App'), ('WebalizerController', '[S] Webalizer Content'), ('WordPressForceSSLController', '[S] WordPress Force SSL'), ('WordPressURLController', '[S] WordPress URL'), ('WordPressController', '[S] Wordpress'), ('WordpressMuController', '[S] Wordpress multisite'), ('NextCloudController', '[S] nextCloud SaaS'), ('OwnCloudController', '[S] ownCloud SaaS'), ('PhpListSaaSController', '[S] phpList SaaS')], max_length=256, verbose_name='backend'),
+ ),
+ migrations.AlterField(
+ model_name='route',
+ name='host',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='routes', to='orchestration.Server', verbose_name='host'),
+ ),
+ migrations.AlterField(
+ model_name='route',
+ name='backend',
+ field=models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('ProxmoxOpenVZTraffic', '[M] ProxmoxOpenVZTraffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('NextCloudDiskQuota', '[M] nextCloud SaaS Disk Quota'), ('NextcloudTraffic', '[M] nextCloud SaaS Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic'), ('Apache2Controller', '[S] Apache 2'), ('BSCWController', '[S] BSCW SaaS'), ('Bind9MasterDomainController', '[S] Bind9 master domain'), ('Bind9SlaveDomainController', '[S] Bind9 slave domain'), ('DokuWikiMuController', '[S] DokuWiki multisite'), ('DrupalMuController', '[S] Drupal multisite'), ('GitLabSaaSController', '[S] GitLab SaaS'), ('LetsEncryptController', "[S] Let's encrypt!"), ('LxcController', '[S] LxcController'), ('AutoresponseController', '[S] Mail autoresponse'), ('MailScannerSpamRuleController', '[S] MailScanner ruleset'), ('MailmanController', '[S] Mailman'), ('MailmanVirtualDomainController', '[S] Mailman virtdomain-only'), ('MoodleController', '[S] Moodle'), ('MoodleWWWRootController', '[S] Moodle WWWRoot (required)'), ('MoodleMuController', '[S] Moodle multisite'), ('MySQLController', '[S] MySQL database'), ('MySQLUserController', '[S] MySQL user'), ('PHPController', '[S] PHP FPM/FCGID'), ('PangeaProxmoxOVZ', '[S] PangeaProxmoxOVZ'), ('PostfixAddressController', '[S] Postfix address'), ('PostfixAddressVirtualDomainController', '[S] Postfix address virtdomain-only'), ('PostfixRecipientAccessController', '[S] Postfix recipient access'), ('ProxmoxOVZ', '[S] ProxmoxOVZ'), ('uWSGIPythonController', '[S] Python uWSGI'), ('RoundcubeIdentityController', '[S] Roundcube Identity Controller'), ('StaticController', '[S] Static'), ('SymbolicLinkController', '[S] Symbolic link webapp'), ('SyncBind9MasterDomainController', '[S] Sync Bind9 master domain'), ('SyncBind9SlaveDomainController', '[S] Sync Bind9 slave domain'), ('UNIXUserMaildirController', '[S] UNIX maildir user'), ('UNIXUserController', '[S] UNIX user'), ('WebalizerAppController', '[S] Webalizer App'), ('WebalizerController', '[S] Webalizer Content'), ('WordPressForceSSLController', '[S] WordPress Force SSL'), ('WordPressURLController', '[S] WordPress URL'), ('WordPressController', '[S] Wordpress'), ('WordpressMuController', '[S] Wordpress multisite'), ('NextCloudController', '[S] nextCloud SaaS'), ('OwnCloudController', '[S] ownCloud SaaS'), ('PhpListSaaSController', '[S] phpList SaaS')], max_length=256, verbose_name='backend'),
+ ),
+ migrations.AlterField(
+ model_name='route',
+ name='backend',
+ field=models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('ProxmoxOpenVZTraffic', '[M] ProxmoxOpenVZTraffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('NextCloudDiskQuota', '[M] nextCloud SaaS Disk Quota'), ('NextcloudTraffic', '[M] nextCloud SaaS Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic'), ('Apache2Controller', '[S] Apache 2'), ('BSCWController', '[S] BSCW SaaS'), ('Bind9MasterDomainController', '[S] Bind9 master domain'), ('Bind9SlaveDomainController', '[S] Bind9 slave domain'), ('DokuWikiMuController', '[S] DokuWiki multisite'), ('DrupalMuController', '[S] Drupal multisite'), ('GitLabSaaSController', '[S] GitLab SaaS'), ('LetsEncryptController', "[S] Let's encrypt!"), ('LxcController', '[S] LxcController'), ('AutoresponseController', '[S] Mail autoresponse'), ('MailmanController', '[S] Mailman'), ('MailmanVirtualDomainController', '[S] Mailman virtdomain-only'), ('MoodleController', '[S] Moodle'), ('MoodleWWWRootController', '[S] Moodle WWWRoot (required)'), ('MoodleMuController', '[S] Moodle multisite'), ('MySQLController', '[S] MySQL database'), ('MySQLUserController', '[S] MySQL user'), ('PHPController', '[S] PHP FPM/FCGID'), ('PostfixAddressController', '[S] Postfix address'), ('PostfixAddressVirtualDomainController', '[S] Postfix address virtdomain-only'), ('ProxmoxOVZ', '[S] ProxmoxOVZ'), ('uWSGIPythonController', '[S] Python uWSGI'), ('RoundcubeIdentityController', '[S] Roundcube Identity Controller'), ('StaticController', '[S] Static'), ('SymbolicLinkController', '[S] Symbolic link webapp'), ('UNIXUserMaildirController', '[S] UNIX maildir user'), ('UNIXUserController', '[S] UNIX user'), ('WebalizerAppController', '[S] Webalizer App'), ('WebalizerController', '[S] Webalizer Content'), ('WordPressForceSSLController', '[S] WordPress Force SSL'), ('WordPressURLController', '[S] WordPress URL'), ('WordPressController', '[S] Wordpress'), ('WordpressMuController', '[S] Wordpress multisite'), ('NextCloudController', '[S] nextCloud SaaS'), ('OwnCloudController', '[S] ownCloud SaaS'), ('PhpListSaaSController', '[S] phpList SaaS')], max_length=256, verbose_name='backend'),
+ ),
+ ]
diff --git a/orchestra/contrib/orders/migrations/0001_squashed_0006_auto_20210422_1108.py b/orchestra/contrib/orders/migrations/0001_squashed_0006_auto_20210422_1108.py
new file mode 100644
index 00000000..b9091268
--- /dev/null
+++ b/orchestra/contrib/orders/migrations/0001_squashed_0006_auto_20210422_1108.py
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:09
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import django.utils.timezone
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('orders', '0001_initial'), ('orders', '0002_auto_20150709_1018'), ('orders', '0003_order_content_object_repr'), ('orders', '0004_auto_20150729_0945'), ('orders', '0005_auto_20160219_1107'), ('orders', '0006_auto_20210422_1108')]
+
+ initial = True
+
+ dependencies = [
+ ('contenttypes', '0002_remove_content_type_name'),
+ ('services', '__first__'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='MetricStorage',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('value', models.DecimalField(decimal_places=2, max_digits=16, verbose_name='value')),
+ ('created_on', models.DateField(auto_now_add=True, verbose_name='created')),
+ ('updated_on', models.DateTimeField(verbose_name='updated')),
+ ],
+ options={
+ 'get_latest_by': 'id',
+ },
+ ),
+ migrations.CreateModel(
+ name='Order',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('object_id', models.PositiveIntegerField(null=True)),
+ ('registered_on', models.DateField(db_index=True, default=django.utils.timezone.now, verbose_name='registered')),
+ ('cancelled_on', models.DateField(blank=True, null=True, verbose_name='cancelled')),
+ ('billed_on', models.DateField(blank=True, null=True, verbose_name='billed')),
+ ('billed_until', models.DateField(blank=True, null=True, verbose_name='billed until')),
+ ('ignore', models.BooleanField(default=False, verbose_name='ignore')),
+ ('description', models.TextField(blank=True, verbose_name='description')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orders', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
+ ('service', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='orders', to='services.Service', verbose_name='service')),
+ ('content_object_repr', models.CharField(editable=False, help_text='Used for searches.', max_length=256, verbose_name='content object representation')),
+ ('billed_metric', models.DecimalField(blank=True, decimal_places=2, max_digits=16, null=True, verbose_name='billed metric')),
+ ],
+ options={
+ 'get_latest_by': 'id',
+ },
+ ),
+ migrations.AddField(
+ model_name='metricstorage',
+ name='order',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='metrics', to='orders.Order', verbose_name='order'),
+ ),
+ migrations.AlterIndexTogether(
+ name='order',
+ index_together=set([('content_type', 'object_id')]),
+ ),
+ ]
diff --git a/orchestra/contrib/payments/migrations/0001_squashed_0004_auto_20210330_1049.py b/orchestra/contrib/payments/migrations/0001_squashed_0004_auto_20210330_1049.py
new file mode 100644
index 00000000..d4b1b8b8
--- /dev/null
+++ b/orchestra/contrib/payments/migrations/0001_squashed_0004_auto_20210330_1049.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:27
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import jsonfield.fields
+import orchestra.models.fields
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('payments', '0001_initial'), ('payments', '0002_auto_20150709_1018'), ('payments', '0003_auto_20170528_2011'), ('payments', '0004_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('bills', '0002_auto_20150429_1417'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='PaymentSource',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('method', models.CharField(choices=[('CreditCard', 'Credit card'), ('SEPADirectDebit', 'SEPA Direct Debit')], max_length=32, verbose_name='method')),
+ ('data', jsonfield.fields.JSONField(default={}, verbose_name='data')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='paymentsources', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Transaction',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('state', models.CharField(choices=[('WAITTING_PROCESSING', 'Waitting processing'), ('WAITTING_EXECUTION', 'Waitting execution'), ('EXECUTED', 'Executed'), ('SECURED', 'Secured'), ('REJECTED', 'Rejected')], default='WAITTING_PROCESSING', max_length=32, verbose_name='state')),
+ ('amount', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='amount')),
+ ('currency', models.CharField(default='Eur', max_length=10)),
+ ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created')),
+ ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified')),
+ ('bill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to='bills.Bill', verbose_name='bill')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='TransactionProcess',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('data', jsonfield.fields.JSONField(blank=True, verbose_name='data')),
+ ('file', orchestra.models.fields.PrivateFileField(blank=True, upload_to='', verbose_name='file')),
+ ('state', models.CharField(choices=[('CREATED', 'Created'), ('EXECUTED', 'Executed'), ('ABORTED', 'Aborted'), ('COMMITED', 'Commited')], default='CREATED', max_length=16, verbose_name='state')),
+ ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created')),
+ ('updated_at', models.DateTimeField(auto_now=True, verbose_name='updated')),
+ ],
+ options={
+ 'verbose_name_plural': 'Transaction processes',
+ },
+ ),
+ migrations.AddField(
+ model_name='transaction',
+ name='process',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='transactions', to='payments.TransactionProcess', verbose_name='process'),
+ ),
+ migrations.AddField(
+ model_name='transaction',
+ name='source',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='transactions', to='payments.PaymentSource', verbose_name='source'),
+ ),
+ ]
diff --git a/orchestra/contrib/plans/migrations/0001_squashed_0003_auto_20210422_1108.py b/orchestra/contrib/plans/migrations/0001_squashed_0003_auto_20210422_1108.py
new file mode 100644
index 00000000..292fc0cc
--- /dev/null
+++ b/orchestra/contrib/plans/migrations/0001_squashed_0003_auto_20210422_1108.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:09
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('plans', '0001_initial'), ('plans', '0002_auto_20160114_1713'), ('plans', '0003_auto_20210422_1108')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('services', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='ContractedPlan',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='plans', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ],
+ options={
+ 'verbose_name_plural': 'plans',
+ },
+ ),
+ migrations.CreateModel(
+ name='Plan',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=32, unique=True, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('verbose_name', models.CharField(blank=True, max_length=128, verbose_name='verbose_name')),
+ ('is_active', models.BooleanField(default=True, help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
+ ('is_default', models.BooleanField(default=False, help_text='Designates whether this plan is used by default or not.', verbose_name='default')),
+ ('is_combinable', models.BooleanField(default=True, help_text='Designates whether this plan can be combined with other plans or not.', verbose_name='combinable')),
+ ('allow_multiple', models.BooleanField(default=False, help_text='Designates whether this plan allow for multiple contractions.', verbose_name='allow multiple')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Rate',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('quantity', models.PositiveIntegerField(blank=True, help_text='See rate algorihm help text.', null=True, verbose_name='quantity')),
+ ('price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='price')),
+ ('plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rates', to='plans.Plan', verbose_name='plan')),
+ ('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rates', to='services.Service', verbose_name='service')),
+ ],
+ ),
+ migrations.AddField(
+ model_name='contractedplan',
+ name='plan',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contracts', to='plans.Plan', verbose_name='plan'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='rate',
+ unique_together=set([('service', 'plan', 'quantity')]),
+ ),
+ migrations.AlterField(
+ model_name='rate',
+ name='plan',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rates', to='plans.Plan', verbose_name='plan'),
+ ),
+ migrations.AlterField(
+ model_name='rate',
+ name='plan',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='rates', to='plans.Plan', verbose_name='plan'),
+ ),
+ ]
diff --git a/orchestra/contrib/resources/migrations/0001_squashed_0011_auto_20170528_2005.py b/orchestra/contrib/resources/migrations/0001_squashed_0011_auto_20170528_2005.py
new file mode 100644
index 00000000..b0f8b8e6
--- /dev/null
+++ b/orchestra/contrib/resources/migrations/0001_squashed_0011_auto_20170528_2005.py
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:26
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+import django.utils.timezone
+import orchestra.contrib.resources.validators
+import orchestra.core.validators
+import orchestra.models.fields
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('resources', '0001_initial'), ('resources', '0002_auto_20150502_1429'), ('resources', '0003_auto_20150502_1433'), ('resources', '0004_auto_20150503_1559'), ('resources', '0005_auto_20150723_0940'), ('resources', '0006_auto_20150723_1249'), ('resources', '0007_auto_20150723_1251'), ('resources', '0008_monitordata_state'), ('resources', '0009_auto_20150804_1450'), ('resources', '0010_auto_20160219_1108'), ('resources', '0011_auto_20170528_2005')]
+
+ initial = True
+
+ dependencies = [
+ ('djcelery', '__first__'),
+ ('contenttypes', '0002_remove_content_type_name'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='MonitorData',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('monitor', models.CharField(choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('ProxmoxOpenVZTraffic', '[M] ProxmoxOpenVZTraffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('NextCloudDiskQuota', '[M] nextCloud SaaS Disk Quota'), ('NextcloudTraffic', '[M] nextCloud SaaS Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic')], db_index=True, max_length=256, verbose_name='monitor')),
+ ('object_id', models.PositiveIntegerField(verbose_name='object id')),
+ ('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now, verbose_name='created')),
+ ('value', models.DecimalField(decimal_places=2, max_digits=16, verbose_name='value')),
+ ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
+ ('content_object_repr', models.CharField(default='', editable=False, max_length=256, verbose_name='content object representation')),
+ ('state', models.DecimalField(decimal_places=2, help_text='Optional field used to store current state needed for diff-based monitoring.', max_digits=16, null=True, verbose_name='state')),
+ ],
+ options={
+ 'get_latest_by': 'id',
+ 'verbose_name_plural': 'monitor data',
+ },
+ ),
+ migrations.CreateModel(
+ name='Resource',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(help_text='Required. 32 characters or fewer. Lowercase letters, digits and hyphen only.', max_length=32, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('verbose_name', models.CharField(max_length=256, verbose_name='verbose name')),
+ ('aggregation', models.CharField(choices=[('last-10-days-avg', 'Last 10 days AVG'), ('last', 'Last value'), ('monthly-avg', 'Monthly AVG'), ('monthly-sum', 'Monthly Sum')], default='last-10-days-avg', help_text='Method used for aggregating this resource monitored data.', max_length=16, verbose_name='aggregation')),
+ ('on_demand', models.BooleanField(default=False, help_text='If enabled the resource will not be pre-allocated, but allocated under the application demand', verbose_name='on demand')),
+ ('default_allocation', models.PositiveIntegerField(blank=True, help_text='Default allocation value used when this is not an on demand resource', null=True, verbose_name='default allocation')),
+ ('unit', models.CharField(help_text='The unit in which this resource is represented. For example GB, KB or subscribers', max_length=16, verbose_name='unit')),
+ ('scale', models.CharField(help_text='Scale in which this resource monitoring resoults should be prorcessed to match with unit. e.g. 10**9', max_length=32, validators=[orchestra.contrib.resources.validators.validate_scale], verbose_name='scale')),
+ ('disable_trigger', models.BooleanField(default=False, help_text='Disables monitors exeeded and recovery triggers', verbose_name='disable trigger')),
+ ('monitors', orchestra.models.fields.MultiSelectField(blank=True, choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic')], help_text='Monitor backends used for monitoring this resource.', max_length=256, verbose_name='monitors')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ('content_type', models.ForeignKey(help_text='Model where this resource will be hooked.', on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
+ ('crontab', models.ForeignKey(blank=True, help_text='Crontab for periodic execution. Leave it empty to disable periodic monitoring', null=True, on_delete=django.db.models.deletion.CASCADE, to='djcelery.CrontabSchedule', verbose_name='crontab')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='ResourceData',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('object_id', models.PositiveIntegerField(verbose_name='object id')),
+ ('used', models.DecimalField(decimal_places=3, editable=False, max_digits=16, null=True, verbose_name='used')),
+ ('updated_at', models.DateTimeField(editable=False, null=True, verbose_name='updated')),
+ ('allocated', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True, verbose_name='allocated')),
+ ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
+ ('resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dataset', to='resources.Resource', verbose_name='resource')),
+ ('content_object_repr', models.CharField(default='', editable=False, max_length=256, verbose_name='content object representation')),
+ ],
+ options={
+ 'verbose_name_plural': 'resource data',
+ },
+ ),
+ migrations.AlterUniqueTogether(
+ name='resourcedata',
+ unique_together=set([('resource', 'content_type', 'object_id')]),
+ ),
+ migrations.AlterField(
+ model_name='resource',
+ name='disable_trigger',
+ field=models.BooleanField(default=True, help_text='Disables monitors exeeded and recovery triggers', verbose_name='disable trigger'),
+ ),
+ migrations.AlterField(
+ model_name='resource',
+ name='monitors',
+ field=orchestra.models.fields.MultiSelectField(blank=True, choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('OpenVZTraffic', '[M] OpenVZTraffic'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic')], help_text='Monitor backends used for monitoring this resource.', max_length=256, verbose_name='monitors'),
+ ),
+ migrations.AlterField(
+ model_name='resource',
+ name='crontab',
+ field=models.ForeignKey(blank=True, help_text='Crontab for periodic execution. Leave it empty to disable periodic monitoring', null=True, on_delete=django.db.models.deletion.SET_NULL, to='djcelery.CrontabSchedule', verbose_name='crontab'),
+ ),
+ migrations.AlterField(
+ model_name='resource',
+ name='monitors',
+ field=orchestra.models.fields.MultiSelectField(blank=True, choices=[('Apache2Traffic', '[M] Apache 2 Traffic'), ('ApacheTrafficByName', '[M] ApacheTrafficByName'), ('DokuWikiMuTraffic', '[M] DokuWiki MU Traffic'), ('DovecotMaildirDisk', '[M] Dovecot Maildir size'), ('Exim4Traffic', '[M] Exim4 traffic'), ('MailmanSubscribers', '[M] Mailman subscribers'), ('MailmanTraffic', '[M] Mailman traffic'), ('MysqlDisk', '[M] MySQL disk'), ('PostfixMailscannerTraffic', '[M] Postfix-Mailscanner traffic'), ('ProxmoxOpenVZTraffic', '[M] ProxmoxOpenVZTraffic'), ('UNIXUserDisk', '[M] UNIX user disk'), ('VsFTPdTraffic', '[M] VsFTPd traffic'), ('WordpressMuTraffic', '[M] Wordpress MU Traffic'), ('NextCloudDiskQuota', '[M] nextCloud SaaS Disk Quota'), ('NextcloudTraffic', '[M] nextCloud SaaS Traffic'), ('OwnCloudDiskQuota', '[M] ownCloud SaaS Disk Quota'), ('OwncloudTraffic', '[M] ownCloud SaaS Traffic'), ('PhpListTraffic', '[M] phpList SaaS Traffic')], help_text='Monitor backends used for monitoring this resource.', max_length=256, verbose_name='monitors'),
+ ),
+ migrations.AlterUniqueTogether(
+ name='resource',
+ unique_together=set([('name', 'content_type'), ('verbose_name', 'content_type')]),
+ ),
+ migrations.AlterField(
+ model_name='resourcedata',
+ name='object_id',
+ field=models.PositiveIntegerField(db_index=True, verbose_name='object id'),
+ ),
+ migrations.AlterField(
+ model_name='resourcedata',
+ name='allocated',
+ field=models.PositiveIntegerField(blank=True, null=True, verbose_name='allocated'),
+ ),
+ migrations.AlterField(
+ model_name='resourcedata',
+ name='object_id',
+ field=models.PositiveIntegerField(verbose_name='object id'),
+ ),
+ migrations.AlterIndexTogether(
+ name='monitordata',
+ index_together=set([('content_type', 'object_id')]),
+ ),
+ migrations.AlterIndexTogether(
+ name='resourcedata',
+ index_together=set([('content_type', 'object_id')]),
+ ),
+ ]
diff --git a/orchestra/contrib/saas/migrations/0001_squashed_0004_auto_20210422_1108.py b/orchestra/contrib/saas/migrations/0001_squashed_0004_auto_20210422_1108.py
new file mode 100644
index 00000000..419dea27
--- /dev/null
+++ b/orchestra/contrib/saas/migrations/0001_squashed_0004_auto_20210422_1108.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:09
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import jsonfield.fields
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('saas', '0001_initial'), ('saas', '0002_auto_20151001_0923'), ('saas', '0003_auto_20170528_2011'), ('saas', '0004_auto_20210422_1108')]
+
+ initial = True
+
+ dependencies = [
+ ('databases', '0001_initial'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='SaaS',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('service', models.CharField(choices=[('bscw', 'BSCW'), ('DokuWikiService', 'Dowkuwiki'), ('DrupalService', 'Drupal'), ('gitlab', 'GitLab'), ('MoodleService', 'Moodle'), ('seafile', 'SeaFile'), ('WordPressService', 'WordPress'), ('phplist', 'phpList')], max_length=32, verbose_name='service')),
+ ('name', models.CharField(help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.', max_length=64, validators=[orchestra.core.validators.validate_username], verbose_name='Name')),
+ ('is_active', models.BooleanField(default=True, help_text='Designates whether this service should be treated as active. ', verbose_name='active')),
+ ('data', jsonfield.fields.JSONField(default={}, help_text='Extra information dependent of each service.', verbose_name='data')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='saas', to=settings.AUTH_USER_MODEL, verbose_name='account')),
+ ('database', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='databases.Database')),
+ ('custom_url', models.URLField(blank=True, help_text='Optional and alternative URL for accessing this service instance. A related website will be automatically configured if needed.', verbose_name='custom URL')),
+ ],
+ options={
+ 'verbose_name_plural': 'SaaS',
+ 'verbose_name': 'SaaS',
+ },
+ ),
+ migrations.AlterUniqueTogether(
+ name='saas',
+ unique_together=set([('name', 'service')]),
+ ),
+ migrations.AlterField(
+ model_name='saas',
+ name='service',
+ field=models.CharField(choices=[('bscw', 'BSCW'), ('dokuwiki', 'Dowkuwiki'), ('drupal', 'Drupal'), ('gitlab', 'GitLab'), ('moodle', 'Moodle'), ('seafile', 'SeaFile'), ('wordpress', 'WordPress'), ('phplist', 'phpList')], max_length=32, verbose_name='service'),
+ ),
+ migrations.AlterField(
+ model_name='saas',
+ name='custom_url',
+ field=models.URLField(blank=True, help_text='Optional and alternative URL for accessing this service instance. i.e. https://wiki.mydomain/doku/
A related website will be automatically configured if needed.', verbose_name='custom URL'),
+ ),
+ migrations.AlterField(
+ model_name='saas',
+ name='name',
+ field=models.CharField(help_text='Required. 64 characters or fewer. Letters, digits and ./- only.', max_length=64, validators=[orchestra.core.validators.validate_hostname], verbose_name='Name'),
+ ),
+ migrations.AlterField(
+ model_name='saas',
+ name='service',
+ field=models.CharField(choices=[('bscw', 'BSCW'), ('dokuwiki', 'Dowkuwiki'), ('drupal', 'Drupal'), ('gitlab', 'GitLab'), ('moodle', 'Moodle'), ('wordpress', 'WordPress'), ('nextcloud', 'nextCloud'), ('owncloud', 'ownCloud'), ('phplist', 'phpList')], max_length=32, verbose_name='service'),
+ ),
+ migrations.AlterField(
+ model_name='saas',
+ name='database',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='databases.Database'),
+ ),
+ ]
diff --git a/orchestra/contrib/services/migrations/0001_squashed_0015_auto_20210330_1049.py b/orchestra/contrib/services/migrations/0001_squashed_0015_auto_20210330_1049.py
new file mode 100644
index 00000000..a09be3dd
--- /dev/null
+++ b/orchestra/contrib/services/migrations/0001_squashed_0015_auto_20210330_1049.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:26
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('services', '0001_initial'), ('services', '0002_auto_20150509_1501'), ('services', '0003_auto_20150917_0942'), ('services', '0004_auto_20160405_1133'), ('services', '0005_auto_20160427_1531'), ('services', '0006_auto_20170528_2005'), ('services', '0007_auto_20170528_2011'), ('services', '0008_auto_20170625_1813'), ('services', '0009_auto_20170625_1840'), ('services', '0010_auto_20170625_1840'), ('services', '0011_auto_20170625_1840'), ('services', '0012_auto_20170625_1841'), ('services', '0013_auto_20190805_1134'), ('services', '0014_auto_20200204_1218'), ('services', '0015_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ ('contenttypes', '0002_remove_content_type_name'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Service',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('description', models.CharField(max_length=256, unique=True, verbose_name='description')),
+ ('match', models.CharField(blank=True, help_text="Python expression that designates wheter a content_type object is related to this service or not, always evaluates True when left blank. Related instance can be instantiated with instance keyword or content_type.model_name. databaseuser.type == 'MYSQL'
miscellaneous.active and str(miscellaneous.identifier).endswith(('.org', '.net', '.com'))
contractedplan.plan.name == 'association_fee''
instance.active", max_length=256, verbose_name='match')),
+ ('handler_type', models.CharField(blank=True, choices=[('', 'Default')], help_text='Handler used for processing this Service. A handler enables customized behaviour far beyond what options here allow to.', max_length=256, verbose_name='handler')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ('ignore_superusers', models.BooleanField(default=True, help_text='Designates whether superuser, staff and friend orders are marked as ignored by default or not.', verbose_name='ignore superuser, staff and friend')),
+ ('billing_period', models.CharField(blank=True, choices=[('', 'One time service'), ('MONTHLY', 'Monthly billing'), ('ANUAL', 'Anual billing')], default='ANUAL', help_text='Renewal period for recurring invoicing.', max_length=16, verbose_name='billing period')),
+ ('billing_point', models.CharField(choices=[('ON_REGISTER', 'Registration date'), ('ON_FIXED_DATE', 'Every January')], default='ON_FIXED_DATE', help_text='Reference point for calculating the renewal date on recurring invoices', max_length=16, verbose_name='billing point')),
+ ('is_fee', models.BooleanField(default=False, help_text='Designates whether this service should be billed as membership fee or not', verbose_name='fee')),
+ ('order_description', models.CharField(blank=True, help_text="Python expression used for generating the description for the bill lines of this services.
Defaults to '%s: %s' % (ugettext(handler.description), instance)", max_length=256, verbose_name='Order description')),
+ ('ignore_period', models.CharField(blank=True, choices=[('', 'Never'), ('ONE_DAY', 'One day'), ('TWO_DAYS', 'Two days'), ('TEN_DAYS', 'Ten days'), ('ONE_MONTH', 'One month')], default='TEN_DAYS', help_text='Period in which orders will be ignored if cancelled. Useful for designating trial periods', max_length=16, verbose_name='ignore period')),
+ ('metric', models.CharField(blank=True, help_text="Python expression used for obtinging the metric value for the pricing rate computation. Number of orders is used when left blank. Related instance can be instantiated with instance keyword or content_type.model_name.
max((mailbox.resources.disk.allocated or 0) -1, 0)
miscellaneous.amount
max((account.resources.traffic.used or 0) - getattr(account.miscellaneous.filter(is_active=True, service__name='traffic-prepay').last(), 'amount', 0), 0)", max_length=256, verbose_name='metric')),
+ ('nominal_price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='nominal price')),
+ ('tax', models.PositiveIntegerField(choices=[(0, 'Duty free'), (21, '21%')], default=0, verbose_name='tax')),
+ ('pricing_period', models.CharField(blank=True, choices=[('', 'Current value'), ('BILLING_PERIOD', 'Same as billing period'), ('MONTHLY', 'Monthly data'), ('ANUAL', 'Anual data')], default='BILLING_PERIOD', help_text='Time period that is used for computing the rate metric.', max_length=16, verbose_name='pricing period')),
+ ('rate_algorithm', models.CharField(choices=[('orchestra.contrib.plans.ratings.step_price', 'Step price'), ('orchestra.contrib.plans.ratings.match_price', 'Match price'), ('orchestra.contrib.plans.ratings.best_price', 'Best price')], default='orchestra.contrib.plans.ratings.step_price', help_text='Algorithm used to interprete the rating table.
Step price: All rates with a quantity lower or equal than the metric are applied. Nominal price will be used when initial block is missing.
Match price: Only the rate with a) inmediate inferior metric and b) lower price is applied. Nominal price will be used when initial block is missing.
Best price: Produces the best possible price given all active rating lines (those with quantity lower or equal to the metric).', max_length=64, verbose_name='rate algorithm')),
+ ('on_cancel', models.CharField(choices=[('NOTHING', 'Nothing'), ('DISCOUNT', 'Discount'), ('COMPENSATE', 'Compensat'), ('REFUND', 'Refund')], default='DISCOUNT', help_text='Defines the cancellation behaviour of this service.', max_length=16, verbose_name='on cancel')),
+ ('payment_style', models.CharField(choices=[('PREPAY', 'Prepay'), ('POSTPAY', 'Postpay (on demand)')], default='PREPAY', help_text='Designates whether this service should be paid after consumtion (postpay/on demand) or prepaid.', max_length=16, verbose_name='payment style')),
+ ('content_type', models.ForeignKey(help_text='Content type of the related service objects.', on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
+ ('periodic_update', models.BooleanField(default=False, help_text='Whether a periodic update of this service orders should be performed or not. Needed for match definitions that depend on complex model interactions, where content type model save and delete operations are not enought.', verbose_name='periodic update')),
+ ],
+ ),
+ ]
diff --git a/orchestra/contrib/systemusers/migrations/0002_auto_20150429_1413_squashed_0004_auto_20210330_1049.py b/orchestra/contrib/systemusers/migrations/0002_auto_20150429_1413_squashed_0004_auto_20210330_1049.py
new file mode 100644
index 00000000..b311dca3
--- /dev/null
+++ b/orchestra/contrib/systemusers/migrations/0002_auto_20150429_1413_squashed_0004_auto_20210330_1049.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:28
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('systemusers', '0002_auto_20150429_1413'), ('systemusers', '0003_auto_20170528_2011'), ('systemusers', '0004_auto_20210330_1049')]
+
+ dependencies = [
+ ('systemusers', '0001_initial'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='systemuser',
+ name='account',
+ field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='systemusers', to=settings.AUTH_USER_MODEL, verbose_name='Account'),
+ preserve_default=False,
+ ),
+ migrations.AlterField(
+ model_name='systemuser',
+ name='shell',
+ field=models.CharField(choices=[('/dev/null', 'No shell, FTP only'), ('/bin/rssh', 'No shell, SFTP/RSYNC only'), ('/usr/bin/git-shell', 'No shell, GIT only'), ('/bin/bash', '/bin/bash')], default='/dev/null', max_length=32, verbose_name='shell'),
+ ),
+ migrations.AlterField(
+ model_name='systemuser',
+ name='username',
+ field=models.CharField(help_text='Required. 32 characters or fewer. Letters, digits and ./-/_ only.', max_length=32, unique=True, validators=[orchestra.core.validators.validate_username], verbose_name='username'),
+ ),
+ migrations.AlterField(
+ model_name='systemuser',
+ name='shell',
+ field=models.CharField(choices=[('/dev/null', 'No shell, FTP only'), ('/bin/rssh', 'No shell, SFTP/RSYNC only'), ('/bin/bash', '/bin/bash')], default='/dev/null', max_length=32, verbose_name='shell'),
+ ),
+ ]
diff --git a/orchestra/contrib/vps/migrations/0001_squashed_0004_auto_20170528_2005.py b/orchestra/contrib/vps/migrations/0001_squashed_0004_auto_20170528_2005.py
new file mode 100644
index 00000000..1284ea89
--- /dev/null
+++ b/orchestra/contrib/vps/migrations/0001_squashed_0004_auto_20170528_2005.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:26
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('vps', '0001_initial'), ('vps', '0002_auto_20150804_1524'), ('vps', '0003_vps_is_active'), ('vps', '0004_auto_20170528_2005')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='VPS',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('hostname', models.CharField(max_length=256, unique=True, validators=[orchestra.core.validators.validate_hostname], verbose_name='hostname')),
+ ('type', models.CharField(choices=[('openvz', 'OpenVZ container'), ('lxc', 'LXC container')], default='lxc', max_length=64, verbose_name='type')),
+ ('template', models.CharField(choices=[('debian7', 'Debian 7 - Wheezy'), ('placeholder', 'LXC placeholder')], default='placeholder', help_text='Initial template.', max_length=64, verbose_name='template')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vpss', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ],
+ options={
+ 'verbose_name': 'VPS',
+ 'verbose_name_plural': 'VPSs',
+ },
+ ),
+ ]
diff --git a/orchestra/contrib/webapps/migrations/0001_squashed_0006_auto_20210330_1049.py b/orchestra/contrib/webapps/migrations/0001_squashed_0006_auto_20210330_1049.py
new file mode 100644
index 00000000..0074262c
--- /dev/null
+++ b/orchestra/contrib/webapps/migrations/0001_squashed_0006_auto_20210330_1049.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:25
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import jsonfield.fields
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('webapps', '0001_initial'), ('webapps', '0002_auto_20170528_2011'), ('webapps', '0003_webapp_target_server'), ('webapps', '0004_webapp_comments'), ('webapps', '0005_auto_20200204_1218'), ('webapps', '0006_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('orchestration', '0007_auto_20170528_2011'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='WebApp',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(help_text='The app will be installed in %(home)s/webapps/%(app_name)s', max_length=128, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('type', models.CharField(choices=[('php', 'PHP'), ('python', 'Python'), ('static', 'Static'), ('symbolic-link', 'Symbolic link'), ('webalizer', 'Webalizer'), ('wordpress-php', 'WordPress')], max_length=32, verbose_name='type')),
+ ('data', jsonfield.fields.JSONField(blank=True, default={}, help_text='Extra information dependent of each service.', verbose_name='data')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='webapps', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ],
+ options={
+ 'verbose_name': 'Web App',
+ 'verbose_name_plural': 'Web Apps',
+ },
+ ),
+ migrations.CreateModel(
+ name='WebAppOption',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(choices=[(None, '-------'), ('FileSystem', [('public-root', 'Public root')]), ('Process', [('timeout', 'Process timeout'), ('processes', 'Number of processes')]), ('PHP', [('enable_functions', 'Enable functions'), ('allow_url_include', 'Allow URL include'), ('allow_url_fopen', 'Allow URL fopen'), ('auto_append_file', 'Auto append file'), ('auto_prepend_file', 'Auto prepend file'), ('date.timezone', 'date.timezone'), ('default_socket_timeout', 'Default socket timeout'), ('display_errors', 'Display errors'), ('extension', 'Extension'), ('magic_quotes_gpc', 'Magic quotes GPC'), ('magic_quotes_runtime', 'Magic quotes runtime'), ('magic_quotes_sybase', 'Magic quotes sybase'), ('max_input_time', 'Max input time'), ('max_input_vars', 'Max input vars'), ('memory_limit', 'Memory limit'), ('mysql.connect_timeout', 'Mysql connect timeout'), ('output_buffering', 'Output buffering'), ('register_globals', 'Register globals'), ('post_max_size', 'Post max size'), ('sendmail_path', 'Sendmail path'), ('session.bug_compat_warn', 'Session bug compat warning'), ('session.auto_start', 'Session auto start'), ('safe_mode', 'Safe mode'), ('suhosin.post.max_vars', 'Suhosin POST max vars'), ('suhosin.get.max_vars', 'Suhosin GET max vars'), ('suhosin.request.max_vars', 'Suhosin request max vars'), ('suhosin.session.encrypt', 'Suhosin session encrypt'), ('suhosin.simulation', 'Suhosin simulation'), ('suhosin.executor.include.whitelist', 'Suhosin executor include whitelist'), ('upload_max_filesize', 'Upload max filesize'), ('zend_extension', 'Zend extension')])], max_length=128, verbose_name='name')),
+ ('value', models.CharField(max_length=256, verbose_name='value')),
+ ('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='options', to='webapps.WebApp', verbose_name='Web application')),
+ ],
+ options={
+ 'verbose_name': 'option',
+ 'verbose_name_plural': 'options',
+ },
+ ),
+ migrations.AlterUniqueTogether(
+ name='webappoption',
+ unique_together=set([('webapp', 'name')]),
+ ),
+ migrations.AlterField(
+ model_name='webapp',
+ name='type',
+ field=models.CharField(choices=[('moodle-php', 'Moodle'), ('php', 'PHP'), ('python', 'Python'), ('static', 'Static'), ('symbolic-link', 'Symbolic link'), ('webalizer', 'Webalizer'), ('wordpress-php', 'WordPress')], max_length=32, verbose_name='type'),
+ ),
+ migrations.AddField(
+ model_name='webapp',
+ name='target_server',
+ field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='webapps', to='orchestration.Server', verbose_name='Target Server'),
+ preserve_default=False,
+ ),
+ migrations.AddField(
+ model_name='webapp',
+ name='comments',
+ field=models.TextField(blank=True, default=''),
+ ),
+ migrations.AlterUniqueTogether(
+ name='webapp',
+ unique_together=set([('name', 'account')]),
+ ),
+ migrations.AlterField(
+ model_name='webappoption',
+ name='name',
+ field=models.CharField(choices=[(None, '-------'), ('FileSystem', [('public-root', 'Public root')]), ('Process', [('timeout', 'Process timeout'), ('processes', 'Number of processes')]), ('PHP', [('enable_functions', 'Enable functions'), ('disable_functions', 'Disable functions'), ('allow_url_include', 'Allow URL include'), ('allow_url_fopen', 'Allow URL fopen'), ('auto_append_file', 'Auto append file'), ('auto_prepend_file', 'Auto prepend file'), ('date.timezone', 'date.timezone'), ('default_socket_timeout', 'Default socket timeout'), ('display_errors', 'Display errors'), ('extension', 'Extension'), ('include_path', 'Include path'), ('magic_quotes_gpc', 'Magic quotes GPC'), ('magic_quotes_runtime', 'Magic quotes runtime'), ('magic_quotes_sybase', 'Magic quotes sybase'), ('max_input_time', 'Max input time'), ('max_input_vars', 'Max input vars'), ('memory_limit', 'Memory limit'), ('mysql.connect_timeout', 'Mysql connect timeout'), ('output_buffering', 'Output buffering'), ('register_globals', 'Register globals'), ('post_max_size', 'Post max size'), ('sendmail_path', 'Sendmail path'), ('session.bug_compat_warn', 'Session bug compat warning'), ('session.auto_start', 'Session auto start'), ('safe_mode', 'Safe mode'), ('suhosin.post.max_vars', 'Suhosin POST max vars'), ('suhosin.get.max_vars', 'Suhosin GET max vars'), ('suhosin.request.max_vars', 'Suhosin request max vars'), ('suhosin.session.encrypt', 'Suhosin session encrypt'), ('suhosin.simulation', 'Suhosin simulation'), ('suhosin.executor.include.whitelist', 'Suhosin executor include whitelist'), ('upload_max_filesize', 'Upload max filesize'), ('upload_tmp_dir', 'Upload tmp dir'), ('zend_extension', 'Zend extension')])], max_length=128, verbose_name='name'),
+ ),
+ ]
diff --git a/orchestra/contrib/websites/migrations/0001_squashed_0017_auto_20210330_1049.py b/orchestra/contrib/websites/migrations/0001_squashed_0017_auto_20210330_1049.py
new file mode 100644
index 00000000..e6847bc4
--- /dev/null
+++ b/orchestra/contrib/websites/migrations/0001_squashed_0017_auto_20210330_1049.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2021-04-22 11:25
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import orchestra.core.validators
+
+
+class Migration(migrations.Migration):
+
+ replaces = [('websites', '0001_initial'), ('websites', '0002_auto_20160219_1036'), ('websites', '0003_auto_20170528_2011'), ('websites', '0004_auto_20170625_1813'), ('websites', '0005_auto_20170625_1840'), ('websites', '0006_auto_20170625_1840'), ('websites', '0007_auto_20170625_1840'), ('websites', '0008_auto_20170625_1841'), ('websites', '0009_auto_20170625_2206'), ('websites', '0010_auto_20170625_2214'), ('websites', '0011_auto_20170704_1117'), ('websites', '0012_auto_20190805_1134'), ('websites', '0013_auto_20200204_1217'), ('websites', '0014_auto_20200204_1218'), ('websites', '0015_auto_20200204_1219'), ('websites', '0016_auto_20200204_1221'), ('websites', '0017_auto_20210330_1049')]
+
+ initial = True
+
+ dependencies = [
+ ('domains', '0001_initial'),
+ ('webapps', '0001_initial'),
+ ('orchestration', '0007_auto_20170528_2011'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Content',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('path', models.CharField(blank=True, max_length=256, validators=[orchestra.core.validators.validate_url_path], verbose_name='path')),
+ ('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapps.WebApp', verbose_name='web application')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Website',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=128, validators=[orchestra.core.validators.validate_name], verbose_name='name')),
+ ('protocol', models.CharField(choices=[('http', 'HTTP'), ('https', 'HTTPS'), ('http/https', 'HTTP and HTTPS'), ('https-only', 'HTTPS only')], default='http', help_text='Select the protocol(s) for this website
HTTPS only performs a redirection from http to https.', max_length=16, verbose_name='protocol')),
+ ('is_active', models.BooleanField(default=True, verbose_name='active')),
+ ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='websites', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
+ ('contents', models.ManyToManyField(through='websites.Content', to='webapps.WebApp')),
+ ('domains', models.ManyToManyField(related_name='websites', to='domains.Domain', verbose_name='domains')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='WebsiteDirective',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(choices=[(None, '-------'), ('HTTPD', [('redirect', 'Redirection'), ('proxy', 'Proxy'), ('error-document', 'ErrorDocumentRoot')]), ('SSL', [('ssl-ca', 'SSL CA'), ('ssl-cert', 'SSL cert'), ('ssl-key', 'SSL key')]), ('ModSecurity', [('sec-rule-remove', 'SecRuleRemoveById'), ('sec-engine', 'SecRuleEngine Off')]), ('SaaS', [('wordpress-saas', 'WordPress SaaS'), ('dokuwiki-saas', 'DokuWiki SaaS'), ('drupal-saas', 'Drupdal SaaS'), ('moodle-saas', 'Moodle SaaS')])], db_index=True, max_length=128, verbose_name='name')),
+ ('value', models.CharField(blank=True, max_length=256, verbose_name='value')),
+ ('website', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='directives', to='websites.Website', verbose_name='web site')),
+ ],
+ ),
+ migrations.AddField(
+ model_name='content',
+ name='website',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='websites.Website', verbose_name='web site'),
+ ),
+ migrations.AlterField(
+ model_name='website',
+ name='domains',
+ field=models.ManyToManyField(blank=True, related_name='websites', to='domains.Domain', verbose_name='domains'),
+ ),
+ migrations.AddField(
+ model_name='website',
+ name='target_server',
+ field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='websites', to='orchestration.Server', verbose_name='Target Server'),
+ preserve_default=False,
+ ),
+ migrations.AddField(
+ model_name='website',
+ name='comments',
+ field=models.TextField(blank=True, default=''),
+ ),
+ migrations.AlterUniqueTogether(
+ name='website',
+ unique_together=set([('name', 'account')]),
+ ),
+ migrations.AlterUniqueTogether(
+ name='content',
+ unique_together=set([('website', 'path')]),
+ ),
+ ]