Skip to content
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

fix: incorrect DDL generated when using server_default (#209) #220

Merged
merged 18 commits into from
Aug 1, 2022

Conversation

trevor-pope
Copy link
Contributor

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.

and changed order of NOT NULL and DEFAULT statements.
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. label Jun 13, 2022
@google-cla
Copy link

google-cla bot commented Jun 13, 2022

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.

@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 24, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 24, 2022
@IlyaFaer IlyaFaer self-assigned this Jul 6, 2022
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@IlyaFaer
Copy link
Contributor

@asthamohta, okay, I've fixed everything here.

It appears now linter is checking long_description of the package. In the main python-spanner repository the README file is used as a long description.

Also it requires to use .rst format README file instead of GitHub default .md (otherwise list_setup_py will still fail). So, I've converted the README file as well.

Let's merge the PR, and I will add tests for it separately (not very convenient to work in client's fork).

@IlyaFaer IlyaFaer requested a review from asthamohta July 21, 2022 08:33
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 23, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 23, 2022
@IlyaFaer IlyaFaer requested a review from ansh0l July 26, 2022 06:13
@IlyaFaer IlyaFaer merged commit 7ab1742 into googleapis:main Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect DDL generated when using server_default
4 participants