Closed jedie closed 5 years ago
What does ./manage.py makemigrations oscar_docdata --dry-run -v3
show you?
Migrations for 'oscar_docdata':
src/django-oscar-docdata/oscar_docdata/migrations/0002_auto_20190114_1336.py
- Alter field language on docdataorder
- Alter field merchant_order_id on docdataorder
- Alter field order_key on docdataorder
- Alter field status on docdataorder
- Alter field confidence_level on docdatapayment
- Alter field docdata_order on docdatapayment
- Alter field payment_id on docdatapayment
- Alter field payment_method on docdatapayment
- Alter field status on docdatapayment
Full migrations file '0002_auto_20190114_1336.py':
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-01-14 13:36
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('oscar_docdata', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='docdataorder',
name='language',
field=models.CharField(blank=True, default='en', max_length=5, verbose_name='Language'),
),
migrations.AlterField(
model_name='docdataorder',
name='merchant_order_id',
field=models.CharField(default='', max_length=100, verbose_name='Order ID'),
),
migrations.AlterField(
model_name='docdataorder',
name='order_key',
field=models.CharField(default='', max_length=200, unique=True, verbose_name='Payment cluster ID'),
),
migrations.AlterField(
model_name='docdataorder',
name='status',
field=models.CharField(choices=[('new', 'New'), ('in_progress', 'In Progress'), ('pending', 'Pending'), ('paid', 'Paid'), ('paid_refunded', 'Paid, part refunded'), ('cancelled', 'Cancelled'), ('charged_back', 'Charged back'), ('refunded', 'Refunded'), ('expired', 'Expired'), ('unknown', 'Unknown')], default='new', max_length=50, verbose_name='Status'),
),
migrations.AlterField(
model_name='docdatapayment',
name='confidence_level',
field=models.CharField(default='', editable=False, max_length=30, verbose_name='Confidence level'),
),
migrations.AlterField(
model_name='docdatapayment',
name='docdata_order',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='payments', to='oscar_docdata.DocdataOrder'),
),
migrations.AlterField(
model_name='docdatapayment',
name='payment_id',
field=models.CharField(blank=True, default='', max_length=100, primary_key=True, serialize=False, verbose_name='Payment id'),
),
migrations.AlterField(
model_name='docdatapayment',
name='payment_method',
field=models.CharField(blank=True, default='', max_length=60),
),
migrations.AlterField(
model_name='docdatapayment',
name='status',
field=models.CharField(default='NEW', max_length=30, verbose_name='status'),
),
]
With https://github.com/wearehoods/django-oscar-docdata/commit/9f4787eb64bf996aa15b7ae036e2023596387b96 i add the missing migrations.
With https://github.com/wearehoods/django-oscar-docdata/commit/af6131549d2c6214e8f03a7dc376027e1057c18f i deleted delete south migration files
I think it detects that the models are altered because of the bytestrings -> strings changes from python 2 to python 3 in the default values.
I altered the migration in this branch: https://github.com/django-oscar/django-oscar-docdata/tree/fix-migration-without-bytecode-strings
Could you try to use that one and see if it still wants to add new migrations?
I already tried myself and the string changes won't cause a (useless) detection of a migration anymore. I also changed a wrongly specified on_delete
attribute,
See #23
(I merged it and did not add a new migration as this is still a unreleased version)
I had a small chat with the original maintainer (vdboor) and he adjusted the migrations in a unreleased tag (1.2.12). He deleted this tag so these fixes will be in a new 1.2.12 (and this will be released to pypi)
If you can check that there are no changes detected in your case you can close this issue if you like.
That's right, I just tested it: makemigrations
results in:
No changes detected
Seems that there are missing migrations, isn't it?