#31257: django migration has not been correctly applied for decimal_places -
mysql
---------------------------------------+------------------------
Reporter: zbynekdrlik | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
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;
```
--
Ticket URL: <https://code.djangoproject.com/ticket/31257>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.3759b09acde720f50c2c072d0ad1d0f6%40djangoproject.com.