lib/daiku/plugins/datamapper/cli.rb in daiku-0.2.0 vs lib/daiku/plugins/datamapper/cli.rb in daiku-0.2.1

- old
+ new

@@ -42,9 +42,33 @@ gem 'dm-validations' end DMGEMS append_to_file "#{app}/Gemfile", content end + + def rake + template "_templates/datamapper.rake.tt", "#{app}/lib/tasks/datamapper.rake" + end + + def readme + append_to_file "#{app}/README.md" do + <<-SREADME.strip_heredoc + # Migrate It + + # create postgres extensions, optional but recommended (run once) + bundle exec rake db:datamapper:hstore + bundle exec rake db:datamapper:postgis + bundle exec rake db:datamapper:postgis_topology + bundle exec rake db:datamapper:postgis_tiger_geocoder + + # upgrade database (safe migration) + bundle exec rake db:datamapper:upgrade + + # migrate database (drops and recreates tables - danger!) + bundle exec rake db:datamapper:migrate + SREADME + end + end end end end end