Opened 12 months ago
Closed 12 months ago
#35040 closed Bug (needsinfo)
Migrations Not Affecting The DB With Existing DATA
Reported by: | Mohammed Sinan KK | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 4.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Note:
See TracTickets
for help on using tickets.
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.