[Django] #35040: Migrations Not Affecting The DB With Existing DATA

8 views
Skip to first unread message

Django

unread,
Dec 15, 2023, 12:38:18 AM12/15/23
to django-...@googlegroups.com
#35040: Migrations Not Affecting The DB With Existing DATA
--------------------------------------+------------------------
Reporter: msinankk | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.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 |
--------------------------------------+------------------------
**The Case**\\

* I have a Django project without running any migration (cz migrations
folder on my git ignore)
* I Replaced the DB(sqlite) with my DB with the data
* Note: In the project I have a model or a field that are new and not
affected the db yet, So here there are no initial migrations file.
* I Run Makemigrations command
* The initial migrations files are generated
* When check the initial migrations file there showing the an effected
model is also created in the operation list.
* I run migrate
* When I try to access the model geting error called no such table/ column

**Currently How We Fix**\\
* Currently we fix this issue by manually comment/remove the un-applied
operation item from the list and re-run the Makemigration and migrate then
it should be fixed

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

Django

unread,
Dec 15, 2023, 2:02:53 AM12/15/23
to django-...@googlegroups.com
#35040: Migrations Not Affecting The DB With Existing DATA
----------------------------+--------------------------------------
Reporter: msinankk | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 4.2
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 Mariusz Felisiak):

* status: new => closed
* resolution: => needsinfo


Comment:

Hi, I don't think you've explained the issue in enough detail to confirm a
bug in Django. TBH, I don't understand what exactly you are trying to
report, but I'm pretty sure that you should first check
TicketClosingReasons/UseSupportChannels for ways to get help and use
support channels. You can reopen the ticket if you will debug your issue
and provide details about why and where Django is at fault.

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

Reply all
Reply to author
Forward
0 new messages