Commit 8cb5dae4 authored by BERJON Matthieu's avatar BERJON Matthieu

Update of SQL schema for docker_os table

I updated the docker_os table migration file in Django in order to force
the order of some fields to match the order of the database in rails. I
need to do that for all the tables.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent d2ed5f8e
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-03-16 13:20
# Generated by Django 1.11 on 2018-03-20 15:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
......@@ -14,156 +15,87 @@ class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
name='ArInternalMetadata',
fields=[
('key', models.CharField(max_length=255, primary_key=True, serialize=False)),
('value', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField()),
('updated_at', models.DateTimeField()),
],
options={
'db_table': 'ar_internal_metadata',
},
),
migrations.CreateModel(
name='Datasets',
name='DockerOs',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('size', models.IntegerField(blank=True, null=True)),
('extension', models.CharField(blank=True, max_length=255, null=True)),
('user_id', models.IntegerField(blank=True, null=True)),
('created_at', models.DateTimeField()),
('updated_at', models.DateTimeField()),
('file_name', models.CharField(blank=True, max_length=255, null=True)),
('name', models.CharField(blank=True, max_length=255)),
('version', models.CharField(blank=True, max_length=255)),
('docker_name', models.CharField(blank=True, max_length=255)),
],
options={
'db_table': 'datasets',
'db_table': 'docker_os',
},
),
migrations.CreateModel(
name='DockerOs',
name='Job',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True)),
('version', models.CharField(blank=True, max_length=255, null=True)),
('docker_name', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('param', models.CharField(blank=True, max_length=255)),
('datasize', models.IntegerField(blank=True, null=True)),
('version', models.CharField(blank=True, max_length=255)),
('exec_time', models.IntegerField(blank=True, null=True)),
('size_generated_data', models.IntegerField(blank=True, null=True)),
('ipaddress', models.CharField(blank=True, max_length=255)),
('access_token', models.CharField(blank=True, max_length=255)),
('state', models.IntegerField()),
('container_id', models.IntegerField(blank=True, null=True)),
('result', models.IntegerField()),
],
options={
'db_table': 'docker_os',
'db_table': 'jobs',
},
),
migrations.CreateModel(
name='JobQueues',
name='JobQueue',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('name', models.CharField(max_length=255)),
('timeout', models.IntegerField(blank=True, null=True)),
('is_default', models.IntegerField()),
('created_at', models.DateTimeField()),
('updated_at', models.DateTimeField()),
],
options={
'db_table': 'job_queues',
},
),
migrations.CreateModel(
name='Jobs',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('webapp_id', models.IntegerField(blank=True, null=True)),
('user_id', models.IntegerField(blank=True, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
('updated_at', models.DateTimeField(blank=True, null=True)),
('param', models.CharField(blank=True, max_length=255, null=True)),
('datasize', models.IntegerField(blank=True, null=True)),
('version', models.CharField(blank=True, max_length=255, null=True)),
('exec_time', models.IntegerField(blank=True, null=True)),
('size_generated_data', models.IntegerField(blank=True, null=True)),
('ipaddress', models.CharField(blank=True, max_length=255, null=True)),
('access_token', models.CharField(blank=True, max_length=255, null=True)),
('state', models.IntegerField()),
('container_id', models.CharField(blank=True, max_length=64, null=True)),
('queue_id', models.IntegerField()),
('result', models.IntegerField()),
],
options={
'db_table': 'jobs',
},
),
migrations.CreateModel(
name='JobUploads',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('job_file_file_name', models.CharField(blank=True, max_length=255, null=True)),
('job_file_content_type', models.CharField(blank=True, max_length=255, null=True)),
('job_file_file_name', models.CharField(blank=True, max_length=255)),
('job_file_content_type', models.CharField(blank=True, max_length=255)),
('job_file_file_size', models.IntegerField(blank=True, null=True)),
('job_file_updated_at', models.DateTimeField(blank=True, null=True)),
('type', models.CharField(blank=True, max_length=255, null=True)),
('job_id', models.IntegerField(blank=True, null=True)),
('job_file_updated_at', models.DateTimeField(auto_now_add=True, null=True)),
('job', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='poc.Job')),
],
options={
'db_table': 'job_uploads',
},
),
migrations.CreateModel(
name='Quotas',
name='Quota',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_id', models.IntegerField()),
('webapp_id', models.IntegerField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('quantity', models.BigIntegerField(blank=True, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
('updated_at', models.DateTimeField(blank=True, null=True)),
],
options={
'db_table': 'quotas',
},
),
migrations.CreateModel(
name='SchemaMigrations',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('version', models.CharField(max_length=255, unique=True)),
],
options={
'db_table': 'schema_migrations',
},
),
migrations.CreateModel(
name='Taggings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('tag_id', models.IntegerField(blank=True, null=True)),
('taggable_id', models.IntegerField(blank=True, null=True)),
('taggable_type', models.CharField(blank=True, max_length=255, null=True)),
('tagger_id', models.IntegerField(blank=True, null=True)),
('tagger_type', models.CharField(blank=True, max_length=255, null=True)),
('context', models.CharField(blank=True, max_length=128, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
],
options={
'db_table': 'taggings',
},
),
migrations.CreateModel(
name='Tags',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('taggings_count', models.IntegerField(blank=True, null=True)),
],
options={
'db_table': 'tags',
},
),
migrations.CreateModel(
name='Users',
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=255, unique=True)),
('encrypted_password', models.CharField(max_length=255)),
('reset_password_token', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('reset_password_token', models.CharField(max_length=255, null=True, unique=True)),
('reset_password_sent_at', models.DateTimeField(blank=True, null=True)),
('remember_created_at', models.DateTimeField(blank=True, null=True)),
('sign_in_count', models.IntegerField()),
......@@ -171,9 +103,7 @@ class Migration(migrations.Migration):
('last_sign_in_at', models.DateTimeField(blank=True, null=True)),
('current_sign_in_ip', models.CharField(blank=True, max_length=255, null=True)),
('last_sign_in_ip', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
('updated_at', models.DateTimeField(blank=True, null=True)),
('admin', models.IntegerField(blank=True, null=True)),
('admin', models.IntegerField(default=False)),
('confirmation_token', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('confirmed_at', models.DateTimeField(blank=True, null=True)),
('confirmation_sent_at', models.DateTimeField(blank=True, null=True)),
......@@ -185,81 +115,89 @@ class Migration(migrations.Migration):
},
),
migrations.CreateModel(
name='WebappDemos',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True)),
('extension', models.CharField(blank=True, max_length=255, null=True)),
('webapp_id', models.IntegerField(blank=True, null=True)),
('file_type', models.CharField(blank=True, max_length=255, null=True)),
],
options={
'db_table': 'webapp_demos',
},
),
migrations.CreateModel(
name='WebappParameters',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value', models.CharField(blank=True, max_length=255, null=True)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('detail', models.CharField(blank=True, max_length=255, null=True)),
('webapp_id', models.IntegerField(blank=True, null=True)),
],
options={
'db_table': 'webapp_parameters',
},
),
migrations.CreateModel(
name='Webapps',
name='Webapp',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('name', models.CharField(blank=True, max_length=255, unique=True)),
('description', models.TextField(blank=True, null=True)),
('contact', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
('updated_at', models.DateTimeField(blank=True, null=True)),
('logo_file_name', models.CharField(blank=True, max_length=255, null=True)),
('logo_content_type', models.CharField(blank=True, max_length=255, null=True)),
('logo_file_size', models.IntegerField(blank=True, null=True)),
('logo_updated_at', models.DateTimeField(blank=True, null=True)),
('user_id', models.IntegerField(blank=True, null=True)),
('user_other', models.IntegerField(blank=True, null=True)),
('default_quota', models.IntegerField(blank=True, null=True)),
('docker_os_id', models.IntegerField(blank=True, null=True)),
('docker_name', models.CharField(blank=True, max_length=255, null=True)),
('docker_name', models.CharField(blank=True, max_length=255)),
('readme', models.IntegerField(blank=True, null=True)),
('entrypoint', models.CharField(blank=True, max_length=255, null=True)),
('entrypoint', models.CharField(blank=True, max_length=255)),
('exec_time', models.IntegerField(blank=True, null=True)),
('private', models.IntegerField(blank=True, null=True)),
('access_token', models.CharField(blank=True, max_length=255, null=True)),
('sandbox_state', models.IntegerField()),
('sandbox_state', models.IntegerField(null=True)),
('sandbox_version_id', models.IntegerField(blank=True, null=True)),
('default_job_queue_id', models.IntegerField()),
('default_job_queue_id', models.IntegerField(null=True)),
('memory_limit', models.BigIntegerField(blank=True, null=True)),
('docker_os', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.DockerOs')),
],
options={
'db_table': 'webapps',
},
),
migrations.CreateModel(
name='WebappVersions',
name='WebappParameter',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('number', models.CharField(blank=True, max_length=255, null=True)),
('changelog', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
('updated_at', models.DateTimeField(blank=True, null=True)),
('webapp_id', models.IntegerField(blank=True, null=True)),
('value', models.CharField(blank=True, max_length=255, null=True)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('detail', models.CharField(blank=True, max_length=255, null=True)),
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp')),
],
options={
'db_table': 'webapp_parameters',
},
),
migrations.CreateModel(
name='WebappVersion',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('number', models.CharField(blank=True, max_length=255)),
('changelog', models.CharField(blank=True, max_length=255)),
('docker_image_size', models.FloatField(blank=True, null=True)),
('state', models.IntegerField()),
('state', models.IntegerField(null=True)),
('published', models.IntegerField()),
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp')),
],
options={
'db_table': 'webapp_versions',
},
),
migrations.AlterUniqueTogether(
name='taggings',
unique_together=set([('tag_id', 'taggable_id', 'taggable_type', 'context', 'tagger_id', 'tagger_type')]),
migrations.AddField(
model_name='user',
name='webapp',
field=models.ManyToManyField(through='poc.Quota', to='poc.Webapp'),
),
migrations.AddField(
model_name='quota',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.User'),
),
migrations.AddField(
model_name='quota',
name='webapp',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp'),
),
migrations.AddField(
model_name='job',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='poc.User'),
),
migrations.AddField(
model_name='job',
name='webapp',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp'),
),
]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment