From 9271dc5e154d839cd4a7d7da0af5467055311b70 Mon Sep 17 00:00:00 2001 From: xofred Date: Mon, 2 Sep 2019 15:06:46 +0800 Subject: [PATCH] Score points support bigint In production project, we encountered that integer is too short for storing score points. --- .../active_record/templates/create_scores_and_points.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/active_record/templates/create_scores_and_points.rb b/lib/generators/active_record/templates/create_scores_and_points.rb index 8e5f1759..1ab9dc92 100644 --- a/lib/generators/active_record/templates/create_scores_and_points.rb +++ b/lib/generators/active_record/templates/create_scores_and_points.rb @@ -7,7 +7,7 @@ def change create_table :merit_score_points do |t| t.references :score - t.integer :num_points, default: 0 + t.bigint :num_points, default: 0 t.string :log t.datetime :created_at end