samsondav / rihanna

Rihanna is a high performance postgres-backed job queue for Elixir
MIT License
439 stars 49 forks source link

Add mix tasks to setup database without Ecto #77

Closed adolfosilva closed 5 years ago

adolfosilva commented 5 years ago

This PR tries to simplify the database setup needed by Rihanna by providing an easy way to run the necessary migrations instead of asking users who are not using Ecto to do it manually.

Introduces the following changes:

$ mix help --search rihanna
mix rihanna.create  # Create the Rihanna database
mix rihanna.drop    # Drop the Rihanna database
mix rihanna.migrate # Runs the necessary Rihanna migrations
mix rihanna.setup   # Alias defined in mix.exs
mix rihanna.upgrade # Upgrade an existing Rihanna database
samsondav commented 5 years ago

Hmm... not sure how I feel about this approach.

@sadir @lpil any strong feelings?

lpil commented 5 years ago

I think that any projects not using ecto migrations probably has another way of managing database schema changes so I'm not sure how useful these mix tasks would be.