From 3b754fd998741b230a9ac5e686178dcf86aaf219 Mon Sep 17 00:00:00 2001 From: kikito Date: Mon, 11 Apr 2016 18:28:28 +0200 Subject: [PATCH] Adds two new fields to user --- db/migrate/20160411161531_add_genre_and_dob_to_users.rb | 6 ++++++ db/schema.rb | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20160411161531_add_genre_and_dob_to_users.rb diff --git a/db/migrate/20160411161531_add_genre_and_dob_to_users.rb b/db/migrate/20160411161531_add_genre_and_dob_to_users.rb new file mode 100644 index 000000000..aa8100fa3 --- /dev/null +++ b/db/migrate/20160411161531_add_genre_and_dob_to_users.rb @@ -0,0 +1,6 @@ +class AddGenreAndDobToUsers < ActiveRecord::Migration + def change + add_column :users, :genre, :string, index: true, limit: 10 + add_column :users, :date_of_birth, :datetime, index: true + end +end diff --git a/db/schema.rb b/db/schema.rb index e86f4db3b..cd05a0d2f 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: 20160406163649) do +ActiveRecord::Schema.define(version: 20160411161531) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -422,6 +422,8 @@ ActiveRecord::Schema.define(version: 20160406163649) do t.string "oauth_email" t.integer "geozone_id" t.string "redeemable_code" + t.string "genre", limit: 10 + t.datetime "date_of_birth" end add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree