Title: [BUG] Tables with string columns defined manually not using `STRING(MAX)`, ie `STRING(1024)` will fail · Issue #165 · google/python-spanner-orm · GitHub
Open Graph Title: [BUG] Tables with string columns defined manually not using `STRING(MAX)`, ie `STRING(1024)` will fail · Issue #165 · google/python-spanner-orm
X Title: [BUG] Tables with string columns defined manually not using `STRING(MAX)`, ie `STRING(1024)` will fail · Issue #165 · google/python-spanner-orm
Description: If you create a table directly via sql command and then try to interact with that same db with spanner_orm then it will fail. CREATE TABLE manuallyCreatedTable( id INT64 NOT NULL, ProblematicColumn STRING(1024), ) PRIMARY KEY(id); And yo...
Open Graph Description: If you create a table directly via sql command and then try to interact with that same db with spanner_orm then it will fail. CREATE TABLE manuallyCreatedTable( id INT64 NOT NULL, ProblematicColumn...
X Description: If you create a table directly via sql command and then try to interact with that same db with spanner_orm then it will fail. CREATE TABLE manuallyCreatedTable( id INT64 NOT NULL, ProblematicColumn...
Opengraph URL: https://github.com/google/python-spanner-orm/issues/165
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Tables with string columns defined manually not using `STRING(MAX)`, ie `STRING(1024)` will fail","articleBody":"If you create a table directly via sql command and then try to interact with that same db with spanner_orm then it will fail.\r\n\r\n```\r\nCREATE TABLE manuallyCreatedTable(\r\n id INT64 NOT NULL,\r\n ProblematicColumn STRING(1024),\r\n) PRIMARY KEY(id);\r\n```\r\n\r\nAnd you create any table. You will get an error like:\r\n\r\n```\r\n /usr/local/bin/spanner-orm(8)\u003cmodule\u003e()\r\n-\u003e sys.exit(main())\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/scripts.py(78)main()\r\n-\u003e args.execute(args)\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/scripts.py(33)migrate()\r\n-\u003e executor.migrate(args.name)\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/migration_executor.py(63)migrate()\r\n-\u003e self._validate_migrations()\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/migration_executor.py(184)_validate_migrations()\r\n-\u003e if (self.migrated(migration_.migration_id) and\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/migration_executor.py(46)migrated()\r\n-\u003e return self._migration_status().get(migration_id, False)\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/migration_executor.py(150)_migration_status()\r\n-\u003e model_from_db = metadata.SpannerMetadata.model(\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/metadata.py(68)model()\r\n-\u003e return cls.models().get(table_name)\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/metadata.py(43)models()\r\n-\u003e tables = cls.tables()\r\n /usr/local/lib/python3.9/site-packages/spanner_orm/admin/metadata.py(80)tables()\r\n-\u003e column_row.field_type(), nullable=column_row.nullable())\r\n\u003e /usr/local/lib/python3.9/site-packages/spanner_orm/admin/column.py(45)field_type()\r\n-\u003e raise error.SpannerError('No corresponding Type for {}'.format(\r\n(Pdb) up\r\n\u003e /usr/local/lib/python3.9/site-packages/spanner_orm/admin/metadata.py(80)tables()\r\n-\u003e column_row.field_type(), nullable=column_row.nullable())\r\n(Pdb) column_row.field_type()\r\n*** spanner_orm.error.SpannerError: No corresponding Type for STRING(1024)`\r\n```\r\n\r\nWORKAROUND: You will need to either set `ProblematicColumn ` to `STRING(MAX)` or delete that table.\r\n\r\nLeaving this here for future intrepid souls.","author":{"url":"https://github.com/mox-bot","@type":"Person","name":"mox-bot"},"datePublished":"2021-10-01T20:30:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/165/python-spanner-orm/issues/165"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f591fe20-9f80-ec9d-106a-1e5d8cec4539 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C364:177280:16A708A:1DEF26F:697C1FB5 |
| html-safe-nonce | 45a48448a211d65f97735f57aaeb083fec9ac550fd96578af64e364be7d2edf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzY0OjE3NzI4MDoxNkE3MDhBOjFERUYyNkY6Njk3QzFGQjUiLCJ2aXNpdG9yX2lkIjoiNDYzMzEwMDU4MTEwNjA5ODEwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a7c61b71c2b315f1b6be620ceccafa18eb5df0d6b1ddea7e3788c795f472381e |
| hovercard-subject-tag | issue:1013737450 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/python-spanner-orm/165/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d0a0bf45d830997716de3a5dd1c8dc621d8a2fdec42f4d4527ca4e8d52feb15e/google/python-spanner-orm/issues/165 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d0a0bf45d830997716de3a5dd1c8dc621d8a2fdec42f4d4527ca4e8d52feb15e/google/python-spanner-orm/issues/165 |
| og:image:alt | If you create a table directly via sql command and then try to interact with that same db with spanner_orm then it will fail. CREATE TABLE manuallyCreatedTable( id INT64 NOT NULL, ProblematicColumn... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mox-bot |
| hostname | github.com |
| expected-hostname | github.com |
| None | da4f0ee56809799586f8ee546b27f94fe9b5893edfbf87732e82be45be013b52 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-spanner-orm git https://github.com/google/python-spanner-orm.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 155757264 |
| octolytics-dimension-repository_nwo | google/python-spanner-orm |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 155757264 |
| octolytics-dimension-repository_network_root_nwo | google/python-spanner-orm |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 787d8d274e314f52ce6d846c7581f9476d8dc736 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width