Skip to content

Create crates-admin migrate to sync categories and migrate the db #3556

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

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Apr 26, 2021

The new command will be used in production to run migrations instead of installing the Diesel CLI and running migrations through it. In addition to that, synchronizing categories has been moved to the crates-admin migrate command instead of being executed every time the application starts.

The main advantage of this is, booting the server will not require a fully working database connection anymore. A connection is still needed, but this removes all the blockers for removing that limit.

r? @jtgeibel
Part of #3541

@Turbo87
Copy link
Member

Turbo87 commented Apr 26, 2021

wouldn't it be better to make this a subcommand of the crates-admin binary to avoid the additional linking step?

@pietroalbini pietroalbini changed the title Create a migrate binary to sync categories and migrate the db Create crates-admin migrate to sync categories and migrate the db Apr 26, 2021
The new command will be used in production to run migrations instead of
installing the Diesel CLI and running migrations through it. In addition
to that, synchronizing categories has been moved to the `crates-admin
migrate` command instead of being executed every time the application
starts.

The main advantage of this is, booting the server will not *require* a
fully working database connection anymore. A connection is still needed,
but this removes all the blockers for removing that limit.
@pietroalbini
Copy link
Member Author

Updated the PR to use a crates-admin subcommand.

Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to r=me

@jtgeibel
Copy link
Member

LGTM too!

@bors r=Turbo87

@bors
Copy link
Contributor

bors commented Apr 26, 2021

📌 Commit 1929eea has been approved by Turbo87

@bors
Copy link
Contributor

bors commented Apr 26, 2021

⌛ Testing commit 1929eea with merge 333dac0...

@bors
Copy link
Contributor

bors commented Apr 26, 2021

☀️ Test successful - checks-actions
Approved by: Turbo87
Pushing 333dac0 to master...

@bors bors merged commit 333dac0 into rust-lang:master Apr 26, 2021
@pietroalbini pietroalbini deleted the bin-migrate branch April 26, 2021 17:01
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.

5 participants