changes price fields type to bigint

This commit is contained in:
Juanjo Bazán
2016-03-08 19:45:51 +01:00
parent f13b4cfc6c
commit 0a0eb00f97
2 changed files with 18 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
class ChangePriceFieldsToBigint < ActiveRecord::Migration
def up
change_column :spending_proposals, :price, :bigint
change_column :spending_proposals, :price_first_year, :bigint
end
def down
change_column :spending_proposals, :price, :integer
change_column :spending_proposals, :price_first_year, :integer
end
end

View File

@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160308103548) do ActiveRecord::Schema.define(version: 20160308184050) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@@ -299,7 +299,7 @@ ActiveRecord::Schema.define(version: 20160308103548) do
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.integer "geozone_id" t.integer "geozone_id"
t.integer "price" t.integer "price", limit: 8
t.boolean "feasible" t.boolean "feasible"
t.string "association_name" t.string "association_name"
t.text "price_explanation" t.text "price_explanation"
@@ -309,7 +309,7 @@ ActiveRecord::Schema.define(version: 20160308103548) do
t.text "explanations_log" t.text "explanations_log"
t.integer "administrator_id" t.integer "administrator_id"
t.integer "valuation_assignments_count", default: 0 t.integer "valuation_assignments_count", default: 0
t.integer "price_first_year" t.integer "price_first_year", limit: 8
t.string "time_scope" t.string "time_scope"
end end