summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-02-18 21:21:48 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-19 15:38:48 +0000
commit8469e5802590551dbf88a26539b9cfe5710c074d (patch)
treeefd0ce0188cd8593b4f1a25e40e69c73bbc64e4f /bitbake
parent78b610944049c611f30a947895a5db7edc171393 (diff)
downloadpoky-8469e5802590551dbf88a26539b9cfe5710c074d.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/migrations/0001_initial.py26
-rw-r--r--bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py41
-rw-r--r--bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py24
-rw-r--r--bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py2
-rw-r--r--bitbake/lib/toaster/orm/migrations/0004_merge.py15
-rw-r--r--bitbake/lib/toaster/orm/migrations/0004_provides.py (renamed from bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py)2
-rw-r--r--bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py19
-rw-r--r--bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py19
8 files changed, 26 insertions, 122 deletions
diff --git a/bitbake/lib/toaster/orm/migrations/0001_initial.py b/bitbake/lib/toaster/orm/migrations/0001_initial.py
index 27fd05716f..760462f6b4 100644
--- a/bitbake/lib/toaster/orm/migrations/0001_initial.py
+++ b/bitbake/lib/toaster/orm/migrations/0001_initial.py
@@ -58,13 +58,6 @@ class Migration(migrations.Migration):
58 ], 58 ],
59 ), 59 ),
60 migrations.CreateModel( 60 migrations.CreateModel(
61 name='CustomImageRecipe',
62 fields=[
63 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
64 ('name', models.CharField(max_length=100)),
65 ],
66 ),
67 migrations.CreateModel(
68 name='HelpText', 61 name='HelpText',
69 fields=[ 62 fields=[
70 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 63 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
@@ -436,21 +429,6 @@ class Migration(migrations.Migration):
436 field=models.ForeignKey(default=None, to='orm.LayerSource', null=True), 429 field=models.ForeignKey(default=None, to='orm.LayerSource', null=True),
437 ), 430 ),
438 migrations.AddField( 431 migrations.AddField(
439 model_name='customimagerecipe',
440 name='base_recipe',
441 field=models.ForeignKey(to='orm.Recipe'),
442 ),
443 migrations.AddField(
444 model_name='customimagerecipe',
445 name='packages',
446 field=models.ManyToManyField(to='orm.Package'),
447 ),
448 migrations.AddField(
449 model_name='customimagerecipe',
450 name='project',
451 field=models.ForeignKey(to='orm.Project'),
452 ),
453 migrations.AddField(
454 model_name='build', 432 model_name='build',
455 name='project', 433 name='project',
456 field=models.ForeignKey(to='orm.Project'), 434 field=models.ForeignKey(to='orm.Project'),
@@ -520,10 +498,6 @@ class Migration(migrations.Migration):
520 unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]), 498 unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]),
521 ), 499 ),
522 migrations.AlterUniqueTogether( 500 migrations.AlterUniqueTogether(
523 name='customimagerecipe',
524 unique_together=set([('name', 'project')]),
525 ),
526 migrations.AlterUniqueTogether(
527 name='branch', 501 name='branch',
528 unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]), 502 unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]),
529 ), 503 ),
diff --git a/bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py b/bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py
deleted file mode 100644
index d15ceaa2be..0000000000
--- a/bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py
+++ /dev/null
@@ -1,41 +0,0 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0001_initial'),
11 ]
12
13 operations = [
14 migrations.AddField(
15 model_name='customimagerecipe',
16 name='recipe_ptr',
17 field=models.OneToOneField(parent_link=True, auto_created=True, default=None, serialize=False, to='orm.Recipe'),
18 preserve_default=False,
19 ),
20 migrations.AlterField(
21 model_name='customimagerecipe',
22 name='base_recipe',
23 field=models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe'),
24 ),
25 migrations.AlterUniqueTogether(
26 name='customimagerecipe',
27 unique_together=set([]),
28 ),
29 migrations.RemoveField(
30 model_name='customimagerecipe',
31 name='id',
32 ),
33 migrations.RemoveField(
34 model_name='customimagerecipe',
35 name='name',
36 ),
37 migrations.RemoveField(
38 model_name='customimagerecipe',
39 name='packages',
40 ),
41 ]
diff --git a/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py b/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
new file mode 100644
index 0000000000..9cec82e8d4
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
@@ -0,0 +1,24 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0001_initial'),
11 ]
12
13 operations = [
14 migrations.CreateModel(
15 name='CustomImageRecipe',
16 fields=[
17 ('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe')),
18 ('last_updated', models.DateTimeField(default=None, null=True)),
19 ('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe')),
20 ('project', models.ForeignKey(to='orm.Project')),
21 ],
22 bases=('orm.recipe',),
23 ),
24 ]
diff --git a/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py b/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
index d2ea8205b3..b027f66137 100644
--- a/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
+++ b/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
@@ -7,7 +7,7 @@ from django.db import migrations, models
7class Migration(migrations.Migration): 7class Migration(migrations.Migration):
8 8
9 dependencies = [ 9 dependencies = [
10 ('orm', '0002_auto_20151210_1209'), 10 ('orm', '0002_customimagerecipe'),
11 ] 11 ]
12 12
13 operations = [ 13 operations = [
diff --git a/bitbake/lib/toaster/orm/migrations/0004_merge.py b/bitbake/lib/toaster/orm/migrations/0004_merge.py
deleted file mode 100644
index 5b9d122c4c..0000000000
--- a/bitbake/lib/toaster/orm/migrations/0004_merge.py
+++ /dev/null
@@ -1,15 +0,0 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0002_auto_20151223_1528'),
11 ('orm', '0003_customimagepackage'),
12 ]
13
14 operations = [
15 ]
diff --git a/bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py b/bitbake/lib/toaster/orm/migrations/0004_provides.py
index 194c897bdf..dfde2d1361 100644
--- a/bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py
+++ b/bitbake/lib/toaster/orm/migrations/0004_provides.py
@@ -7,7 +7,7 @@ from django.db import migrations, models
7class Migration(migrations.Migration): 7class Migration(migrations.Migration):
8 8
9 dependencies = [ 9 dependencies = [
10 ('orm', '0001_initial'), 10 ('orm', '0003_customimagepackage'),
11 ] 11 ]
12 12
13 operations = [ 13 operations = [
diff --git a/bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py b/bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py
deleted file mode 100644
index 1120596983..0000000000
--- a/bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py
+++ /dev/null
@@ -1,19 +0,0 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0004_merge'),
11 ]
12
13 operations = [
14 migrations.AlterField(
15 model_name='customimagerecipe',
16 name='recipe_ptr',
17 field=models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe'),
18 ),
19 ]
diff --git a/bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py b/bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py
deleted file mode 100644
index b7a301b541..0000000000
--- a/bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py
+++ /dev/null
@@ -1,19 +0,0 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0005_auto_20160118_1055'),
11 ]
12
13 operations = [
14 migrations.AddField(
15 model_name='customimagerecipe',
16 name='last_updated',
17 field=models.DateTimeField(default=None, null=True),
18 ),
19 ]