From 04b1bc9fcad540c43bc667a423be61d023b7f105 Mon Sep 17 00:00:00 2001 From: Shaun Schwartz Date: Thu, 12 Apr 2018 14:30:09 -0700 Subject: [PATCH] Add timestamps to Budget::Heading & Budget::Group --- ...0153426_add_timestamps_to_budget_groups.rb | 5 ++++ ...53455_add_timestamps_to_budget_headings.rb | 5 ++++ db/schema.rb | 30 +++++++++++-------- 3 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 db/migrate/20191020153426_add_timestamps_to_budget_groups.rb create mode 100644 db/migrate/20191020153455_add_timestamps_to_budget_headings.rb diff --git a/db/migrate/20191020153426_add_timestamps_to_budget_groups.rb b/db/migrate/20191020153426_add_timestamps_to_budget_groups.rb new file mode 100644 index 000000000..b529045f3 --- /dev/null +++ b/db/migrate/20191020153426_add_timestamps_to_budget_groups.rb @@ -0,0 +1,5 @@ +class AddTimestampsToBudgetGroups < ActiveRecord::Migration[5.0] + def change + add_timestamps :budget_groups, null: true + end +end diff --git a/db/migrate/20191020153455_add_timestamps_to_budget_headings.rb b/db/migrate/20191020153455_add_timestamps_to_budget_headings.rb new file mode 100644 index 000000000..7aa437ea8 --- /dev/null +++ b/db/migrate/20191020153455_add_timestamps_to_budget_headings.rb @@ -0,0 +1,5 @@ +class AddTimestampsToBudgetHeadings < ActiveRecord::Migration[5.0] + def change + add_timestamps :budget_headings, null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 505403c8d..692ec3f82 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20190607160900) do +ActiveRecord::Schema.define(version: 20191020153455) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -170,10 +170,12 @@ ActiveRecord::Schema.define(version: 20190607160900) do end create_table "budget_groups", force: :cascade do |t| - t.integer "budget_id" - t.string "name", limit: 50 - t.string "slug" - t.integer "max_votable_headings", default: 1 + t.integer "budget_id" + t.string "name", limit: 50 + t.string "slug" + t.integer "max_votable_headings", default: 1 + t.datetime "created_at" + t.datetime "updated_at" t.index ["budget_id"], name: "index_budget_groups_on_budget_id", using: :btree end @@ -188,14 +190,16 @@ ActiveRecord::Schema.define(version: 20190607160900) do end create_table "budget_headings", force: :cascade do |t| - t.integer "group_id" - t.string "name", limit: 50 - t.bigint "price" - t.integer "population" - t.string "slug" - t.boolean "allow_custom_content", default: false - t.text "latitude" - t.text "longitude" + t.integer "group_id" + t.string "name", limit: 50 + t.bigint "price" + t.integer "population" + t.string "slug" + t.boolean "allow_custom_content", default: false + t.text "latitude" + t.text "longitude" + t.datetime "created_at" + t.datetime "updated_at" t.index ["group_id"], name: "index_budget_headings_on_group_id", using: :btree end