mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-25 23:21:41 +03:00
Removed squashed migrations
This commit is contained in:
parent
e9a719a2eb
commit
7502fe3bcc
@ -1,401 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import datetime
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Authenticator',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(unique=True, max_length=128)),
|
||||
('data_type', models.CharField(max_length=128)),
|
||||
('data', models.TextField(default='')),
|
||||
('comments', models.TextField(default='')),
|
||||
('priority', models.IntegerField(default=0, db_index=True)),
|
||||
('small_name', models.CharField(default='', max_length=32, db_index=True)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Cache',
|
||||
fields=[
|
||||
('owner', models.CharField(max_length=128, db_index=True)),
|
||||
('key', models.CharField(max_length=64, serialize=False, primary_key=True)),
|
||||
('value', models.TextField(default='')),
|
||||
('created', models.DateTimeField()),
|
||||
('validity', models.IntegerField(default=60)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_utility_cache',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Config',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('section', models.CharField(max_length=128, db_index=True)),
|
||||
('key', models.CharField(max_length=64, db_index=True)),
|
||||
('value', models.TextField(default='')),
|
||||
('crypt', models.BooleanField(default=False)),
|
||||
('long', models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_configuration',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DelayedTask',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('type', models.CharField(max_length=128)),
|
||||
('tag', models.CharField(max_length=64, db_index=True)),
|
||||
('instance', models.TextField()),
|
||||
('insert_date', models.DateTimeField(auto_now_add=True)),
|
||||
('execution_delay', models.PositiveIntegerField()),
|
||||
('execution_time', models.DateTimeField(db_index=True)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DeployedService',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(default='', max_length=128)),
|
||||
('comments', models.CharField(default='', max_length=256)),
|
||||
('state', models.CharField(default='A', max_length=1, db_index=True)),
|
||||
('state_date', models.DateTimeField(default=datetime.datetime(1972, 7, 1, 0, 0))),
|
||||
('initial_srvs', models.PositiveIntegerField(default=0)),
|
||||
('cache_l1_srvs', models.PositiveIntegerField(default=0)),
|
||||
('cache_l2_srvs', models.PositiveIntegerField(default=0)),
|
||||
('max_srvs', models.PositiveIntegerField(default=0)),
|
||||
('current_pub_revision', models.PositiveIntegerField(default=1)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds__deployed_service',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DeployedServicePublication',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('publish_date', models.DateTimeField(db_index=True)),
|
||||
('data', models.TextField(default='')),
|
||||
('state', models.CharField(default='P', max_length=1, db_index=True)),
|
||||
('state_date', models.DateTimeField()),
|
||||
('revision', models.PositiveIntegerField(default=1)),
|
||||
('deployed_service', models.ForeignKey(related_name='publications', to='uds.DeployedService', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('publish_date',),
|
||||
'db_table': 'uds__deployed_service_pub',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Group',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=128, db_index=True)),
|
||||
('state', models.CharField(default='A', max_length=1, db_index=True)),
|
||||
('comments', models.CharField(default='', max_length=256)),
|
||||
('is_meta', models.BooleanField(default=False, db_index=True)),
|
||||
('groups', models.ManyToManyField(to='uds.Group')),
|
||||
('manager', models.ForeignKey(related_name='groups', to='uds.Authenticator', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Log',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('owner_id', models.IntegerField(default=0, db_index=True)),
|
||||
('owner_type', models.SmallIntegerField(default=0, db_index=True)),
|
||||
('created', models.DateTimeField(db_index=True)),
|
||||
('source', models.CharField(default='internal', max_length=16, db_index=True)),
|
||||
('level', models.PositiveIntegerField(default=0, db_index=True)),
|
||||
('data', models.CharField(default='', max_length=255)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_log',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Network',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(unique=True, max_length=64)),
|
||||
('net_start', models.BigIntegerField(db_index=True)),
|
||||
('net_end', models.BigIntegerField(db_index=True)),
|
||||
('net_string', models.CharField(default='', max_length=128)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OSManager',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(unique=True, max_length=128)),
|
||||
('data_type', models.CharField(max_length=128)),
|
||||
('data', models.TextField(default='')),
|
||||
('comments', models.CharField(max_length=256)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Provider',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(unique=True, max_length=128)),
|
||||
('data_type', models.CharField(max_length=128)),
|
||||
('data', models.TextField(default='')),
|
||||
('comments', models.CharField(max_length=256)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Scheduler',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(unique=True, max_length=64)),
|
||||
('frecuency', models.PositiveIntegerField(default=86400)),
|
||||
('last_execution', models.DateTimeField(auto_now_add=True)),
|
||||
('next_execution', models.DateTimeField(default=datetime.datetime(1972, 7, 1, 0, 0), db_index=True)),
|
||||
('owner_server', models.CharField(default='', max_length=64, db_index=True)),
|
||||
('state', models.CharField(default='X', max_length=1, db_index=True)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Service',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=128)),
|
||||
('data_type', models.CharField(max_length=128)),
|
||||
('data', models.TextField(default='')),
|
||||
('comments', models.CharField(max_length=256)),
|
||||
('provider', models.ForeignKey(related_name='services', to='uds.Provider', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='StatsCounters',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('owner_id', models.IntegerField(default=0, db_index=True)),
|
||||
('owner_type', models.SmallIntegerField(default=0, db_index=True)),
|
||||
('counter_type', models.SmallIntegerField(default=0, db_index=True)),
|
||||
('stamp', models.IntegerField(default=0, db_index=True)),
|
||||
('value', models.IntegerField(default=0, db_index=True)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_stats_c',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='StatsEvents',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('owner_id', models.IntegerField(default=0, db_index=True)),
|
||||
('owner_type', models.SmallIntegerField(default=0, db_index=True)),
|
||||
('event_type', models.SmallIntegerField(default=0, db_index=True)),
|
||||
('stamp', models.IntegerField(default=0, db_index=True)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_stats_e',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Storage',
|
||||
fields=[
|
||||
('owner', models.CharField(max_length=128, db_index=True)),
|
||||
('key', models.CharField(max_length=64, serialize=False, primary_key=True)),
|
||||
('data', models.TextField(default='')),
|
||||
('attr1', models.CharField(default=None, max_length=64, null=True, db_index=True, blank=True)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Transport',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(unique=True, max_length=128)),
|
||||
('data_type', models.CharField(max_length=128)),
|
||||
('data', models.TextField(default='')),
|
||||
('comments', models.CharField(max_length=256)),
|
||||
('priority', models.IntegerField(default=0, db_index=True)),
|
||||
('nets_positive', models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UniqueId',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('owner', models.CharField(default='', max_length=128, db_index=True)),
|
||||
('basename', models.CharField(max_length=32, db_index=True)),
|
||||
('seq', models.BigIntegerField(db_index=True)),
|
||||
('assigned', models.BooleanField(default=True, db_index=True)),
|
||||
('stamp', models.IntegerField(default=0, db_index=True)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('-seq',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='User',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=128, db_index=True)),
|
||||
('real_name', models.CharField(max_length=128)),
|
||||
('comments', models.CharField(max_length=256)),
|
||||
('state', models.CharField(max_length=1, db_index=True)),
|
||||
('password', models.CharField(default='', max_length=128)),
|
||||
('staff_member', models.BooleanField(default=False)),
|
||||
('is_admin', models.BooleanField(default=False)),
|
||||
('last_access', models.DateTimeField(default=datetime.datetime(1972, 7, 1, 0, 0))),
|
||||
('parent', models.IntegerField(default=-1)),
|
||||
('manager', models.ForeignKey(related_name='users', to='uds.Authenticator', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('name',),
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UserPreference',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('module', models.CharField(max_length=32, db_index=True)),
|
||||
('name', models.CharField(max_length=32, db_index=True)),
|
||||
('value', models.CharField(max_length=128, db_index=True)),
|
||||
('user', models.ForeignKey(related_name='preferences', to='uds.User', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UserService',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('unique_id', models.CharField(default='', max_length=128, db_index=True)),
|
||||
('friendly_name', models.CharField(default='', max_length=128)),
|
||||
('state', models.CharField(default='P', max_length=1, db_index=True)),
|
||||
('os_state', models.CharField(default='P', max_length=1)),
|
||||
('state_date', models.DateTimeField(auto_now_add=True, db_index=True)),
|
||||
('creation_date', models.DateTimeField(db_index=True)),
|
||||
('data', models.TextField(default='')),
|
||||
('in_use', models.BooleanField(default=False)),
|
||||
('in_use_date', models.DateTimeField(default=datetime.datetime(1972, 7, 1, 0, 0))),
|
||||
('cache_level', models.PositiveSmallIntegerField(default=0, db_index=True)),
|
||||
('src_hostname', models.CharField(default='', max_length=64)),
|
||||
('src_ip', models.CharField(default='', max_length=15)),
|
||||
('cluster_node', models.CharField(default=None, max_length=128, null=True, db_index=True, blank=True)),
|
||||
('deployed_service', models.ForeignKey(related_name='userServices', to='uds.DeployedService', on_delete=models.CASCADE)),
|
||||
('publication', models.ForeignKey(related_name='userServices', blank=True, to='uds.DeployedServicePublication', null=True, on_delete=models.CASCADE)),
|
||||
('user', models.ForeignKey(related_name='userServices', default=None, blank=True, to='uds.User', null=True, on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('creation_date',),
|
||||
'db_table': 'uds__user_service',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='user',
|
||||
unique_together=set([('manager', 'name')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='uniqueid',
|
||||
unique_together=set([('basename', 'seq')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='service',
|
||||
unique_together=set([('provider', 'name')]),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='network',
|
||||
name='transports',
|
||||
field=models.ManyToManyField(related_name='networks', db_table='uds_net_trans', to='uds.Transport'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='group',
|
||||
name='users',
|
||||
field=models.ManyToManyField(related_name='groups', to='uds.User'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='group',
|
||||
unique_together=set([('manager', 'name')]),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='assignedGroups',
|
||||
field=models.ManyToManyField(related_name='deployedServices', db_table='uds__ds_grps', to='uds.Group'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='osmanager',
|
||||
field=models.ForeignKey(related_name='deployedServices', blank=True, to='uds.OSManager', null=True, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='service',
|
||||
field=models.ForeignKey(related_name='deployedServices', blank=True, to='uds.Service', null=True, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='transports',
|
||||
field=models.ManyToManyField(related_name='deployedServices', db_table='uds__ds_trans', to='uds.Transport'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='config',
|
||||
unique_together=set([('section', 'key')]),
|
||||
),
|
||||
]
|
@ -8,8 +8,6 @@ import uds.models.util
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
replaces = [('uds', '0001_initial'), ('uds', '0002_auto_20140908_1344'), ('uds', '0003_add_uuids'), ('uds', '0004_auto_20140916_1217'), ('uds', '0006_add_user_parent_uuid'), ('uds', '0007_image'), ('uds', '0008_userserviceproperty'), ('uds', '0009_TransportsToNewerModel'), ('uds', '0010_deployedservice_show_transports'), ('uds', '0011_auto_20141220_1203'), ('uds', '0012_auto_20141221_1210'), ('uds', '0013_statsevents_fld4'), ('uds', '0014_permissions'), ('uds', '0015_ticketstore'), ('uds', '0016_auto_20150617_0741'), ('uds', '0017_calendar_calendarrule'), ('uds', '0018_auto_20151005_1305'), ('uds', '0019_auto_20160210_0144'), ('uds', '0020_auto_20160216_0509'), ('uds', '0021_auto_20160405_0429'), ('uds', '0022_dbfile_owner'), ('uds', '0023_transport_allowed_oss'), ('uds', '0024_auto_20171025_1405'), ('uds', '0025_deployedservice_ignores_unused')]
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
|
@ -1,30 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='network',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='config',
|
||||
name='field_type',
|
||||
field=models.IntegerField(default=-1),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='group',
|
||||
name='meta_if_any',
|
||||
field=models.BooleanField(default=False),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
@ -1,109 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
from uds.core.util.model import generateUuid
|
||||
|
||||
|
||||
# noinspection PyUnusedLocal
|
||||
def add_uuids(apps, schema_editor):
|
||||
"""
|
||||
Adds uuids values to migrated models
|
||||
"""
|
||||
for model in ('Authenticator', 'Group', 'Network', 'UserService',
|
||||
'OSManager', 'Provider', 'Service', 'DeployedService',
|
||||
'DeployedServicePublication', 'Transport', 'User'):
|
||||
Model = apps.get_model("uds", model)
|
||||
for m in Model.objects.all():
|
||||
m.uuid = generateUuid()
|
||||
m.save()
|
||||
|
||||
|
||||
# noinspection PyUnusedLocal
|
||||
def remove_uuids(apps, schema_editor):
|
||||
"""
|
||||
Dummy function. uuid field will be dropped on reverse migration
|
||||
"""
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"""
|
||||
Implements the migrations needed to add uuid to manageable objects
|
||||
"""
|
||||
dependencies = [
|
||||
('uds', '0002_auto_20140908_1344'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='userservice',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='authenticator',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='group',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='network',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='osmanager',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='provider',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='service',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservicepublication',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='transport',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='uuid',
|
||||
field=models.CharField(default=None, max_length=50, unique=True, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.RunPython(
|
||||
add_uuids,
|
||||
remove_uuids
|
||||
),
|
||||
]
|
@ -1,44 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0003_add_uuids'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='authenticator',
|
||||
name='comments',
|
||||
field=models.CharField(max_length=256),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='authenticator',
|
||||
name='name',
|
||||
field=models.CharField(max_length=128, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='osmanager',
|
||||
name='name',
|
||||
field=models.CharField(max_length=128, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='provider',
|
||||
name='name',
|
||||
field=models.CharField(max_length=128, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='service',
|
||||
name='name',
|
||||
field=models.CharField(max_length=128, db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='transport',
|
||||
name='name',
|
||||
field=models.CharField(max_length=128, db_index=True),
|
||||
),
|
||||
]
|
@ -1,63 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
# noinspection PyUnusedLocal
|
||||
def add_parent_uuids(apps, schema_editor):
|
||||
"""
|
||||
Adds uuids values to migrated models
|
||||
"""
|
||||
model = apps.get_model("uds", 'User')
|
||||
for m in model.objects.all():
|
||||
parent = int(m.parent)
|
||||
if parent != -1:
|
||||
try:
|
||||
parent = model.objects.get(pk=parent).uuid
|
||||
except Exception:
|
||||
parent = None
|
||||
else:
|
||||
parent = None
|
||||
m.parent = parent
|
||||
m.save()
|
||||
|
||||
|
||||
# noinspection PyUnusedLocal
|
||||
def remove_parent_uuids(apps, schema_editor):
|
||||
"""
|
||||
Dummy function. uuid field will be dropped on reverse migration
|
||||
"""
|
||||
model = apps.get_model("uds", 'User')
|
||||
for m in model.objects.all():
|
||||
parent = m.parent
|
||||
if parent is not None and parent != '':
|
||||
try:
|
||||
parent = model.objects.get(uuid=parent).id
|
||||
except Exception:
|
||||
parent = -1
|
||||
else:
|
||||
parent = -1
|
||||
m.parent = parent
|
||||
m.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0004_auto_20140916_1217'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='parent',
|
||||
field=models.CharField(default=None, max_length=50, null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.RunPython(
|
||||
add_parent_uuids,
|
||||
remove_parent_uuids
|
||||
),
|
||||
|
||||
]
|
@ -1,37 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0006_add_user_parent_uuid'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Image',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('name', models.CharField(unique=True, max_length=128, db_index=True)),
|
||||
('stamp', models.DateTimeField()),
|
||||
('data', models.BinaryField()),
|
||||
('thumb', models.BinaryField()),
|
||||
('width', models.IntegerField(default=0)),
|
||||
('height', models.IntegerField(default=0)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_images',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='image',
|
||||
field=models.ForeignKey(related_name='deployedServices', blank=True, to='uds.Image', null=True, on_delete=models.CASCADE),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
@ -1,31 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0007_image'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='UserServiceProperty',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=128, db_index=True)),
|
||||
('value', models.TextField(default='')),
|
||||
('user_service', models.ForeignKey(related_name='properties', to='uds.UserService', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds__user_service_property',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='userserviceproperty',
|
||||
unique_together=set([('name', 'user_service')]),
|
||||
),
|
||||
]
|
@ -1,137 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.db import migrations
|
||||
from uds.core.ui import gui
|
||||
|
||||
# Disabled, not needed on 3.0 and forward migrations...
|
||||
# (can be squashed, this transforms data, that is nonexistant on 3.0 new install or recent migrations)
|
||||
|
||||
# from uds.transports.RDP.RDPTransport import RDPTransport
|
||||
# from uds.transports.RDP.TRDPTransport import TRDPTransport
|
||||
|
||||
# from uds.core.environment import Environment
|
||||
|
||||
|
||||
# def unmarshalRDP(str_):
|
||||
# data = str_.split('\t')
|
||||
# if data[0] in ('v1', 'v2', 'v3'):
|
||||
# useEmptyCreds = gui.strToBool(data[1])
|
||||
# allowSmartcards = gui.strToBool(data[2])
|
||||
# allowPrinters = gui.strToBool(data[3])
|
||||
# allowDrives = gui.strToBool(data[4])
|
||||
# allowSerials = gui.strToBool(data[5])
|
||||
|
||||
# i = 0
|
||||
# wallpaper = False
|
||||
# # if data[0] == 'v1':
|
||||
# # wallpaper = False
|
||||
# # i = 0
|
||||
|
||||
# if data[0] in ('v2', 'v3'):
|
||||
# wallpaper = gui.strToBool(data[6])
|
||||
# i = 1
|
||||
|
||||
# fixedName = data[6 + i]
|
||||
# fixedPassword = data[7 + i]
|
||||
# fixedDomain = data[8 + i]
|
||||
|
||||
# if data[0] == 'v3':
|
||||
# withoutDomain = gui.strToBool(data[9 + i])
|
||||
# else:
|
||||
# withoutDomain = False
|
||||
# return {
|
||||
# 'useEmptyCreds': useEmptyCreds,
|
||||
# 'allowSmartcards': allowSmartcards,
|
||||
# 'allowPrinters': allowPrinters,
|
||||
# 'allowDrives': allowDrives,
|
||||
# 'allowSerials': allowSerials,
|
||||
# 'wallpaper': wallpaper,
|
||||
# 'fixedName': fixedName,
|
||||
# 'fixedPassword': fixedPassword,
|
||||
# 'fixedDomain': fixedDomain,
|
||||
# 'withoutDomain': withoutDomain
|
||||
# }
|
||||
# # If data not recognized
|
||||
# raise Exception('Unknown data version {}'.format(data[0]))
|
||||
|
||||
|
||||
# def unmarshalTRDP(str_):
|
||||
# data = str_.split('\t')
|
||||
# if data[0] in ('v1', 'v2', 'v3'):
|
||||
# i = 0
|
||||
# useEmptyCreds = gui.strToBool(data[1])
|
||||
# allowSmartcards = gui.strToBool(data[2])
|
||||
# allowPrinters = gui.strToBool(data[3])
|
||||
# allowDrives = gui.strToBool(data[4])
|
||||
# allowSerials = gui.strToBool(data[5])
|
||||
# wallpaper = False
|
||||
|
||||
# if data[0] == 'v1':
|
||||
# wallpaper = False
|
||||
# i = 0
|
||||
|
||||
# if data[0] in ('v2', 'v3'):
|
||||
# wallpaper = gui.strToBool(data[6])
|
||||
# i = 1
|
||||
|
||||
# fixedName = data[6 + i]
|
||||
# fixedPassword = data[7 + i]
|
||||
# fixedDomain = data[8 + i]
|
||||
# tunnelServer = data[9 + i]
|
||||
# tunnelCheckServer = data[10 + i]
|
||||
|
||||
# if data[0] == 'v3':
|
||||
# withoutDomain = gui.strToBool(data[11 + i])
|
||||
# else:
|
||||
# withoutDomain = False
|
||||
|
||||
# return {
|
||||
# 'useEmptyCreds': useEmptyCreds,
|
||||
# 'allowSmartcards': allowSmartcards,
|
||||
# 'allowPrinters': allowPrinters,
|
||||
# 'allowDrives': allowDrives,
|
||||
# 'allowSerials': allowSerials,
|
||||
# 'wallpaper': wallpaper,
|
||||
# 'fixedName': fixedName,
|
||||
# 'fixedPassword': fixedPassword,
|
||||
# 'fixedDomain': fixedDomain,
|
||||
# 'withoutDomain': withoutDomain,
|
||||
# 'tunnelServer': tunnelServer,
|
||||
# 'tunnelCheckServer': tunnelCheckServer
|
||||
# }
|
||||
|
||||
def transformTransports(apps, schema_editor):
|
||||
"""
|
||||
Move serialization to a better model (it's time, the model WAS there since 1.1 :) )
|
||||
"""
|
||||
# model = apps.get_model("uds", 'Transport')
|
||||
# for t in model.objects.all():
|
||||
# if t.data_type == RDPTransport.typeType:
|
||||
# values = unmarshalRDP(encoders.decode(t.data, 'base64'))
|
||||
# rdp = RDPTransport(Environment.getTempEnv(), values)
|
||||
# t.data = rdp.serialize()
|
||||
# t.save()
|
||||
|
||||
# if t.data_type == TRDPTransport.typeType:
|
||||
# values = unmarshalTRDP(encoders.decode(t.data, 'base64'))
|
||||
# rdp = TRDPTransport(Environment.getTempEnv(), values)
|
||||
# t.data = rdp.serialize()
|
||||
# t.save()
|
||||
return
|
||||
|
||||
def untransformTransports(apps, schema_editor):
|
||||
raise Exception('This migration can\'t be undone')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0008_userserviceproperty'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
transformTransports,
|
||||
untransformTransports
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0009_TransportsToNewerModel'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='show_transports',
|
||||
field=models.BooleanField(default=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
@ -1,26 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0010_deployedservice_show_transports'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='meta_pools',
|
||||
field=models.ManyToManyField(to='uds.DeployedService'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='provider',
|
||||
name='maintenance_mode',
|
||||
field=models.BooleanField(default=False, db_index=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0011_auto_20141220_1203'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='statsevents',
|
||||
name='fld1',
|
||||
field=models.CharField(default='', max_length=128),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='statsevents',
|
||||
name='fld2',
|
||||
field=models.CharField(default='', max_length=128),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='statsevents',
|
||||
name='fld3',
|
||||
field=models.CharField(default='', max_length=128),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0012_auto_20141221_1210'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='statsevents',
|
||||
name='fld4',
|
||||
field=models.CharField(default='', max_length=128),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0013_statsevents_fld4'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Permissions',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('created', models.DateTimeField(db_index=True)),
|
||||
('ends', models.DateTimeField(default=None, null=True, db_index=True, blank=True)),
|
||||
('object_type', models.SmallIntegerField(default=-1, db_index=True)),
|
||||
('object_id', models.IntegerField(default=None, null=True, db_index=True, blank=True)),
|
||||
('permission', models.SmallIntegerField(default=0, db_index=True)),
|
||||
('group', models.ForeignKey(related_name='permissions', default=None, blank=True, to='uds.Group', null=True, on_delete=models.CASCADE)),
|
||||
('user', models.ForeignKey(related_name='permissions', default=None, blank=True, to='uds.User', null=True, on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0014_permissions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='TicketStore',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('stamp', models.DateTimeField()),
|
||||
('validity', models.IntegerField(default=60)),
|
||||
('data', models.BinaryField()),
|
||||
('validator', models.BinaryField(default=None, null=True, blank=True)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_tickets',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
@ -1,59 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
import uds.models.util
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0015_ticketstore'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='DeployedServicePublicationChangelog',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('stamp', models.DateTimeField()),
|
||||
('revision', models.PositiveIntegerField(default=1)),
|
||||
('log', models.TextField(default='')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'db_table': 'uds__deployed_service_pub_cl',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='group',
|
||||
name='created',
|
||||
field=models.DateTimeField(default=uds.models.util.getSqlDatetime, blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='created',
|
||||
field=models.DateTimeField(default=uds.models.util.getSqlDatetime, blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='deployedservice',
|
||||
name='image',
|
||||
field=models.ForeignKey(related_name='deployedServices', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='uds.Image', null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='group',
|
||||
name='manager',
|
||||
field=uds.models.util.UnsavedForeignKey(related_name='groups', to='uds.Authenticator', on_delete=models.CASCADE),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='manager',
|
||||
field=uds.models.util.UnsavedForeignKey(related_name='users', to='uds.Authenticator', on_delete=models.CASCADE),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservicepublicationchangelog',
|
||||
name='publication',
|
||||
field=models.ForeignKey(related_name='changelog', to='uds.DeployedService', on_delete=models.CASCADE),
|
||||
),
|
||||
]
|
@ -1,46 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0016_auto_20150617_0741'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Calendar',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('name', models.CharField(default='', max_length=128)),
|
||||
('comments', models.CharField(default='', max_length=256)),
|
||||
('modified', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_calendar',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CalendarRule',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('name', models.CharField(max_length=128)),
|
||||
('comments', models.CharField(max_length=256)),
|
||||
('start', models.DateTimeField()),
|
||||
('end', models.DateField(null=True, blank=True)),
|
||||
('frequency', models.CharField(max_length=32, choices=[('YEARLY', 'Yearly'), ('MONTHLY', 'Monthly'), ('WEEKLY', 'Weekly'), ('DAILY', 'Daily'), ('WEEKDAYS', 'Weekdays')])),
|
||||
('interval', models.IntegerField(default=1)),
|
||||
('duration', models.IntegerField(default=0)),
|
||||
('duration_unit', models.CharField(default='MINUTES', max_length=32, choices=[('MINUTES', 'Minutes'), ('HOURS', 'Hours'), ('DAYS', 'Days'), ('WEEKS', 'Weeks')])),
|
||||
('calendar', models.ForeignKey(related_name='rules', to='uds.Calendar', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_calendar_rules',
|
||||
},
|
||||
),
|
||||
]
|
@ -1,23 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0017_calendar_calendarrule'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='scheduler',
|
||||
name='last_execution',
|
||||
field=models.DateTimeField(auto_now_add=True, db_index=True),
|
||||
),
|
||||
migrations.AlterIndexTogether(
|
||||
name='userservice',
|
||||
index_together=set([('deployed_service', 'cache_level', 'state')]),
|
||||
),
|
||||
]
|
@ -1,65 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0018_auto_20151005_1305'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Tag',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('tag', models.CharField(unique=True, max_length=32, db_index=True)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_tag',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='authenticator',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='calendar',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='network',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='osmanager',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='provider',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='service',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='transport',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(to='uds.Tag'),
|
||||
),
|
||||
]
|
@ -1,35 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0019_auto_20160210_0144'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ServicesPoolGroup',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('uuid', models.CharField(default=None, max_length=50, unique=True, null=True)),
|
||||
('name', models.CharField(default='', unique=True, max_length=128, db_index=True)),
|
||||
('comments', models.CharField(default='', max_length=256)),
|
||||
('priority', models.IntegerField(default=0, db_index=True)),
|
||||
('image', models.ForeignKey(related_name='servicesPoolsGroup', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='uds.Image', null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'db_table': 'uds__pools_groups',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='servicesPoolGroup',
|
||||
field=models.ForeignKey(related_name='servicesPools', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='uds.ServicesPoolGroup', null=True),
|
||||
),
|
||||
]
|
@ -1,86 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.5 on 2016-04-05 04:29
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0020_auto_20160216_0509'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CalendarAccess',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=None, max_length=50, null=True, unique=True)),
|
||||
('access', models.CharField(default='DENY', max_length=8)),
|
||||
('priority', models.IntegerField(db_index=True, default=0)),
|
||||
('calendar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uds.Calendar')),
|
||||
],
|
||||
options={
|
||||
'ordering': ('priority',),
|
||||
'db_table': 'uds_cal_access',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CalendarAction',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=None, max_length=50, null=True, unique=True)),
|
||||
('action', models.CharField(default='', max_length=64)),
|
||||
('at_start', models.BooleanField(default=False)),
|
||||
('events_offset', models.IntegerField(default=0)),
|
||||
('params', models.CharField(default='', max_length=1024)),
|
||||
('last_execution', models.DateTimeField(blank=True, db_index=True, default=None, null=True)),
|
||||
('next_execution', models.DateTimeField(blank=True, db_index=True, default=None, null=True)),
|
||||
('calendar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uds.Calendar')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds_cal_action',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DBFile',
|
||||
fields=[
|
||||
('uuid', models.CharField(default=None, max_length=50, null=True, unique=True)),
|
||||
('name', models.CharField(max_length=255, primary_key=True, serialize=False)),
|
||||
('content', models.TextField(blank=True)),
|
||||
('size', models.IntegerField(default=0)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('modified', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='fallbackAccess',
|
||||
field=models.CharField(default='ALLOW', max_length=8),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='calendaraction',
|
||||
name='service_pool',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uds.DeployedService'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='calendaraccess',
|
||||
name='service_pool',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uds.DeployedService'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='accessCalendars',
|
||||
field=models.ManyToManyField(related_name='accessSP', through='uds.CalendarAccess', to='uds.Calendar'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='actionsCalendars',
|
||||
field=models.ManyToManyField(related_name='actionsSP', through='uds.CalendarAction', to='uds.Calendar'),
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.5 on 2016-07-10 20:31
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0021_auto_20160405_0429'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='dbfile',
|
||||
name='owner',
|
||||
field=models.CharField(default='', max_length=32),
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.9 on 2016-10-10 07:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0022_dbfile_owner'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='transport',
|
||||
name='allowed_oss',
|
||||
field=models.CharField(default='', max_length=255),
|
||||
),
|
||||
]
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.9 on 2017-10-25 14:05
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0023_transport_allowed_oss'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='allow_users_remove',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='short_name',
|
||||
field=models.CharField(default='', max_length=32),
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.9 on 2017-11-29 09:28
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0024_auto_20171025_1405'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='deployedservice',
|
||||
name='ignores_unused',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
@ -8,7 +8,7 @@ from django.db import migrations, models
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('uds', '0025_deployedservice_ignores_unused'),
|
||||
('uds', '0001_squashed_0025_deployedservice_ignores_unused'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@ -104,7 +104,7 @@ def getServicesData(
|
||||
|
||||
# Metapool helpers
|
||||
def transportIterator(member) -> typing.Iterable[Transport]:
|
||||
for t in member.pool.transports.all():
|
||||
for t in member.pool.transports.all().order_by('priority'):
|
||||
typeTrans = t.getType()
|
||||
if (
|
||||
typeTrans
|
||||
@ -159,13 +159,13 @@ def getServicesData(
|
||||
)
|
||||
elif meta.transport_grouping == MetaPool.LABEL_TRANSPORT_SELECT:
|
||||
ltrans: typing.MutableMapping[str, Transport] = {}
|
||||
for member in meta.members.all():
|
||||
for member in meta.members.all().order_by('priority'):
|
||||
tmpSet = set()
|
||||
# if first pool, get all its transports and check that are valid
|
||||
for t in transportIterator(member):
|
||||
if not t.label:
|
||||
continue
|
||||
if t.label not in ltrans:
|
||||
if t.label not in ltrans or ltrans[t.label].priority > t.priority:
|
||||
ltrans[t.label] = t
|
||||
if inAll is None:
|
||||
tmpSet.add(t.label)
|
||||
|
Loading…
Reference in New Issue
Block a user