lib/lotus/generators/application/container/lib/app_name.rb.tt in lotusrb-0.3.2 vs lib/lotus/generators/application/container/lib/app_name.rb.tt in lotusrb-0.4.0

- old
+ new

@@ -1,9 +1,10 @@ require 'lotus/model' Dir["#{ __dir__ }/<%= config[:app_name] %>/**/*.rb"].each { |file| require_relative file } Lotus::Model.configure do + ## # Database adapter # # Available options: # # * Memory adapter @@ -14,9 +15,17 @@ # adapter type: :sql, uri: 'postgres://localhost/<%= config[:app_name] %>_development' # adapter type: :sql, uri: 'mysql://localhost/<%= config[:app_name] %>_development' # adapter type: :<%= config[:database_config][:type] %>, uri: ENV['<%= config[:app_name].to_env_s %>_DATABASE_URL'] + <%- if config[:database_config][:type] == :sql -%> + ## + # Migrations + # + migrations 'db/migrations' + schema 'db/schema.sql' + + <%- end -%> ## # Database mapping # # Intended for specifying application wide mappings. #