Created
March 9, 2019 13:18
-
-
Save igkuz/0edb79e08189fe42d945446eb2a66b95 to your computer and use it in GitHub Desktop.
Rakefile for sample ROM app with db:setup
This file contains 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
require_relative 'boot' | |
require 'rom/sql/rake_task' | |
namespace :db do | |
task :setup do | |
configuration = ROM::Configuration.new(:sql, "mysql2:///#{CONFIG['db']['name']}", CONFIG['db']) | |
ROM::SQL::RakeSupport.env = configuration | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment