Modify ↓
Ticket #581 (closed defect: invalid)
Change from models.py to models module results in deletion of all models
| Reported by: | thomas.paul.matthews@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | major | Milestone: | 0.7.3 |
| Component: | migrations | Version: | 0.7.2 |
| Keywords: | models, module | Cc: |
Description
I started my app with all the models in models.py, but this grew unwieldy (the models are for storing data from a particular type of scientific experiment and dont really seem to warrant separate apps). I created a models directory within the app with init.py and several files for the models. The code for the models was unchanged, other than to add app_label under Meta and update the imports. I ran a schemamigration --auto for the app and it detected that I had deleted all of my models, even though I just moved them.
Thanks.
Attachments
Change History
comment:1 in reply to: ↑ description Changed 3 years ago by thomas.paul.matthews@…
Note: See
TracTickets for help on using
tickets.

Replying to thomas.paul.matthews@…:
The error was mine. Importing the models in init.py fixed the problem. The ticket can be marked invalid. Sorry.