I have been using SQLAlchemy's Column(default=) when I really wanted Column(server_default=), so that the default would be in the schema and work in raw SQL. Is there a reason to use both when they are the same value, or should I switch over to using server_default= only?
If you have server_default then there's no reason that I'm aware of to be inserting the same value via default.
I haven't tested this but logically sending a default as well seems like it would preempt the server default from being used at all since the value would no longer be null from the database's perspective. Thus the database wouldn't need to step in to fill it, except in the case of using raw SQL when default doesn't apply anyway.
In a SQLAlchemy Column(), is it necessary to define both default= and server_default?