Skip to content

Commit

Permalink
[migrations] Squashed 0001 and 0002 to avoid postgres error
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed May 3, 2017
1 parent 298b2a2 commit d173c24
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-07 17:49
# Generated by Django 1.10.5 on 2017-05-03 17:54
from __future__ import unicode_literals

import re
import uuid

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_netjsonconfig.base.template
import django_netjsonconfig.utils
import jsonfield.fields
import model_utils.fields
import re
import sortedm2m.fields
from django.db import migrations, models

import django_netjsonconfig.base.config
import django_netjsonconfig.base.template
import uuid


class Migration(migrations.Migration):

replaces = [('config', '0001_initial'), ('config', '0002_config_settings_uuid')]

initial = True

dependencies = [
('openwisp_users', '0001_initial'),
('pki', '0001_initial'),
('openwisp_users', '0001_initial'),
]

operations = [
Expand All @@ -37,28 +37,28 @@ class Migration(migrations.Migration):
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
('status', model_utils.fields.StatusField(choices=[('modified', 'modified'), ('running', 'running'), ('error', 'error')], default='modified', help_text='modified means the configuration is not applied yet; running means applied and running; error means the configuration caused issues and it was rolledback', max_length=100, no_check_for_status=True)),
('key', models.CharField(db_index=True, default=django_netjsonconfig.base.config.get_random_key, help_text='unique key that can be used to download the configuration', max_length=64, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[^\\s/\\.]+$', 32), code='invalid', message='Key must not contain spaces, dots or slashes.')])),
('key', models.CharField(db_index=True, default=django_netjsonconfig.utils.get_random_key, help_text='unique key that can be used to download the configuration', max_length=64, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[^\\s/\\.]+$', 32), code='invalid', message='Key must not contain spaces, dots or slashes.')])),
('mac_address', models.CharField(help_text='primary mac address', max_length=17, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})', 32), code='invalid', message='Must be a valid mac address.')])),
('last_ip', models.GenericIPAddressField(blank=True, help_text='indicates the last ip from which the configuration was downloaded from (except downloads from this page)', null=True)),
('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='openwisp_users.Organization', verbose_name='organization')),
],
options={
'verbose_name_plural': 'configurations',
'verbose_name': 'configuration',
'verbose_name_plural': 'configurations',
'abstract': False,
},
),
migrations.CreateModel(
name='OrganizationConfigSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('registration_enabled', models.BooleanField(default=True, help_text='Whether automatic registration of devices is enabled or not', verbose_name='auto-registration enabled')),
('shared_secret', models.CharField(db_index=True, default=django_netjsonconfig.base.config.get_random_key, help_text='used for automatic registration of devices', max_length=32, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[^\\s/\\.]+$', 32), code='invalid', message='Key must not contain spaces, dots or slashes.')], verbose_name='shared secret')),
('shared_secret', models.CharField(db_index=True, default=django_netjsonconfig.utils.get_random_key, help_text='used for automatic registration of devices', max_length=32, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[^\\s/\\.]+$', 32), code='invalid', message='Key must not contain spaces, dots or slashes.')], verbose_name='shared secret')),
('organization', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='config_settings', to='openwisp_users.Organization', verbose_name='organization')),
],
options={
'verbose_name_plural': 'Configuration management settings',
'verbose_name': 'Configuration management settings',
'verbose_name_plural': 'Configuration management settings',
},
),
migrations.CreateModel(
Expand All @@ -76,8 +76,8 @@ class Migration(migrations.Migration):
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='openwisp_users.Organization', verbose_name='organization')),
],
options={
'verbose_name_plural': 'templates',
'verbose_name': 'template',
'verbose_name_plural': 'templates',
'abstract': False,
},
),
Expand All @@ -98,8 +98,8 @@ class Migration(migrations.Migration):
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='openwisp_users.Organization', verbose_name='organization')),
],
options={
'verbose_name_plural': 'VPN servers',
'verbose_name': 'VPN server',
'verbose_name_plural': 'VPN servers',
'abstract': False,
},
),
Expand All @@ -113,8 +113,8 @@ class Migration(migrations.Migration):
('vpn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='config.Vpn')),
],
options={
'verbose_name_plural': 'VPN clients',
'verbose_name': 'VPN client',
'verbose_name_plural': 'VPN clients',
'abstract': False,
},
),
Expand Down
21 changes: 0 additions & 21 deletions openwisp_controller/config/migrations/0002_config_settings_uuid.py

This file was deleted.

0 comments on commit d173c24

Please sign in to comment.