dependencies = [
('ft', '0010_auto_20191027_2255'),
]
operations = [
migrations.AlterField(
model_name='polozkydokl',
name='jedn_cena',
field=djmoney.models.fields.MoneyField(decimal_places=4,
default=Decimal('0'), default_currency='EUR', max_digits=12,
verbose_name='Jednotková cena'),
),
]
```
Migration has been already applied but in db there is still old
decimal_places=3 schema
`| jedn_cena | decimal(12,3) | NO | | NULL |
|
`
```
python3 manage.py sqlmigrate ft 0011_auto_20200103_1523
BEGIN;
--
-- Alter field jedn_cena on polozkydokl
--
COMMIT;
```
--
Ticket URL: <https://code.djangoproject.com/ticket/31257>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => worksforme
Old description:
> I use mysql in django and have these migration file
> ```
> class Migration(migrations.Migration):
>
> dependencies = [
> ('ft', '0010_auto_20191027_2255'),
> ]
>
> operations = [
> migrations.AlterField(
> model_name='polozkydokl',
> name='jedn_cena',
> field=djmoney.models.fields.MoneyField(decimal_places=4,
> default=Decimal('0'), default_currency='EUR', max_digits=12,
> verbose_name='Jednotková cena'),
> ),
> ]
>
> ```
> Migration has been already applied but in db there is still old
> decimal_places=3 schema
> `| jedn_cena | decimal(12,3) | NO | | NULL |
> |
> `
>
> ```
> python3 manage.py sqlmigrate ft 0011_auto_20200103_1523
> BEGIN;
> --
> -- Alter field jedn_cena on polozkydokl
> --
> COMMIT;
>
> ```
New description:
I use mysql in django and have these migration file
{{{
class Migration(migrations.Migration):
dependencies = [
('ft', '0010_auto_20191027_2255'),
]
operations = [
migrations.AlterField(
model_name='polozkydokl',
name='jedn_cena',
field=djmoney.models.fields.MoneyField(decimal_places=4,
default=Decimal('0'), default_currency='EUR', max_digits=12,
verbose_name='Jednotková cena'),
),
]
}}}
Migration has been already applied but in db there is still old
`decimal_places=3` schema
{{{
| jedn_cena | decimal(12,3) | NO | | NULL |
|
}}}
python3 manage.py sqlmigrate ft 0011_auto_20200103_1523
{{{
BEGIN;
--
-- Alter field jedn_cena on polozkydokl
--
COMMIT;
}}}
--
Comment:
I cannot reproduce this issues with `DecimalField` or
`djmoney.models.fields.MoneyField`.
--
Ticket URL: <https://code.djangoproject.com/ticket/31257#comment:1>