Ticket #979 (new defect)
Changing from ManyToMany to a CharField seeks to drop non existant tablename
| Reported by: | Zenobius Jiricek <zenobius.jiricek@…> | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | The Future |
| Component: | migrations | Version: | 0.7.3 |
| Keywords: | Cc: |
Description
South 0.7.3
Django 1.3.1
I had a model with a ManyToMany? field that pointed at cms.Placholder.
Then I decided to change it to a CharField? that is based on a generator class providing options built from a qury of cms.Placeholder.objects.all().values('slot').distinct().
So I commented out the ManyToMany? field, inserted the new CharField? with its choices generator, and generated a migration. No errors so far.
However when I attempt to perform the migration, it complains about a non existant tablename :
django.db.utils.DatabaseError: no such table: cmsplugin_embedpagesplugin_placeholders
Looking at the migration I can see that it has mis-calculated the table name to drop.
Notice that in migration 2, I simply had to either, manually change the table name or ignore the exception.
I've attached the models.py, and both the migrations.
Attachments
Change History
Changed 17 months ago by Zenobius Jiricek <zenobius.jiricek@…>
- Attachment 0001_initial.py added
initial migration
Changed 17 months ago by Zenobius Jiricek <zenobius.jiricek@…>
- Attachment 0002_auto__add_field_embedpagesplugin_placeholders.py added
comment:1 Changed 17 months ago by andrew
Why didn't you have a cmsplugin_embedpagesplugin_placeholders table? It seems like you should have had one to support the previous ManyToMany?.

application model