Skip to content

Commit

Permalink
Squash migrations (#2460)
Browse files Browse the repository at this point in the history
squash and fix migrations to match ng branch
  • Loading branch information
ar4s authored and mkurek committed Jun 7, 2016
1 parent 2acc488 commit 1c14e59
Show file tree
Hide file tree
Showing 55 changed files with 487 additions and 1,077 deletions.
48 changes: 0 additions & 48 deletions src/ralph/assets/migrations/0011_auto_20160404_0852.py

This file was deleted.

19 changes: 0 additions & 19 deletions src/ralph/assets/migrations/0012_auto_20160407_0849.py

This file was deleted.

115 changes: 115 additions & 0 deletions src/ralph/assets/migrations/0012_auto_20160606_1409.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import ralph.lib.mixins.models
import django.db.models.deletion
import django.core.validators
import ralph.lib.mixins.fields
import mptt.fields
import datetime
import re


class Migration(migrations.Migration):

dependencies = [
('accounts', '0003_region_country'),
('assets', '0011_auto_20160603_0742'),
]

operations = [
migrations.CreateModel(
name='ConfigurationClass',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
('created', models.DateTimeField(verbose_name='date created', auto_now_add=True)),
('modified', models.DateTimeField(verbose_name='last modified', auto_now=True)),
('class_name', models.CharField(validators=[django.core.validators.RegexValidator(regex='\\w+')], verbose_name='class name', help_text='ex. puppet class', max_length=255)),
('path', models.TextField(editable=False, verbose_name='path', default='', help_text='path is constructed from name of module and name of class', blank=True)),
],
options={
'verbose_name': 'configuration class',
'ordering': ('path',),
},
bases=(ralph.lib.mixins.models.AdminAbsoluteUrlMixin, models.Model),
),
migrations.CreateModel(
name='ConfigurationModule',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
('created', models.DateTimeField(verbose_name='date created', auto_now_add=True)),
('modified', models.DateTimeField(verbose_name='last modified', auto_now=True)),
('name', models.CharField(validators=[django.core.validators.RegexValidator(regex='\\w+')], verbose_name='name', help_text='module name (ex. directory name in puppet)', max_length=255)),
('lft', models.PositiveIntegerField(editable=False, db_index=True)),
('rght', models.PositiveIntegerField(editable=False, db_index=True)),
('tree_id', models.PositiveIntegerField(editable=False, db_index=True)),
('level', models.PositiveIntegerField(editable=False, db_index=True)),
('parent', mptt.fields.TreeForeignKey(related_name='children_modules', verbose_name='parent module', to='assets.ConfigurationModule', default=None, blank=True, null=True)),
('support_team', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, verbose_name='team', to='accounts.Team', default=None, blank=True, null=True)),
],
options={
'verbose_name': 'configuration module',
'ordering': ('parent__name', 'name'),
},
bases=(ralph.lib.mixins.models.AdminAbsoluteUrlMixin, models.Model),
),
migrations.CreateModel(
name='Ethernet',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
('created', models.DateTimeField(verbose_name='date created', auto_now_add=True)),
('modified', models.DateTimeField(verbose_name='last modified', auto_now=True)),
('label', ralph.lib.mixins.fields.NullableCharField(verbose_name='name', max_length=255, blank=True, null=True)),
('mac', ralph.lib.mixins.fields.NullableCharField(verbose_name='MAC address', validators=[django.core.validators.RegexValidator(message="'%(value)s' is not a valid MAC address.", regex=re.compile('^\\s*([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}\\s*$', 32))], unique=True, max_length=24, blank=True, null=True)),
('speed', models.PositiveIntegerField(verbose_name='speed', default=11, choices=[(1, '10 Mbps'), (2, '100 Mbps'), (3, '1 Gbps'), (4, '10 Gbps'), (5, '40 Gbps'), (6, '100 Gbps'), (11, 'unknown speed')])),
('base_object', models.ForeignKey(related_name='ethernet', to='assets.BaseObject')),
('model', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, verbose_name='model', to='assets.ComponentModel', default=None, blank=True, null=True)),
],
options={
'verbose_name': 'ethernet',
'verbose_name_plural': 'ethernets',
'ordering': ('base_object', 'mac'),
},
),
migrations.AddField(
model_name='genericcomponent',
name='created',
field=models.DateTimeField(verbose_name='date created', default=datetime.datetime(2016, 6, 6, 14, 7, 47, 639689), auto_now_add=True),
preserve_default=False,
),
migrations.AddField(
model_name='genericcomponent',
name='modified',
field=models.DateTimeField(verbose_name='last modified', default=datetime.datetime(2016, 6, 6, 14, 7, 51, 223597), auto_now=True),
preserve_default=False,
),
migrations.AlterField(
model_name='assetlasthostname',
name='postfix',
field=models.CharField(db_index=True, max_length=30),
),
migrations.AlterField(
model_name='assetlasthostname',
name='prefix',
field=models.CharField(db_index=True, max_length=30),
),
migrations.AddField(
model_name='configurationclass',
name='module',
field=models.ForeignKey(related_name='configuration_classes', to='assets.ConfigurationModule'),
),
migrations.AddField(
model_name='baseobject',
name='configuration_path',
field=models.ForeignKey(to='assets.ConfigurationClass', verbose_name='configuration path', help_text='path to configuration for this object, for example path to puppet class', blank=True, null=True),
),
migrations.AlterUniqueTogether(
name='configurationmodule',
unique_together=set([('parent', 'name')]),
),
migrations.AlterUniqueTogether(
name='configurationclass',
unique_together=set([('module', 'class_name')]),
),
]
26 changes: 0 additions & 26 deletions src/ralph/assets/migrations/0013_auto_20160412_1222.py

This file was deleted.

20 changes: 0 additions & 20 deletions src/ralph/assets/migrations/0014_auto_20160414_0958.py

This file was deleted.

24 changes: 0 additions & 24 deletions src/ralph/assets/migrations/0015_auto_20160425_1335.py

This file was deleted.

70 changes: 0 additions & 70 deletions src/ralph/assets/migrations/0016_auto_20160429_1125.py

This file was deleted.

32 changes: 0 additions & 32 deletions src/ralph/assets/migrations/0017_auto_20160510_1436.py

This file was deleted.

20 changes: 0 additions & 20 deletions src/ralph/assets/migrations/0018_auto_20160512_0842.py

This file was deleted.

Loading

0 comments on commit 1c14e59

Please sign in to comment.