standalone_migrations 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/tasks/standalone_migrations.rb +7 -2
- data/standalone_migrations.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
@@ -31,7 +31,7 @@ class MigratorTasks < ::Rake::TaskLib
|
|
31
31
|
|
32
32
|
def define
|
33
33
|
namespace :db do
|
34
|
-
|
34
|
+
def ar_init(connect = true)
|
35
35
|
require 'active_record'
|
36
36
|
ENV[@env] ||= @default_env
|
37
37
|
|
@@ -51,6 +51,10 @@ class MigratorTasks < ::Rake::TaskLib
|
|
51
51
|
ActiveRecord::Base.logger = logger
|
52
52
|
end
|
53
53
|
|
54
|
+
task :ar_init do
|
55
|
+
ar_init
|
56
|
+
end
|
57
|
+
|
54
58
|
desc "Migrate the database using the scripts in the migrations directory. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
|
55
59
|
task :migrate => :ar_init do
|
56
60
|
require "#{@vendor}/migration_helpers/init"
|
@@ -133,7 +137,8 @@ class MigratorTasks < ::Rake::TaskLib
|
|
133
137
|
end
|
134
138
|
|
135
139
|
desc 'Create the database from config/database.yml for the current DATABASE_ENV'
|
136
|
-
task :create
|
140
|
+
task :create do
|
141
|
+
ar_init(false)
|
137
142
|
config = ActiveRecord::Base.configurations[self.default_env]
|
138
143
|
create_database config
|
139
144
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{standalone_migrations}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Todd Huss", "Michael Grosser"]
|