Closed malakai97 closed 7 years ago
Listed as in progress because I need to update the readme to reflect this, but ready otherwise.
Codacy indicates there are some duplicate blocks in the specs that might be consolidated into a shared_examples block, see
This pull request greatly improves the power and robustness of the seed functionality we have. It takes advantage of the seed feature provided by rails.
Previous usage
This is unchanged from before
rake db:setup
still runs the seed process, and it creates the same seeds as before.rake db:seed
creates the same seeds as before, but also creates replicate/restore agreements between nodes.What's new
The seed operation will now load any seed files in
db/seeds/RAILS_ENV-seeds.d
, in lexical order. It is somewhat intelligent about loading dependencies before records that rely on them.The seed operation now provides some output, similar to what the script in the private repo supplied. The operation is now idempotent--it will skip existing records.
This should replace the manual adding of nodes and members that was being done previously.