Skip to content

CLi: made cli-lib modules publicly available for other crates#3881

Merged
abonander merged 3 commits into
transact-rs:mainfrom
silvestrpredko:silvestr/made-modules-public
Aug 15, 2025
Merged

CLi: made cli-lib modules publicly available for other crates#3881
abonander merged 3 commits into
transact-rs:mainfrom
silvestrpredko:silvestr/made-modules-public

Conversation

@silvestrpredko
Copy link
Copy Markdown
Contributor

Made modules database, metadata, ... publicly available for users that want to include sqlx-cli into their own helper binary or other library. (It's easier to use migrate::run directly without building Opt).

PR doesn't contain any significant changes.

@abonander
Copy link
Copy Markdown
Collaborator

sqlx-cli is not meant to be used as a library. I don't want to have to think of downstream API users when making changes to it.

@silvestrpredko
Copy link
Copy Markdown
Contributor Author

sqlx-cli is not meant to be used as a library. I don't want to have to think of downstream API users when making changes to it.

There is nothing wrong with opening these modules; even if there will be breaking changes, it's not a problem for the project, I think.

For now, I want to have a custom behaviour for certain operations with migration revert, and I need to write all the logic for the rest of the CLI by myself, or build a whole Opt.

Copy link
Copy Markdown
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silvestrpredko silvestrpredko requested a review from abonander July 9, 2025 18:32
@abonander abonander merged commit ed002f8 into transact-rs:main Aug 15, 2025
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants