Skip to content

Column Defaults

SQLAlchemy allows specifying 2 types of defaults: default and server_default. First means the default value is provided by the Python code, while the second means the DEFAULT clause is added to the respective column in SQL table.

Hence, a new directive could be introduced for such purposes. The main parameter of the directive would be an expression. And there should be a way to distinguish between default and server default.