Fix: move database seeding from migrations to db:seed

This commit is contained in:
Ilya Konanykhin
2017-01-19 15:40:19 +06:00
parent 8a8c82f5b7
commit f7b1d8fd5e
3 changed files with 9 additions and 7 deletions
@@ -10,10 +10,6 @@ class CreateBikeWheelSizes < ActiveRecord::Migration
t.string :description
t.string :tire_common_score
end
#create the default undetermined wheel size record
BikeWheelSize.create( twmm: 0, rdmm: 0, rdin: 0, twin: 0, rdfr: 0, twfr: 0, description: "UNDETERMINED", tire_common_score: 0)
ActiveRecord::Base.connection.execute(IO.read(File.join(Rails.root, "db", "seed", "sql", "common_wheel_sizes.sql")))
end
def down