-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
WIP: create sqlx.toml
format
#3383
Draft
abonander
wants to merge
13
commits into
main
Choose a base branch
from
sqlx-toml
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
abonander
force-pushed
the
sqlx-toml
branch
2 times, most recently
from
July 28, 2024 01:51
2b7fdba
to
46dd260
Compare
abonander
force-pushed
the
sqlx-toml
branch
7 times, most recently
from
August 2, 2024 03:41
fd557ad
to
6c886f8
Compare
This was referenced Aug 2, 2024
Merged
This was referenced Aug 31, 2024
abonander
force-pushed
the
sqlx-toml
branch
3 times, most recently
from
September 9, 2024 07:24
af39902
to
b67a83b
Compare
abonander
force-pushed
the
sqlx-toml
branch
2 times, most recently
from
September 18, 2024 08:58
496f631
to
6cc3ac0
Compare
abonander
force-pushed
the
sqlx-toml
branch
from
September 18, 2024 22:47
6cc3ac0
to
3e812b6
Compare
This was referenced Sep 20, 2024
simplifies usage while still making parsing optional for less generated code
This comment was marked as spam.
This comment was marked as spam.
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
maxcountryman
added a commit
to maxcountryman/underway
that referenced
this pull request
Oct 31, 2024
This is something of a hack to work around the fact that SQLx migrations do not currently support specifying a schema under which the migrations table will live. Here we provide a search path throughout our migrations and in the transaction that will run the migrations to ensure that migrations are applied to `underway._sqlx_migrations`. Note that this assumes a `public._sqlx_migrations` exists. In the future we should be able to use `sqlx.toml` to address this more robustly. That's expected as part of the `0.9.0` release of SQLx. Please see: launchbadge/sqlx#3383 Closes #11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference
sqlx.toml
: https://github.com/launchbadge/sqlx/blob/sqlx-toml/sqlx-core/src/config/reference.tomlOnce this is implemented, I'm planning on starting an alpha release cycle for 0.9.0 so that we can test this. It's not expected to be a breaking change but it's a large enough feature that it should probably go in a new major release, and there's a few other breaking API changes waiting in the wings.
The keys listed here are just the ones I've identified as needed for an MVP. Other keys may be added later backwards-compatibly.
Bikeshedding checklist:
snake_case
orkebab-case
for keys?macros.column_overrides
should maybe be calledmacros.table_overrides
instead?Implementation checklist
[common]
database-url-var
sqlx-cli
[macros]
preferred-crates
date-time
numeric
table-overrides
type-overrides
[migrate]
table-name
migrate!()
sqlx-cli
migrations-dir
migrate!()
#[sqlx::test]
?sqlx-cli
ignored-chars
migrate!()
sqlx-cli
defaults
migration-type
migration-versioning
closes #121
closes #916
closes #3412