Repository navigation
[ci-skip][Docs]Add description for db:prepare command - #49480
Merged
Merged
Conversation
bensheldon
reviewed
Oct 4, 2023
bensheldon
left a comment
Contributor
There was a problem hiding this comment.
Thank you for updating this! I suggested one small tweak.
Contributor
There was a problem hiding this comment.
Suggested change
| * If the database exists but the tables have not been created, the command will load the schema, run any pending migrations to dump schema, and finally load the seed data. | |
| * If the database exists but the tables have not been created, the command will load the schema, run any pending migrations, dump the updated schema, and finally load the seed data. |
Contributor
Author
There was a problem hiding this comment.
Thank you for the review! Updated.
Contributor
Author
There was a problem hiding this comment.
Squashed the commits.
eileencodes
requested changes
Oct 4, 2023
Member
There was a problem hiding this comment.
Thanks for the PR. Can you wrap the docs to 80 characters like the rest of the document?
Contributor
Author
There was a problem hiding this comment.
Added hard wrap and squashed.
Review by ChatGPT Minor fix on db:prepare document Update by review Add hard wrap
zzak
approved these changes
Oct 4, 2023
eileencodes
approved these changes
Oct 4, 2023
2 tasks done
rafaelfranca
pushed a commit
that referenced
this pull request
Oct 4, 2023
[ci-skip][Docs]Add description for `db:prepare` command
flavorjones
added a commit
to flavorjones/rails
that referenced
this pull request
Oct 19, 2024
Introduces a new database config property `seeds` to control whether seeds are loaded during `db:prepare` which defaults to `true` for primary database configs and `false otherwise. Previously, the `db:prepare` task would load seeds whenever a new database is created, leading to potential loss of data if a database is added to an existing environment. Also, update the Active Record Migrations guide to more accurately describe what the `db:prepare` task does, correcting some misinformation introduced in rails#49480 along the way. Closes rails#53348
4 tasks done
flavorjones
added a commit
to flavorjones/rails
that referenced
this pull request
Oct 19, 2024
Introduces a new database config property `seeds` to control whether seeds are loaded during `db:prepare` which defaults to `true` for primary database configs and `false otherwise. Previously, the `db:prepare` task would load seeds whenever a new database is created, leading to potential loss of data if a database is added to an existing environment. Also, update the Active Record Migrations guide to more accurately describe what the `db:prepare` task does, correcting some misinformation introduced in rails#49480 along the way. Closes rails#53348
flavorjones
added a commit
to flavorjones/rails
that referenced
this pull request
Oct 19, 2024
Introduces a new database config property `seeds` to control whether seeds are loaded during `db:prepare` which defaults to `true` for primary database configs and `false otherwise. Previously, the `db:prepare` task would load seeds whenever a new database is created, leading to potential loss of data if a database is added to an existing environment. Also, update the Active Record Migrations guide to more accurately describe what the `db:prepare` task does, correcting some misinformation introduced in rails#49480 along the way. Closes rails#53348
flavorjones
added a commit
to flavorjones/rails
that referenced
this pull request
Oct 24, 2024
Introduces a new database config property `seeds` to control whether seeds are loaded during `db:prepare` which defaults to `true` for primary database configs and `false otherwise. Previously, the `db:prepare` task would load seeds whenever a new database is created, leading to potential loss of data if a database is added to an existing environment. Also, update the Active Record Migrations guide to more accurately describe what the `db:prepare` task does, correcting some misinformation introduced in rails#49480 along the way. Closes rails#53348
rafaelfranca
pushed a commit
to flavorjones/rails
that referenced
this pull request
Oct 25, 2024
Introduces a new database config property `seeds` to control whether seeds are loaded during `db:prepare` which defaults to `true` for primary database configs and `false otherwise. Previously, the `db:prepare` task would load seeds whenever a new database is created, leading to potential loss of data if a database is added to an existing environment. Also, update the Active Record Migrations guide to more accurately describe what the `db:prepare` task does, correcting some misinformation introduced in rails#49480 along the way. Closes rails#53348
This file contains hidden or 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
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.
Motivation / Background
This Pull Request has been created because
bin/rails db:prepareis missing in current migration guide since Rails 6.0.db:prepareto load schema if database already exists but is empty; also dumps schema after migrations #45464 -- improved in 7.1cc: @bensheldon, the author of #45464
Detail
This Pull Request add a description for
db:prepare.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]