mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-24 17:04:43 +00:00
Added a precision and scale to the school score to make sure decimals are stored in mysql
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class AddScaleToTeamScoreDecimal < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
change_column :schools, :score, :decimal, precision: 15, scale: 1
|
||||
end
|
||||
end
|
||||
@@ -2,15 +2,15 @@
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
#
|
||||
# This file is the source Rails uses to define your schema when running `rails
|
||||
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
||||
# This file is the source Rails uses to define your schema when running `bin/rails
|
||||
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
||||
# be faster and is potentially less error prone than running all of your
|
||||
# migrations from scratch. Old migrations may fail to apply correctly if those
|
||||
# migrations use external dependencies or application code.
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_11_26_174257) do
|
||||
ActiveRecord::Schema.define(version: 2021_02_22_161151) do
|
||||
|
||||
create_table "delayed_jobs", force: :cascade do |t|
|
||||
t.integer "priority", default: 0, null: false
|
||||
@@ -74,7 +74,7 @@ ActiveRecord::Schema.define(version: 2019_11_26_174257) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "tournament_id"
|
||||
t.decimal "score"
|
||||
t.decimal "score", precision: 15, scale: 1
|
||||
t.index ["tournament_id"], name: "index_schools_on_tournament_id"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user