bitbake: toaster: orm migrations Sort out migrations mess
We messed up the migrations by squashing some of the image customisation model definitions into the initial migration which has meant some irreversible operations on mysql took place. This deletes, re-orders and fixes the migrations. If your schema is up to date you may want to use ./manage migrate with --fake or --fake-initial to avoid re-applying migrations. [YOCTO #9116] (Bitbake rev: 19bd63fc3a28dcbd0f531a5b06a037da34568bac) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
78b6109440
commit
8469e58025
|
@ -57,13 +57,6 @@ class Migration(migrations.Migration):
|
|||
('build', models.ForeignKey(to='orm.Build')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CustomImageRecipe',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='HelpText',
|
||||
fields=[
|
||||
|
@ -435,21 +428,6 @@ class Migration(migrations.Migration):
|
|||
name='layer_source',
|
||||
field=models.ForeignKey(default=None, to='orm.LayerSource', null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='customimagerecipe',
|
||||
name='base_recipe',
|
||||
field=models.ForeignKey(to='orm.Recipe'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='customimagerecipe',
|
||||
name='packages',
|
||||
field=models.ManyToManyField(to='orm.Package'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='customimagerecipe',
|
||||
name='project',
|
||||
field=models.ForeignKey(to='orm.Project'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='build',
|
||||
name='project',
|
||||
|
@ -519,10 +497,6 @@ class Migration(migrations.Migration):
|
|||
name='layer',
|
||||
unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='customimagerecipe',
|
||||
unique_together=set([('name', 'project')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='branch',
|
||||
unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]),
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='customimagerecipe',
|
||||
name='recipe_ptr',
|
||||
field=models.OneToOneField(parent_link=True, auto_created=True, default=None, serialize=False, to='orm.Recipe'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='customimagerecipe',
|
||||
name='base_recipe',
|
||||
field=models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='customimagerecipe',
|
||||
unique_together=set([]),
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='customimagerecipe',
|
||||
name='id',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='customimagerecipe',
|
||||
name='name',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='customimagerecipe',
|
||||
name='packages',
|
||||
),
|
||||
]
|
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CustomImageRecipe',
|
||||
fields=[
|
||||
('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe')),
|
||||
('last_updated', models.DateTimeField(default=None, null=True)),
|
||||
('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe')),
|
||||
('project', models.ForeignKey(to='orm.Project')),
|
||||
],
|
||||
bases=('orm.recipe',),
|
||||
),
|
||||
]
|
|
@ -7,7 +7,7 @@ from django.db import migrations, models
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0002_auto_20151210_1209'),
|
||||
('orm', '0002_customimagerecipe'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0002_auto_20151223_1528'),
|
||||
('orm', '0003_customimagepackage'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
]
|
|
@ -7,7 +7,7 @@ from django.db import migrations, models
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0001_initial'),
|
||||
('orm', '0003_customimagepackage'),
|
||||
]
|
||||
|
||||
operations = [
|
|
@ -1,19 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0004_merge'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='customimagerecipe',
|
||||
name='recipe_ptr',
|
||||
field=models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe'),
|
||||
),
|
||||
]
|
|
@ -1,19 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('orm', '0005_auto_20160118_1055'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='customimagerecipe',
|
||||
name='last_updated',
|
||||
field=models.DateTimeField(default=None, null=True),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue