Skip to content

Add seeds #36

@josepjaume

Description

@josepjaume

We should add two kinds of seeds:

  • Development seeds: These seeds should contain example information and will also be used in staging environments as example data. Would be great to have them documented in the README, at least its login information.
  • Production seeds: Should contain the bare essentials to run a production environment; probably just a system admin. They should be documented as well.

Note that each engine should contain its own seeds. We can sort of handle this in several ways:

  1. Providing a single Decidim.seed method, and have all engines register seeds via a Decidim.register_seed method somewhere
  2. We could broadcast a seed signal when the seeds are run and capture them via ActiveSupport::Notifications. That could also be the beginning of a broader-size pub-sub mechanism between engines.
  3. We could just run all seeds separately (Decidim::Core.seed, Decidim::System.seed and Decidim::Admin.seed) and put them into seeds.rb via the app generator, but that's sub-optimal and doesn't scale if we end up adding more engines.

I personally prefer 1) or 2) but that's up to the implementer.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions