Closed activa-media closed 2 years ago
First, I'm sorry to hear that. You should always review migration sql first. And what's the models change before and after?
I was trying to change the class name and table name, like below
# before
class my_table(models.Model):
.....
class Meta:
table = 'my_table'
# after
class my_table_new(models.Model):
.....
class Meta:
table = 'my_table_new'
or is it better not to drop the old table? maybe pass some parameters to not generate drop script?
The point is the class name, if you change table name only but not class name, which may be work fine. If not, aerich don't know which is a new model or a old model.
@long2ice Thank your for your reply, and I will note on this.
I am so sad I got data lost after renamed the table name : ( I saw the migration script, it dropped my old table. Is it like that? or any way to prevent data lost?
aerich==0.6.2 python: 3.9.10