-
Notifications
You must be signed in to change notification settings - Fork 33
fix: incorrect DDL generated when using server_default (#209) #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.