Update migrations to include mandatory on_delete
Django 2.0
This commit is contained in:
parent
6ef7f921e9
commit
7fa7106d72
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.db import models, migrations
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
import django.contrib.auth.models
|
||||
|
||||
|
@ -32,7 +33,7 @@ class Migration(migrations.Migration):
|
|||
('is_superuser', models.BooleanField(help_text='Designates that this user has all permissions without explicitly assigning them.', default=False, verbose_name='superuser status')),
|
||||
('is_active', models.BooleanField(help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.', default=True, verbose_name='active')),
|
||||
('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)),
|
||||
('main_systemuser', models.ForeignKey(to='systemusers.SystemUser', editable=False, null=True, related_name='accounts_main')),
|
||||
('main_systemuser', models.ForeignKey(to='systemusers.SystemUser', editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='accounts_main')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
|
@ -14,7 +15,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='bill',
|
||||
name='amend_of',
|
||||
field=models.ForeignKey(to='bills.Bill', blank=True, related_name='amends', verbose_name='amend of', null=True),
|
||||
field=models.ForeignKey(to='bills.Bill', blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='amends', verbose_name='amend of', null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='billcontact',
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
|
||||
|
||||
|
@ -19,7 +20,7 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)),
|
||||
('name', models.CharField(verbose_name='name', max_length=64, validators=[orchestra.core.validators.validate_name])),
|
||||
('type', models.CharField(default='mysql', choices=[('mysql', 'MySQL'), ('postgres', 'PostgreSQL')], verbose_name='type', max_length=32)),
|
||||
('account', models.ForeignKey(related_name='databases', verbose_name='Account', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='databases', verbose_name='Account', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -29,7 +30,7 @@ class Migration(migrations.Migration):
|
|||
('username', models.CharField(verbose_name='username', max_length=16, validators=[orchestra.core.validators.validate_name])),
|
||||
('password', models.CharField(verbose_name='password', max_length=256)),
|
||||
('type', models.CharField(default='mysql', choices=[('mysql', 'MySQL'), ('postgres', 'PostgreSQL')], verbose_name='type', max_length=32)),
|
||||
('account', models.ForeignKey(related_name='databaseusers', verbose_name='Account', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='databaseusers', verbose_name='Account', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'DB users',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.contrib.domains.utils
|
||||
import orchestra.contrib.domains.validators
|
||||
from django.conf import settings
|
||||
|
@ -20,8 +21,8 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||
('name', models.CharField(unique=True, max_length=256, validators=[orchestra.contrib.domains.validators.validate_domain_name, orchestra.contrib.domains.validators.validate_allowed_domain], verbose_name='name', help_text='Domain or subdomain name.')),
|
||||
('serial', models.IntegerField(default=orchestra.contrib.domains.utils.generate_zone_serial, verbose_name='serial', help_text='Serial number')),
|
||||
('account', models.ForeignKey(related_name='domains', help_text='Automatically selected for subdomains.', to=settings.AUTH_USER_MODEL, verbose_name='Account', blank=True)),
|
||||
('top', models.ForeignKey(null=True, to='domains.Domain', editable=False, related_name='subdomain_set')),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='domains', help_text='Automatically selected for subdomains.', to=settings.AUTH_USER_MODEL, verbose_name='Account', blank=True)),
|
||||
('top', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, null=True, to='domains.Domain', editable=False, related_name='subdomain_set')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -31,7 +32,7 @@ class Migration(migrations.Migration):
|
|||
('ttl', models.CharField(help_text='Record TTL, defaults to 1h', max_length=8, validators=[orchestra.contrib.domains.validators.validate_zone_interval], verbose_name='TTL', blank=True)),
|
||||
('type', models.CharField(max_length=32, verbose_name='type', choices=[('MX', 'MX'), ('NS', 'NS'), ('CNAME', 'CNAME'), ('A', 'A (IPv4 address)'), ('AAAA', 'AAAA (IPv6 address)'), ('SRV', 'SRV'), ('TXT', 'TXT'), ('SOA', 'SOA')])),
|
||||
('value', models.CharField(max_length=256, verbose_name='value')),
|
||||
('domain', models.ForeignKey(related_name='records', to='domains.Domain', verbose_name='domain')),
|
||||
('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='records', to='domains.Domain', verbose_name='domain')),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import orchestra.contrib.domains.validators
|
||||
|
||||
|
||||
|
@ -20,7 +21,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AlterField(
|
||||
model_name='domain',
|
||||
name='top',
|
||||
field=models.ForeignKey(editable=False, verbose_name='top domain', related_name='subdomain_set', to='domains.Domain', null=True),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, editable=False, verbose_name='top domain', related_name='subdomain_set', to='domains.Domain', null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='record',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import models, migrations
|
||||
import orchestra.models.fields
|
||||
from django.conf import settings
|
||||
|
@ -20,7 +21,7 @@ class Migration(migrations.Migration):
|
|||
('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(related_name='ticket_messages', to=settings.AUTH_USER_MODEL, verbose_name='author')),
|
||||
('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',
|
||||
|
@ -48,9 +49,9 @@ class Migration(migrations.Migration):
|
|||
('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(related_name='tickets_created', null=True, to=settings.AUTH_USER_MODEL, verbose_name='created by')),
|
||||
('owner', models.ForeignKey(blank=True, related_name='tickets_owned', null=True, to=settings.AUTH_USER_MODEL, verbose_name='assigned to')),
|
||||
('queue', models.ForeignKey(blank=True, related_name='tickets', null=True, to='issues.Queue')),
|
||||
('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tickets_created', null=True, to=settings.AUTH_USER_MODEL, verbose_name='created by')),
|
||||
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, blank=True, related_name='tickets_owned', null=True, to=settings.AUTH_USER_MODEL, verbose_name='assigned to')),
|
||||
('queue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, blank=True, related_name='tickets', null=True, to='issues.Queue')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-updated_at'],
|
||||
|
@ -60,14 +61,14 @@ class Migration(migrations.Migration):
|
|||
name='TicketTracker',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
|
||||
('ticket', models.ForeignKey(related_name='trackers', to='issues.Ticket', verbose_name='ticket')),
|
||||
('user', models.ForeignKey(related_name='ticket_trackers', to=settings.AUTH_USER_MODEL, verbose_name='user')),
|
||||
('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(related_name='messages', to='issues.Ticket', verbose_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',
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
|
||||
|
||||
|
@ -22,8 +23,8 @@ class Migration(migrations.Migration):
|
|||
('address_name', models.CharField(max_length=128, validators=[orchestra.core.validators.validate_name], verbose_name='address name', blank=True)),
|
||||
('admin_email', models.EmailField(max_length=254, verbose_name='admin email', help_text='Administration email address')),
|
||||
('is_active', models.BooleanField(default=True, verbose_name='active', help_text='Designates whether this account should be treated as active. Unselect this instead of deleting accounts.')),
|
||||
('account', models.ForeignKey(related_name='lists', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
|
||||
('address_domain', models.ForeignKey(null=True, blank=True, to='domains.Domain', verbose_name='address domain')),
|
||||
('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(on_delete=django.db.models.deletion.CASCADE, null=True, blank=True, to='domains.Domain', verbose_name='address domain')),
|
||||
],
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
import django.db.models.deletion
|
||||
import orchestra.contrib.mailboxes.validators
|
||||
import django.core.validators
|
||||
|
||||
|
@ -21,8 +22,8 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(verbose_name='name', validators=[orchestra.contrib.mailboxes.validators.validate_emailname], blank=True, help_text='Address name, left blank for a <i>catch-all</i> address', max_length=64)),
|
||||
('forward', models.CharField(verbose_name='forward', validators=[orchestra.contrib.mailboxes.validators.validate_forward], blank=True, help_text='Space separated email addresses or mailboxes', max_length=256)),
|
||||
('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='addresses', verbose_name='Account')),
|
||||
('domain', models.ForeignKey(to='domains.Domain', related_name='addresses', verbose_name='domain')),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, related_name='addresses', verbose_name='Account')),
|
||||
('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='domains.Domain', related_name='addresses', verbose_name='domain')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'addresses',
|
||||
|
@ -35,7 +36,7 @@ class Migration(migrations.Migration):
|
|||
('subject', models.CharField(verbose_name='subject', max_length=256)),
|
||||
('message', models.TextField(verbose_name='message')),
|
||||
('enabled', models.BooleanField(verbose_name='enabled', default=False)),
|
||||
('address', models.OneToOneField(to='mailboxes.Address', related_name='autoresponse', verbose_name='address')),
|
||||
('address', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='mailboxes.Address', related_name='autoresponse', verbose_name='address')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -47,7 +48,7 @@ class Migration(migrations.Migration):
|
|||
('filtering', models.CharField(choices=[('CUSTOM', 'Custom filtering'), ('REDIRECT', 'Archive spam (X-Spam-Score≥9)'), ('DISABLE', 'Disable'), ('REJECT', 'Reject spam (X-Spam-Score≥9)')], max_length=16, default='REDIRECT')),
|
||||
('custom_filtering', models.TextField(verbose_name='filtering', validators=[orchestra.contrib.mailboxes.validators.validate_sieve], blank=True, help_text='Arbitrary email filtering in sieve language. This overrides any automatic junk email filtering')),
|
||||
('is_active', models.BooleanField(verbose_name='active', default=True)),
|
||||
('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='mailboxes', verbose_name='account')),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, related_name='mailboxes', verbose_name='account')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'mailboxes',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
|
@ -32,7 +33,7 @@ class Migration(migrations.Migration):
|
|||
('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(to='mailer.Message', editable=False, related_name='logs')),
|
||||
('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mailer.Message', editable=False, related_name='logs')),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
from django.conf import settings
|
||||
import orchestra.models.fields
|
||||
|
@ -22,7 +23,7 @@ class Migration(migrations.Migration):
|
|||
('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(related_name='miscellaneous', verbose_name='account', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='miscellaneous', verbose_name='account', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'miscellaneous',
|
||||
|
@ -43,6 +44,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='miscellaneous',
|
||||
name='service',
|
||||
field=models.ForeignKey(related_name='instances', verbose_name='service', to='miscellaneous.MiscService'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='instances', verbose_name='service', to='miscellaneous.MiscService'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import models, migrations
|
||||
import orchestra.models.fields
|
||||
|
||||
|
@ -38,8 +39,8 @@ class Migration(migrations.Migration):
|
|||
('backend', models.CharField(max_length=256, verbose_name='backend')),
|
||||
('action', models.CharField(max_length=64, verbose_name='action')),
|
||||
('object_id', models.PositiveIntegerField()),
|
||||
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
|
||||
('log', models.ForeignKey(related_name='operations', to='orchestration.BackendLog')),
|
||||
('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')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Operations',
|
||||
|
@ -68,12 +69,12 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='route',
|
||||
name='host',
|
||||
field=models.ForeignKey(to='orchestration.Server', verbose_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(related_name='execution_logs', to='orchestration.Server', verbose_name='server'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='execution_logs', to='orchestration.Server', verbose_name='server'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='route',
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.db import models, migrations
|
||||
import django.utils.timezone
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
|
@ -38,9 +39,9 @@ class Migration(migrations.Migration):
|
|||
('billed_until', models.DateField(blank=True, verbose_name='billed until', null=True)),
|
||||
('ignore', models.BooleanField(default=False, verbose_name='ignore')),
|
||||
('description', models.TextField(blank=True, verbose_name='description')),
|
||||
('account', models.ForeignKey(verbose_name='account', related_name='orders', to=settings.AUTH_USER_MODEL)),
|
||||
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
|
||||
('service', models.ForeignKey(verbose_name='service', related_name='orders', to='services.Service')),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='account', related_name='orders', to=settings.AUTH_USER_MODEL)),
|
||||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
|
||||
('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='service', related_name='orders', to='services.Service')),
|
||||
],
|
||||
options={
|
||||
'get_latest_by': 'id',
|
||||
|
@ -49,6 +50,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='metricstorage',
|
||||
name='order',
|
||||
field=models.ForeignKey(verbose_name='order', related_name='metrics', to='orders.Order'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='order', related_name='metrics', to='orders.Order'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import models, migrations
|
||||
import jsonfield.fields
|
||||
from django.conf import settings
|
||||
|
@ -21,7 +22,7 @@ class Migration(migrations.Migration):
|
|||
('method', models.CharField(choices=[('CreditCard', 'Credit card'), ('SEPADirectDebit', 'SEPA Direct Debit')], verbose_name='method', max_length=32)),
|
||||
('data', jsonfield.fields.JSONField(verbose_name='data', default={})),
|
||||
('is_active', models.BooleanField(verbose_name='active', default=True)),
|
||||
('account', models.ForeignKey(verbose_name='account', related_name='paymentsources', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='account', related_name='paymentsources', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -33,7 +34,7 @@ class Migration(migrations.Migration):
|
|||
('currency', models.CharField(max_length=10, default='Eur')),
|
||||
('created_at', models.DateTimeField(verbose_name='created', auto_now_add=True)),
|
||||
('modified_at', models.DateTimeField(verbose_name='modified', auto_now=True)),
|
||||
('bill', models.ForeignKey(verbose_name='bill', related_name='transactions', to='bills.Bill')),
|
||||
('bill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='bill', related_name='transactions', to='bills.Bill')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -53,11 +54,11 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='transaction',
|
||||
name='process',
|
||||
field=models.ForeignKey(verbose_name='process', null=True, blank=True, related_name='transactions', to='payments.TransactionProcess'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='process', null=True, blank=True, related_name='transactions', to='payments.TransactionProcess'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='transaction',
|
||||
name='source',
|
||||
field=models.ForeignKey(verbose_name='source', null=True, blank=True, related_name='transactions', to='payments.PaymentSource'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='source', null=True, blank=True, related_name='transactions', to='payments.PaymentSource'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -18,7 +19,7 @@ class Migration(migrations.Migration):
|
|||
name='ContractedPlan',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
|
||||
('account', models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='plans', verbose_name='account')),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, related_name='plans', verbose_name='account')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'plans',
|
||||
|
@ -42,14 +43,14 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(primary_key=True, auto_created=True, serialize=False, verbose_name='ID')),
|
||||
('quantity', models.PositiveIntegerField(help_text='See rate algorihm help text.', blank=True, verbose_name='quantity', null=True)),
|
||||
('price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='price')),
|
||||
('plan', models.ForeignKey(to='plans.Plan', related_name='rates', verbose_name='plan')),
|
||||
('service', models.ForeignKey(to='services.Service', related_name='rates', verbose_name='service')),
|
||||
('plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plans.Plan', related_name='rates', verbose_name='plan')),
|
||||
('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='services.Service', related_name='rates', verbose_name='service')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='contractedplan',
|
||||
name='plan',
|
||||
field=models.ForeignKey(to='plans.Plan', related_name='contracts', verbose_name='plan'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plans.Plan', related_name='contracts', verbose_name='plan'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='rate',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -14,6 +15,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AlterField(
|
||||
model_name='rate',
|
||||
name='plan',
|
||||
field=models.ForeignKey(related_name='rates', to='plans.Plan', blank=True, null=True, verbose_name='plan'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rates', to='plans.Plan', blank=True, null=True, verbose_name='plan'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.contrib.resources.validators
|
||||
import orchestra.models.fields
|
||||
import django.utils.timezone
|
||||
|
@ -24,7 +25,7 @@ class Migration(migrations.Migration):
|
|||
('object_id', models.PositiveIntegerField(verbose_name='object id')),
|
||||
('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created')),
|
||||
('value', models.DecimalField(decimal_places=2, max_digits=16, verbose_name='value')),
|
||||
('content_type', models.ForeignKey(verbose_name='content type', to='contenttypes.ContentType')),
|
||||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='content type', to='contenttypes.ContentType')),
|
||||
],
|
||||
options={
|
||||
'get_latest_by': 'id',
|
||||
|
@ -45,8 +46,8 @@ class Migration(migrations.Migration):
|
|||
('disable_trigger', models.BooleanField(help_text='Disables monitors exeeded and recovery triggers', default=False, verbose_name='disable trigger')),
|
||||
('monitors', orchestra.models.fields.MultiSelectField(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')], blank=True, 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.', to='contenttypes.ContentType')),
|
||||
('crontab', models.ForeignKey(help_text='Crontab for periodic execution. Leave it empty to disable periodic monitoring', to='djcelery.CrontabSchedule', verbose_name='crontab', blank=True, null=True)),
|
||||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, help_text='Model where this resource will be hooked.', to='contenttypes.ContentType')),
|
||||
('crontab', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, help_text='Crontab for periodic execution. Leave it empty to disable periodic monitoring', to='djcelery.CrontabSchedule', verbose_name='crontab', blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -57,8 +58,8 @@ class Migration(migrations.Migration):
|
|||
('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(decimal_places=2, max_digits=8, blank=True, null=True, verbose_name='allocated')),
|
||||
('content_type', models.ForeignKey(verbose_name='content type', to='contenttypes.ContentType')),
|
||||
('resource', models.ForeignKey(related_name='dataset', to='resources.Resource', verbose_name='resource')),
|
||||
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='content type', to='contenttypes.ContentType')),
|
||||
('resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dataset', to='resources.Resource', verbose_name='resource')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'resource data',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import jsonfield.fields
|
||||
from django.conf import settings
|
||||
import orchestra.core.validators
|
||||
|
@ -23,8 +24,8 @@ class Migration(migrations.Migration):
|
|||
('name', models.CharField(max_length=64, validators=[orchestra.core.validators.validate_username], verbose_name='Name', help_text='Required. 64 characters or fewer. Letters, digits and ./-/_ only.')),
|
||||
('is_active', models.BooleanField(help_text='Designates whether this service should be treated as active. ', verbose_name='active', default=True)),
|
||||
('data', jsonfield.fields.JSONField(help_text='Extra information dependent of each service.', verbose_name='data', default={})),
|
||||
('account', models.ForeignKey(verbose_name='account', to=settings.AUTH_USER_MODEL, related_name='saas')),
|
||||
('database', models.ForeignKey(null=True, blank=True, to='databases.Database')),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='account', to=settings.AUTH_USER_MODEL, related_name='saas')),
|
||||
('database', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, null=True, blank=True, to='databases.Database')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'SaaS',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -32,7 +33,7 @@ class Migration(migrations.Migration):
|
|||
('rate_algorithm', models.CharField(default='MATCH_PRICE', help_text='Algorithm used to interprete the rating table.<br> Match price: Only <b>the rate</b> with a) inmediate inferior metric and b) lower price is applied. Nominal price will be used when initial block is missing.<br> Step price: All rates with a quantity lower than the metric are applied. Nominal price will be used when initial block is missing.', max_length=16, choices=[('MATCH_PRICE', 'Match price'), ('STEP_PRICE', 'Step price')], verbose_name='rate algorithm')),
|
||||
('on_cancel', models.CharField(default='DISCOUNT', help_text='Defines the cancellation behaviour of this service.', max_length=16, choices=[('NOTHING', 'Nothing'), ('DISCOUNT', 'Discount'), ('COMPENSATE', 'Compensat'), ('REFUND', 'Refund')], verbose_name='on cancel')),
|
||||
('payment_style', models.CharField(default='PREPAY', help_text='Designates whether this service should be paid after consumtion (postpay/on demand) or prepaid.', max_length=16, choices=[('PREPAY', 'Prepay'), ('POSTPAY', 'Postpay (on demand)')], verbose_name='payment style')),
|
||||
('content_type', models.ForeignKey(help_text='Content type of the related service objects.', to='contenttypes.ContentType', verbose_name='content type')),
|
||||
('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')),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -17,7 +18,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='systemuser',
|
||||
name='account',
|
||||
field=models.ForeignKey(related_name='systemusers', to=settings.AUTH_USER_MODEL, default=1, verbose_name='Account'),
|
||||
field=models.ForeignKey(related_name='systemusers', to=settings.AUTH_USER_MODEL, default=1, on_delete=django.db.models.deletion.CASCADE, verbose_name='Account'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -21,7 +22,7 @@ class Migration(migrations.Migration):
|
|||
('type', models.CharField(choices=[('openvz', 'OpenVZ container')], verbose_name='type', default='openvz', max_length=64)),
|
||||
('template', models.CharField(choices=[('debian7', 'Debian 7 - Wheezy')], verbose_name='template', default='debian7', max_length=64)),
|
||||
('password', models.CharField(verbose_name='password', help_text='<TT>root</TT> password of this virtual machine', max_length=128)),
|
||||
('account', models.ForeignKey(verbose_name='Account', related_name='vpss', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='Account', related_name='vpss', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'VPS',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
import jsonfield.fields
|
||||
from django.conf import settings
|
||||
|
@ -21,7 +22,7 @@ class Migration(migrations.Migration):
|
|||
('name', models.CharField(verbose_name='name', validators=[orchestra.core.validators.validate_name], help_text='The app will be installed in %(home)s/webapps/%(app_name)s', max_length=128)),
|
||||
('type', models.CharField(verbose_name='type', max_length=32, choices=[('php', 'PHP'), ('python', 'Python'), ('static', 'Static'), ('symbolic-link', 'Symbolic link'), ('webalizer', 'Webalizer'), ('wordpress-php', 'WordPress')])),
|
||||
('data', jsonfield.fields.JSONField(verbose_name='data', blank=True, help_text='Extra information dependent of each service.', default={})),
|
||||
('account', models.ForeignKey(verbose_name='Account', related_name='webapps', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='Account', related_name='webapps', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Web App',
|
||||
|
@ -34,7 +35,7 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
|
||||
('name', models.CharField(verbose_name='name', max_length=128, 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')])])),
|
||||
('value', models.CharField(verbose_name='value', max_length=256)),
|
||||
('webapp', models.ForeignKey(verbose_name='Web application', related_name='options', to='webapps.WebApp')),
|
||||
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='Web application', related_name='options', to='webapps.WebApp')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'option',
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
import django.db.models.deletion
|
||||
import orchestra.core.validators
|
||||
|
||||
|
||||
|
@ -20,7 +21,7 @@ class Migration(migrations.Migration):
|
|||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
|
||||
('path', models.CharField(validators=[orchestra.core.validators.validate_url_path], verbose_name='path', max_length=256, blank=True)),
|
||||
('webapp', models.ForeignKey(verbose_name='web application', to='webapps.WebApp')),
|
||||
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='web application', to='webapps.WebApp')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -30,7 +31,7 @@ class Migration(migrations.Migration):
|
|||
('name', models.CharField(validators=[orchestra.core.validators.validate_name], verbose_name='name', max_length=128)),
|
||||
('protocol', models.CharField(verbose_name='protocol', default='http', choices=[('http', 'HTTP'), ('https', 'HTTPS'), ('http/https', 'HTTP and HTTPS'), ('https-only', 'HTTPS only')], help_text='Select the protocol(s) for this website<br><tt>HTTPS only</tt> performs a redirection from <tt>http</tt> to <tt>https</tt>.', max_length=16)),
|
||||
('is_active', models.BooleanField(verbose_name='active', default=True)),
|
||||
('account', models.ForeignKey(related_name='websites', verbose_name='Account', to=settings.AUTH_USER_MODEL)),
|
||||
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='websites', verbose_name='Account', to=settings.AUTH_USER_MODEL)),
|
||||
('contents', models.ManyToManyField(through='websites.Content', to='webapps.WebApp')),
|
||||
('domains', models.ManyToManyField(verbose_name='domains', related_name='websites', to='domains.Domain')),
|
||||
],
|
||||
|
@ -41,13 +42,13 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
|
||||
('name', models.CharField(verbose_name='name', choices=[(None, '-------'), ('SSL', [('ssl-ca', 'SSL CA'), ('ssl-cert', 'SSL cert'), ('ssl-key', 'SSL key')]), ('HTTPD', [('redirect', 'Redirection'), ('proxy', 'Proxy'), ('error-document', 'ErrorDocumentRoot')]), ('ModSecurity', [('sec-rule-remove', 'SecRuleRemoveById'), ('sec-engine', 'SecRuleEngine Off')]), ('SaaS', [('wordpress-saas', 'WordPress SaaS'), ('dokuwiki-saas', 'DokuWiki SaaS'), ('drupal-saas', 'Drupdal SaaS')])], max_length=128)),
|
||||
('value', models.CharField(verbose_name='value', max_length=256)),
|
||||
('website', models.ForeignKey(related_name='directives', verbose_name='web site', to='websites.Website')),
|
||||
('website', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='directives', verbose_name='web site', to='websites.Website')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='content',
|
||||
name='website',
|
||||
field=models.ForeignKey(verbose_name='web site', to='websites.Website'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='web site', to='websites.Website'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='website',
|
||||
|
|
Loading…
Reference in a new issue