Commit 394af133 authored by BERJON Matthieu's avatar BERJON Matthieu

Update of the SQL schema for quotas table

I updated the Django migration file to force the order of the fields
generated in the rails database.

The migration generate an error on this particular migration for an
unknown reason although the migration finishes correctly.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent 01d148ff
......@@ -115,6 +115,20 @@ class Migration(migrations.Migration):
'db_table': 'users',
},
),
migrations.CreateModel(
name='Quota',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.User')),
('webapp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp')),
('quantity', models.BigIntegerField(blank=True, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now_add=True)),
],
options={
'db_table': 'quotas',
},
),
migrations.CreateModel(
name='Job',
fields=[
......@@ -164,18 +178,6 @@ class Migration(migrations.Migration):
'db_table': 'job_uploads',
},
),
migrations.CreateModel(
name='Quota',
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)),
('quantity', models.BigIntegerField(blank=True, null=True)),
],
options={
'db_table': 'quotas',
},
),
......@@ -184,6 +186,7 @@ class Migration(migrations.Migration):
name='webapp',
field=models.ManyToManyField(through='poc.Quota', to='poc.Webapp'),
),
"""
migrations.AddField(
model_name='quota',
name='user',
......@@ -194,6 +197,8 @@ class Migration(migrations.Migration):
name='webapp',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='poc.Webapp'),
),
"""
,
migrations.AddField(
model_name='job',
name='user',
......
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