To answer my own question.. after some more examination, it seems this is done in lib/tasks/db.rake. Usually I think of seeds as run when you first install your application and never again, because you might customize the data and the seeds would put back stuff you modified or deleted. However, it seems from what I’m seeing in the code that discourse includes seed files that are smart enough to check 1) only install data that discourse absolutely needs (such as a “system” user) or 2) checks your site config before inserting data so that if you don’t want something, it won’t come back inadvertently. Just for the benefit of anyone else wondering about this, a more experienced dev can correct me if I’m not accurate here.
andrewroth
(Andrew Roth)
2
Related topics
| 글 | 댓글 | 조회수 | 활동 | |
|---|---|---|---|---|
| The `$rake db:*` commands and initializing a Discourse instance | 4 | 1338 | 8월 4, 2021 | |
| Development install fails when running bin/rails db:migrate | 12 | 462 | 11월 8, 2024 | |
| Rake db:migrate error | 3 | 714 | 5월 13, 2019 | |
| Understanding specs and fixtures | 0 | 745 | 1월 5, 2021 | |
| Db.rake fails for my email check plugin on rebuilding app | 7 | 719 | 9월 2, 2020 |