[Django] #30896: MySQLdb._exceptions.OperationalError: (1054, "Unknown column ...) error when `migrate --database=newfreshdb`

11 views
Skip to first unread message

Django

unread,
Oct 21, 2019, 9:49:10 AM10/21/19
to django-...@googlegroups.com
#30896: MySQLdb._exceptions.OperationalError: (1054, "Unknown column ...) error
when `migrate --database=newfreshdb`
--------------------------------------+------------------------
Reporter: coolnodje | 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 keep hitting this problem while trying to replay an entire database
migrations on a new fresh DB (from MySQL to PostgreSQL to be precise).

MySQL complains of a non existing column that was removed in a later stage
of migrations.
This column doesn't exist in MySQL anymore as it is up to date with the
newest migration. So it's only natural that the column cannot be found.

The question is: why is `migrate` looking for this column at this stage?
It can only be found in the target new DB.

I'm not including any code at this stage but I guess I can probably find a
way to share the whole migrations if this doesn't sound like an already
addressed problem.

--
Ticket URL: <https://code.djangoproject.com/ticket/30896>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 22, 2019, 1:56:43 AM10/22/19
to django-...@googlegroups.com
#30896: "OperationalError: (1054, "Unknown column ...)" error when running
migrations on an empty MySQL database.
----------------------------+--------------------------------------
Reporter: coolnodje | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by felixxm):

* status: new => closed
* version: 2.2 => master
* resolution: => needsinfo


Comment:

Thanks for this report, however we will not be able to reproduce this
issue (or check if it is a duplicate of an existing one) without a small
sample project or more detailed report.

--
Ticket URL: <https://code.djangoproject.com/ticket/30896#comment:1>

Reply all
Reply to author
Forward
0 new messages