DROP TABLE SAFE

Model

Database

Database

Model

Model

Database

Database

Model

Solution 1

Model

Database

Solution 2

Model

Database

Solution 2

Database

Model

Hey, c'mon

Model

Database

Solution 3

Database

Model

Database unmanaged

Model

Solution 3

class Migration(migrations.Migration):

    dependencies = [
        ('...', '...'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='...',
            options={'managed': False},
        ),
        migrations.DeleteModel(
            name='...',
        ),
    ]

Solution 3

class Migration(migrations.Migration):

    dependencies = [
        ('...', '...'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='...',
            options={'managed': settings.IS_TESTING},
        ),
        migrations.DeleteModel(
            name='...',
        ),
    ]

Solution 1

Solution 2

Solution 3

Mess in database

>0 downtime

Just works.

Solution 4?

Jakub
Wasielak

deck

By Kuba Wasielak

deck

  • 27