This repository was archived by the owner on Mar 13, 2026. It is now read-only.
fix: ALTER COLUMN NOT NULL directive fails because of inappropriate syntax#124
Merged
fix: ALTER COLUMN NOT NULL directive fails because of inappropriate syntax#124
Conversation
IlyaFaer
commented
Sep 27, 2021
| alter_table(compiler, element.table_name, element.schema), | ||
| alter_column(compiler, element.column_name), | ||
| "%s" % format_type(compiler, element.type_), | ||
| ) |
Author
There was a problem hiding this comment.
There are two syntax diverges:
Spanner supports NULL/NOT NULL statement without the DROP word in front of it for constraints dropping
Spanner doesn't use TYPE word for column type mentions
These two overrides covers both items.
IlyaFaer
commented
Sep 27, 2021
| 'account', | ||
| 'name', | ||
| existing_type=sa.String(50), | ||
| nullable=True, |
Author
There was a problem hiding this comment.
Adding the issue case into the migration test (the original error could be repeated this way before these changes)
IlyaFaer
commented
Sep 27, 2021
| "sqlalchemy>=1.1.13, <=1.3.23", | ||
| "google-cloud-spanner>=3.3.0", | ||
| "alembic", | ||
| ] |
Author
There was a problem hiding this comment.
As we're now describing some alembic overrides, it should be mentioned in dependencies
larkee
approved these changes
Oct 11, 2021
Contributor
larkee
left a comment
There was a problem hiding this comment.
LGTM once the CircleCI tests pass 👍
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Dec 9, 2021
🤖 I have created a release \*beep\* \*boop\* --- ## [1.0.0](https://github.com/googleapis/python-spanner-sqlalchemy/compare/v0.1.0...v1.0.0) (2021-12-08) ### Features * add code samples ([#55](https://github.com/googleapis/python-spanner-sqlalchemy/issues/55)) ([406c34b](https://github.com/googleapis/python-spanner-sqlalchemy/commit/406c34bdb21e01a1317c074fab34d87bb3d61020)) * set user-agent string to distinguish SQLAlchemy requests ([#116](https://github.com/googleapis/python-spanner-sqlalchemy/issues/116)) ([b5e1a21](https://github.com/googleapis/python-spanner-sqlalchemy/commit/b5e1a211a0475690feed36fd222a41c216d8fb82)) * support computed columns ([#139](https://github.com/googleapis/python-spanner-sqlalchemy/issues/139)) ([046ca97](https://github.com/googleapis/python-spanner-sqlalchemy/commit/046ca975778f4793e2c37d70d2a602546f9d4699)), closes [#137](https://github.com/googleapis/python-spanner-sqlalchemy/issues/137) * support JSON data type ([#135](https://github.com/googleapis/python-spanner-sqlalchemy/issues/135)) ([184a7d5](https://github.com/googleapis/python-spanner-sqlalchemy/commit/184a7d576a790bbbd049fe80d589af78831379b4)) * support read_only connections ([#125](https://github.com/googleapis/python-spanner-sqlalchemy/issues/125)) ([352c47d](https://github.com/googleapis/python-spanner-sqlalchemy/commit/352c47de7bb4ea1c30b50a7fe5aee0c4d102e80e)) * support stale reads ([#146](https://github.com/googleapis/python-spanner-sqlalchemy/issues/146)) ([d80cb27](https://github.com/googleapis/python-spanner-sqlalchemy/commit/d80cb2792437731c24905c7a6919468c37779c67)) ### Bug Fixes * ALTER COLUMN NOT NULL directive fails because of inappropriate syntax ([#124](https://github.com/googleapis/python-spanner-sqlalchemy/issues/124)) ([c433cda](https://github.com/googleapis/python-spanner-sqlalchemy/commit/c433cda99fd8544810c878328a272a3a9430630f)) * array columns reflection ([#119](https://github.com/googleapis/python-spanner-sqlalchemy/issues/119)) ([af3b97b](https://github.com/googleapis/python-spanner-sqlalchemy/commit/af3b97bfa4b3ed4b223384c9ed3fa0643204d8c9)), closes [#118](https://github.com/googleapis/python-spanner-sqlalchemy/issues/118) * calculate limit value correctly for offset only queries ([#160](https://github.com/googleapis/python-spanner-sqlalchemy/issues/160)) ([6844336](https://github.com/googleapis/python-spanner-sqlalchemy/commit/684433682ed29d9cde8c9898796024cefeb38493)) * correct typo in spanner_interleave_on_delete_cascade keyword ([#99](https://github.com/googleapis/python-spanner-sqlalchemy/issues/99)) ([a0ebf75](https://github.com/googleapis/python-spanner-sqlalchemy/commit/a0ebf758eda351c0a20103f9e8c2243f002b2e6e)) * raise Unimplemented error when creating temporary tables ([#159](https://github.com/googleapis/python-spanner-sqlalchemy/issues/159)) ([646d6ac](https://github.com/googleapis/python-spanner-sqlalchemy/commit/646d6ac24ccd0643b67abff9da28118e0a6f6e55)) * rollback failed exception log ([#106](https://github.com/googleapis/python-spanner-sqlalchemy/issues/106)) ([809e6ab](https://github.com/googleapis/python-spanner-sqlalchemy/commit/809e6abb29f82a7fbe6587d606e8d75283f2a2fe)) ### Documentation * add query hints example ([#153](https://github.com/googleapis/python-spanner-sqlalchemy/issues/153)) ([9c23804](https://github.com/googleapis/python-spanner-sqlalchemy/commit/9c23804746bc8c638b6c22f2cb6ea57778f7fd19)) * reformatted README titles ([#141](https://github.com/googleapis/python-spanner-sqlalchemy/issues/141)) ([a3ccbac](https://github.com/googleapis/python-spanner-sqlalchemy/commit/a3ccbac476679fe8048ed2109e5489b873278c9c)) * update benchmarks ([#155](https://github.com/googleapis/python-spanner-sqlalchemy/issues/155)) ([3500653](https://github.com/googleapis/python-spanner-sqlalchemy/commit/35006536e4de31dbcba022b73f0aadf39bc89e39)) ### Miscellaneous Chores * setup release 1.0.0 ([#165](https://github.com/googleapis/python-spanner-sqlalchemy/issues/165)) ([37a415d](https://github.com/googleapis/python-spanner-sqlalchemy/commit/37a415d071d39e99f233a1c15c1c4b89bd436570)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #122