Title: ALTER TABLE MODIFY enum not respected · Issue #1503 · sqlc-dev/sqlc · GitHub
Open Graph Title: ALTER TABLE MODIFY enum not respected · Issue #1503 · sqlc-dev/sqlc
X Title: ALTER TABLE MODIFY enum not respected · Issue #1503 · sqlc-dev/sqlc
Description: Version 1.12.0 What happened? When I modify a enum field with ALTER command, the generated models not added a new enum value, and it change the data type of field in struct as string instead of the "type ...Status string". Relevant log o...
Open Graph Description: Version 1.12.0 What happened? When I modify a enum field with ALTER command, the generated models not added a new enum value, and it change the data type of field in struct as string instead of the...
X Description: Version 1.12.0 What happened? When I modify a enum field with ALTER command, the generated models not added a new enum value, and it change the data type of field in struct as string instead of the...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/1503
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ALTER TABLE MODIFY enum not respected","articleBody":"### Version\r\n\r\n1.12.0\r\n\r\n### What happened?\r\n\r\nWhen I modify a enum field with ALTER command, the generated models not added a new enum value, and it change the data type of field in struct as string instead of the \"type ...Status string\".\r\n\r\n### Relevant log output\r\n\r\n_No response_\r\n\r\n### Database schema\r\n\r\n```sql\r\nCREATE TABLE authors (\r\n id bigint primary key,\r\n status enum(\"ok\", \"init\") default \"init\" not null\r\n);\r\n\r\n-- remove this alter to see the change in models.go\r\nALTER TABLE authors MODIFY status enum('init', 'done', 'canceled', 'processing', 'waiting') default \"init\" not null;\r\n```\r\n\r\n### SQL queries\r\n\r\n```sql\r\n-- name: ListAuthors :many\r\nselect * from authors;\r\n```\r\n\r\n### Configuration\r\n\r\n_No response_\r\n\r\n### Playground URL\r\n\r\nhttps://play.sqlc.dev/p/67134f04f43f5f6161fb11737e860c99c5db8a82b63d9f0a22e0f5707c500d57\r\n\r\n### What operating system are you using?\r\n\r\nLinux\r\n\r\n### What database engines are you using?\r\n\r\nMySQL\r\n\r\n### What type of code are you generating?\r\n\r\nGo","author":{"url":"https://github.com/ken2057","@type":"Person","name":"ken2057"},"datePublished":"2022-03-22T03:59:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1503/sqlc/issues/1503"}
| 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:1e8142cd-4250-1b89-938c-053d5f69ba53 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C22:A3DEB:16C65:1F214:6A50ECD6 |
| html-safe-nonce | f4ba1def0852e0a8215ac8a19df5487fba7ef10946328f9ffce7eccb15a470ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzIyOkEzREVCOjE2QzY1OjFGMjE0OjZBNTBFQ0Q2IiwidmlzaXRvcl9pZCI6IjI4ODI0MDQwNjM2NzIwNjkzMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 908650a0104327e4ab7690c96556cd733033fca3a53ab75db64ce477b1ef16be |
| hovercard-subject-tag | issue:1176232568 |
| 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/sqlc-dev/sqlc/1503/issue_layout |
| twitter:image | https://opengraph.githubassets.com/05c28c0dca0134af48636ebfe3e130849c65c37ed9dcf49693be04c84b7af4c8/sqlc-dev/sqlc/issues/1503 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/05c28c0dca0134af48636ebfe3e130849c65c37ed9dcf49693be04c84b7af4c8/sqlc-dev/sqlc/issues/1503 |
| og:image:alt | Version 1.12.0 What happened? When I modify a enum field with ALTER command, the generated models not added a new enum value, and it change the data type of field in struct as string instead of the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ken2057 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| 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 | 5ec60191a48933536a90c8a19f47142fcd0d4739 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width