Sha256: c94f63d53a82e8b6fdf7042e7220461a21011b455e164d81e5fd93034e520c9b
Contents?: true
Size: 559 Bytes
Versions: 2
Compression:
Stored size: 559 Bytes
Contents
class Migration def migrate(project_root) settings = ProjectSettings.new(project_root) count = 0 Dir.foreach(settings.model_directory) do |m| file_path = File.join(settings.model_directory, m) full_path = File.expand_path(file_path) if File.extname(full_path) == ".rb" require "#{full_path}" count = count + 1 end end DataMapper.setup(:default, "sqlite3://#{settings.database_directory}/development.sqlite3") DataMapper.auto_migrate! puts "All #{count} Migrations Complete" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rest_in_peace-0.1.1 | lib/rest_in_peace/migration.rb |
rest_in_peace-0.1.0 | lib/rest_in_peace/migration.rb |