genesis 1.8.2 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/genesis/seeder.rb +4 -4
- data/lib/genesis/version.rb +1 -1
- metadata +1 -1
data/lib/genesis/seeder.rb
CHANGED
@@ -80,8 +80,8 @@ module Genesis
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def self.determine_current_version
|
83
|
-
current_seed = SchemaSeed.
|
84
|
-
@current_version = current_seed.nil? ? '' : current_seed[:
|
83
|
+
current_seed = SchemaSeed.order( :version ).last
|
84
|
+
@current_version = current_seed.nil? ? '' : current_seed[:version]
|
85
85
|
end
|
86
86
|
|
87
87
|
def self.determine_and_prepare_seed_direction( to_version )
|
@@ -136,9 +136,9 @@ module Genesis
|
|
136
136
|
log_entry_start( class_name )
|
137
137
|
klass.send( @method )
|
138
138
|
if @method == :up
|
139
|
-
ActiveRecord::Base.connection.execute( "INSERT INTO schema_seeds(#{ActiveRecord::Base.connection.quote_column_name '
|
139
|
+
ActiveRecord::Base.connection.execute( "INSERT INTO schema_seeds(#{ActiveRecord::Base.connection.quote_column_name 'version'}) VALUES('#{version}');" )
|
140
140
|
else
|
141
|
-
schema_seed = SchemaSeed.
|
141
|
+
schema_seed = SchemaSeed.where( :seed_version => version ).first
|
142
142
|
schema_seed.destroy unless schema_seed.nil?
|
143
143
|
end
|
144
144
|
log_entry_finish( class_name, Time.now - start_time )
|
data/lib/genesis/version.rb
CHANGED