I want to run some migrations. Everything seems to run correctly until I want to run my website. There is a column missing. I can fix it manually, but I want to understand the mistake I make when running the migration.
This is a part of my migraton file where the column is added:
migrations.CreateModel(
name='PostTranslation',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language', choices=settings.LANGUAGES)),
('title', models.CharField(max_length=255, verbose_name='Title')),
('slug', models.SlugField(verbose_name='slug', blank=True)),
('abstract', djangocms_text_ckeditor.fields.HTMLField(verbose_name='Abstract')),
('meta_description', models.TextField(default=b'', verbose_name='Post meta description', blank=True)),
('meta_keywords', models.TextField(default=b'', verbose_name='Post meta keywords', blank=True)),
('meta_title', models.CharField(default=b'', help_text='used in title tag and social sharing', max_length=255, verbose_name='Post meta title', blank=True)),
('post_text', djangocms_text_ckeditor.fields.HTMLField(default=b'', verbose_name='Text', blank=True)),
('master', models.ForeignKey(related_name='translations', editable=False, to='djangocms_blog.Post', null=True)),
],
options={
'db_table': 'djangocms_blog_post_translation',
'verbose_name': 'blog article Translation',
'default_permissions': (),
},
bases=(models.Model,),
These are the commands I'm running:
python manage.py migrate djangocms_blog 0001
In this first step there is a creation of the column meta_title
If I run my migration the shell outputs:
Operations to perform:
Target specific migration: 0001_initial, from djangocms_blog
Running migrations:
Unapplying djangocms_blog.0005_auto_20150115_1444... OK
Unapplying djangocms_blog.0004_auto_20150108_1435... OK
Unapplying djangocms_blog.0003_auto_20141201_2252... OK
Unapplying djangocms_blog.0002_post_sites... OK
At this point I would expect the meta_title column is created in the database... But nothing happened... I'm sure I'm in the right database and my settings are correct. Because If i create the meta_title column manually, the websites runs withouth errors.
Can somebody help me?