'How to drop tables using Django 2.2 migrations?
Im trying to drop unused tables from the database with a single migration. The models and the references was already removed from the code, but I can't get the migration to work.
When I run the makemigration command I get something like this:
class Migration(migrations.Migration)
dependencies = [
('hiring', '0040_last_migration'),
]
operations = [
migrations.DeleteModel(
name='Position',
),
migrations.DeleteModel(
name='ReviewProcess',
),
migrations.DeleteModel(
name='ReviewProcessType',
),
]
But if i run this migration it makes nothing, also if i run the sqlmigrate command it shows only commented lines in the sql response:
BEGIN;
--
-- Delete model Position
--
--
-- Delete model ReviewProcess
--
--
-- Delete model ReviewProcessType
--
COMMIT;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
