Simplified

This commit is contained in:
meanmail 2021-03-04 11:28:27 +07:00
parent e14de715f7
commit 6a5889280d
No known key found for this signature in database
GPG Key ID: A4526DCF39E67886

View File

@ -85,7 +85,7 @@ class AlterTable(ModelOperation):
logger.info(' Add column %s', name)
cmd = 'ADD COLUMN %s %s' % (name, field.get_sql(db=database))
if is_regular_field:
if prev_name is not None:
if prev_name:
cmd += ' AFTER %s' % prev_name
else:
cmd += ' FIRST'