Title: [Feature] Add Migration Support for MSSQL · Issue #29 · sqlpage/sqlx-oldapi · GitHub
Open Graph Title: [Feature] Add Migration Support for MSSQL · Issue #29 · sqlpage/sqlx-oldapi
X Title: [Feature] Add Migration Support for MSSQL · Issue #29 · sqlpage/sqlx-oldapi
Description: Is your feature request related to a problem? Please describe. Migrations are a valuable feature for managing database schemas, but the lack of MSSQL support in the main sqlx crate means users of sqlx_oldapi miss out on this functionalit...
Open Graph Description: Is your feature request related to a problem? Please describe. Migrations are a valuable feature for managing database schemas, but the lack of MSSQL support in the main sqlx crate means users of s...
X Description: Is your feature request related to a problem? Please describe. Migrations are a valuable feature for managing database schemas, but the lack of MSSQL support in the main sqlx crate means users of s...
Opengraph URL: https://github.com/sqlpage/sqlx-oldapi/issues/29
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Feature] Add Migration Support for MSSQL","articleBody":"**Is your feature request related to a problem? Please describe.**\n\nMigrations are a valuable feature for managing database schemas, but the lack of MSSQL support in the main sqlx crate means users of sqlx_oldapi miss out on this functionality. This creates challenges in achieving feature parity with other supported databases.\n\n**Describe the solution you'd like**\n\nI would like to confirm if implementing the `MigrateDatabase` and `Migrate` traits is sufficient to enable migration support for the MSSQL backend.\n\nA secondary component would be potentially enabling the macro support for `migrate!()` though I've not looked into if it uses the same underlying implementation as of yet.\n\nIf so, I'm happy to contribute an implementation, along with any necessary tests. \nI understand that testing for MSSQL can be troublesome at the best of time- and am aware it also partially contributed to its removal from upstream. That being said- I'm down to give it a crack + any creating tests if/as needed.\n\n\n**Describe alternatives you've considered**\n\nNone applicable, upstream sqlx dropped MSSQL support some time ago.\n\n**Additional context**\n\nThe goal is to enable code like the following:\n\n```Rust\n let (connection_timeout, idle_timeout, max_lifetime) = Self::pool_opts(config);\n\n let client = sqlx::mssql::MssqlPoolOptions::new()\n .idle_timeout(idle_timeout)\n .max_connections(config.db_pool_total_connections() as u32)\n .max_lifetime(max_lifetime)\n .acquire_timeout(connection_timeout)\n .connect(\u0026Self::format_connection_string(config)?)\n .await?;\n\n let migrator = sqlx::migrate::Migrator::new(std::path::Path::new(\"../../migrations\"))\n .await?;\n migrator.run(\u0026client).await?;\n```\n\nCurrently, this fails because the MSSQL implementation lacks the Migrate trait, which is required by run_direct (expecting C: Migrate).\n\nI'm eager to attempt this implementation, though I note that I have no prior experience with database backend implementations.","author":{"url":"https://github.com/MrDwarf7","@type":"Person","name":"MrDwarf7"},"datePublished":"2025-07-18T05:35:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/29/sqlx-oldapi/issues/29"}
| 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:d6e04844-a17d-8862-d952-bb37b2b24ecf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8980:45430:151A06D:1C12E3E:6A5F0417 |
| html-safe-nonce | c3d1eb924dc8bc5faf7ee89465b01d33c8aa9a852570cf5a41b8f21d0237047c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTgwOjQ1NDMwOjE1MUEwNkQ6MUMxMkUzRTo2QTVGMDQxNyIsInZpc2l0b3JfaWQiOiIzMTUxMjc4MzcwODQxMzYzNDc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7bba1190bb4a661838a86e95d1180514838bddf8499777ee75800e045176248a |
| hovercard-subject-tag | issue:3241934259 |
| 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/sqlpage/sqlx-oldapi/29/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b242ea650e4a2adff1f3ad38f569588a0693ea3be80a8757d57b5c539cc1fc60/sqlpage/sqlx-oldapi/issues/29 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b242ea650e4a2adff1f3ad38f569588a0693ea3be80a8757d57b5c539cc1fc60/sqlpage/sqlx-oldapi/issues/29 |
| og:image:alt | Is your feature request related to a problem? Please describe. Migrations are a valuable feature for managing database schemas, but the lack of MSSQL support in the main sqlx crate means users of s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MrDwarf7 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bf8fa4b42b6d150def6175efb9b0f1ec8e9628d7229ee2bdf6e850e7bdad923e |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlpage/sqlx-oldapi git https://github.com/sqlpage/sqlx-oldapi.git |
| octolytics-dimension-user_id | 184309384 |
| octolytics-dimension-user_login | sqlpage |
| octolytics-dimension-repository_id | 498447897 |
| octolytics-dimension-repository_nwo | sqlpage/sqlx-oldapi |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 230595891 |
| octolytics-dimension-repository_parent_nwo | transact-rs/sqlx |
| octolytics-dimension-repository_network_root_id | 230595891 |
| octolytics-dimension-repository_network_root_nwo | transact-rs/sqlx |
| 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 | 7debc3c6cd5de09c6e22b47a1b9982acb2aabb7b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width