fix: incorrect DDL generated when using server_default (#209)#220
fix: incorrect DDL generated when using server_default (#209)#220IlyaFaer merged 18 commits intogoogleapis:mainfrom
Conversation
and changed order of NOT NULL and DEFAULT statements.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@asthamohta, okay, I've fixed everything here. It appears now linter is checking Also it requires to use Let's merge the PR, and I will add tests for it separately (not very convenient to work in client's fork). |
Added parenthesis to enclose DEFAULT values of CREATE TABLE statements, and changed the order of NOT NULL and DEFAULT statements to match the specifications of Spanner.
Fixes #209
Could also probably add some tests for server_default.
I also realized that the intended way is to use sqlalchemy.text() to render default values, so the other problem mentioned at the bottom of #209 is not true.