Commit 01d148ff authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Reorder of the migration file



I reordered the Django migration file to match the model and easier to
follow for changes.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent bc080408
......@@ -27,64 +27,64 @@ class Migration(migrations.Migration):
},
),
migrations.CreateModel(
name='Job',
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, unique=True)),
('description', models.TextField(blank=True, null=True)),
('contact', 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)),
('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_other', models.IntegerField(blank=True, null=True)),
('default_quota', models.IntegerField(blank=True, null=True)),
('docker_os', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.DockerOs')),
('docker_name', models.CharField(blank=True, max_length=255)),
('readme', models.IntegerField(blank=True, null=True)),
('entrypoint', 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': 'jobs',
},
),
migrations.CreateModel(
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()),
('private', models.IntegerField(blank=True, null=True)),
('access_token', models.CharField(blank=True, max_length=255, null=True)),
('sandbox_state', models.IntegerField(null=True)),
('sandbox_version_id', models.IntegerField(blank=True, null=True)),
('default_job_queue_id', models.IntegerField(null=True)),
('memory_limit', models.BigIntegerField(blank=True, null=True)),
],
options={
'db_table': 'job_queues',
'db_table': 'webapps',
},
),
migrations.CreateModel(
name='JobUploads',
name='WebappParameter',
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)),
('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(auto_now_add=True, null=True)),
('job', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='poc.Job')),
('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': 'job_uploads',
'db_table': 'webapp_parameters',
},
),
migrations.CreateModel(
name='Quota',
name='WebappVersion',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('number', models.CharField(blank=True, max_length=255)),
('changelog', models.CharField(blank=True, max_length=255)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('quantity', models.BigIntegerField(blank=True, null=True)),
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp')),
('docker_image_size', models.FloatField(blank=True, null=True)),
('state', models.IntegerField(null=True)),
('published', models.IntegerField()),
],
options={
'db_table': 'quotas',
'db_table': 'webapp_versions',
},
),
migrations.CreateModel(
......@@ -109,72 +109,76 @@ class Migration(migrations.Migration):
('confirmation_sent_at', models.DateTimeField(blank=True, null=True)),
('sshkey', models.TextField(blank=True, null=True)),
('auth_token', models.CharField(blank=True, max_length=255, null=True)),
# ('webapp', models.ManyToManyField(through='poc.Quota', to='poc.Webapp')),
],
options={
'db_table': 'users',
},
),
migrations.CreateModel(
name='Webapp',
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, unique=True)),
('description', models.TextField(blank=True, null=True)),
('contact', 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)),
('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_other', models.IntegerField(blank=True, null=True)),
('default_quota', models.IntegerField(blank=True, null=True)),
('docker_os', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.DockerOs')),
('docker_name', models.CharField(blank=True, max_length=255)),
('readme', models.IntegerField(blank=True, null=True)),
('entrypoint', models.CharField(blank=True, max_length=255)),
('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)),
('private', models.IntegerField(blank=True, null=True)),
('access_token', models.CharField(blank=True, max_length=255, null=True)),
('sandbox_state', models.IntegerField(null=True)),
('sandbox_version_id', models.IntegerField(blank=True, null=True)),
('default_job_queue_id', models.IntegerField(null=True)),
('memory_limit', models.BigIntegerField(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': 'webapps',
'db_table': 'jobs',
},
),
migrations.CreateModel(
name='WebappParameter',
name='JobQueue',
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', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp')),
('name', models.CharField(max_length=255)),
('timeout', models.IntegerField(blank=True, null=True)),
('is_default', models.IntegerField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
],
options={
'db_table': 'webapp_parameters',
'db_table': 'job_queues',
},
),
migrations.CreateModel(
name='WebappVersion',
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)),
('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(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='Quota',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('number', models.CharField(blank=True, max_length=255)),
('changelog', models.CharField(blank=True, max_length=255)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp')),
('docker_image_size', models.FloatField(blank=True, null=True)),
('state', models.IntegerField(null=True)),
('published', models.IntegerField()),
('quantity', models.BigIntegerField(blank=True, null=True)),
],
options={
'db_table': 'webapp_versions',
'db_table': 'quotas',
},
),
migrations.AddField(
model_name='user',
name='webapp',
......@@ -193,11 +197,11 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='job',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='poc.User'),
field=models.ForeignKey(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'),
field=models.ForeignKey(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