From 1e7d000f727bed6a34a502b28819a09ca9c935aa Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 20 Oct 2015 18:02:49 -0400 Subject: [PATCH] Fix state_id to stat_id --- db/migrate/20151020220202_fix_state_to_stat.rb | 5 +++++ db/schema.rb | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 db/migrate/20151020220202_fix_state_to_stat.rb diff --git a/db/migrate/20151020220202_fix_state_to_stat.rb b/db/migrate/20151020220202_fix_state_to_stat.rb new file mode 100644 index 0000000..5a69c3a --- /dev/null +++ b/db/migrate/20151020220202_fix_state_to_stat.rb @@ -0,0 +1,5 @@ +class FixStateToStat < ActiveRecord::Migration + def change + rename_column :stats, :state_type_id, :stat_type_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 889ffc4..959a9f4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151020212132) do +ActiveRecord::Schema.define(version: 20151020220202) do create_table "awaken_types", force: :cascade do |t| t.string "name" @@ -128,16 +128,16 @@ ActiveRecord::Schema.define(version: 20151020212132) do end create_table "stats", force: :cascade do |t| - t.integer "min", default: 0 - t.integer "max", default: 0 - t.integer "awaken_min", default: 0 - t.integer "awaken_max", default: 0 - t.integer "state_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "min", default: 0 + t.integer "max", default: 0 + t.integer "awaken_min", default: 0 + t.integer "awaken_max", default: 0 + t.integer "stat_type_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - add_index "stats", ["state_type_id"], name: "index_stats_on_state_type_id" + add_index "stats", ["stat_type_id"], name: "index_stats_on_stat_type_id" create_table "super_attacks", force: :cascade do |t| t.string "name"