Browse files

Using rails migration files installer task for upgrade alchemy task

  • Loading branch information...
1 parent 00e9fa3 commit 301e054ef51e931bf50e5a525b2555b81f106962 @tvdeyen tvdeyen committed Jan 2, 2012
Showing with 3 additions and 7 deletions.
  1. +2 −1 .gitignore
  2. +1 −6 lib/alchemy/upgrader.rb
View
3 .gitignore
@@ -16,4 +16,5 @@ log
spec/dummy/uploads/
.sass-cache
spec/dummy/db/test.sqlite3-journal
-spec/dummy/db/seeds.rb
+spec/dummy/db/seeds.rb
+.rvmrc
View
7 lib/alchemy/upgrader.rb
@@ -5,7 +5,7 @@ class << self
# Runs all ugrades
def run!
- copy_migration_files
+ Rake::Task['alchemy:install:migrations'].invoke
strip_alchemy_from_schema_version_table
Rake::Task['db:migrate'].invoke
upgrade_to_language
@@ -103,11 +103,6 @@ def upgrade_to_namespaced_essence_type
end
end
- def copy_migration_files
- desc "Syncing migration files"
- system "rsync -ruv #{File.join(File.dirname(__FILE__), '..', '..', 'db', 'migrate')} #{Rails.root}/db"
- end
-
def strip_alchemy_from_schema_version_table
database_yml = YAML.load_file(Rails.root.join("config", "database.yml"))
connection = Mysql2::Client.new(database_yml.fetch(Rails.env.to_s).symbolize_keys)

0 comments on commit 301e054

Please sign in to comment.