Hey, I have the following model:
class User(HasDates):
class Meta:
managed = False
username = models.CharField(max_length=255, null=True, blank=True)
when I created the model, the following migration was created:
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(blank=True, max_length=255, null=True)),
],
options={
'managed': False,
},
),
]
now, while I understand why this migration wont affect the db, when I deleted the model from my project the following migration was created:
operations = [
migrations.DeleteModel(
name='User',
),
]
my question is: how the delete migration knows to not really delete the User model from the DB?
would appreciate your answers