Firebird - Schema migrations: add or alter field

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Firebird - Schema migrations: add or alter field

Hi folks,

I'm here again trying to up to date the django-firebird backend.
The last stable version was for django 1.8 LTS, that came to end of life, so I want to update to 1.11 LTS first  and then to 2.0.

Having said that, one of unresolved things is about  adding a non-nullable field to a populated table, in this case Firebird seems to work differently than others sql engines. 
If I have to update data over a recently added field (actually django does this adding a default value and removing this afterward), I need commit the alter table command first then, populate the new field with the provide default value. [1]
Firebird doesn't allow updates/inserts to use objects created in the same transaction (in this case the column) because DDL is actually only really executed/completed at transaction commit.

Then, What do you think is the best approach to achieve this?
Is necessary to rewrite the context maneger interface of BaseDatabaseSchemaEditor?
Maybe a new hook to run command after the metadata update finish?


[1] Here there's a discussion about this

You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at
To view this discussion on the web visit
For more options, visit