From 40e6d6b587ca12ed883a953a50f704045818e9fd Mon Sep 17 00:00:00 2001 From: Aleksandr Zykov Date: Sat, 21 Jun 2014 10:37:36 +0800 Subject: [PATCH] commit_message may be longer than string --- ...40621023511_change_commit_message_type_to_text.rb | 8 ++++++++ db/schema.rb | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20140621023511_change_commit_message_type_to_text.rb diff --git a/db/migrate/20140621023511_change_commit_message_type_to_text.rb b/db/migrate/20140621023511_change_commit_message_type_to_text.rb new file mode 100644 index 00000000..64d8fcce --- /dev/null +++ b/db/migrate/20140621023511_change_commit_message_type_to_text.rb @@ -0,0 +1,8 @@ +class ChangeCommitMessageTypeToText < ActiveRecord::Migration + def up + change_column :tips, :commit_message, :text + end + def down + change_column :tips, :commit_message, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 899564e0..6f69e72d 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: 20140616060504) do +ActiveRecord::Schema.define(version: 20140621023511) do create_table "cold_storage_transfers", force: true do |t| t.integer "project_id" @@ -179,6 +179,7 @@ add_index "tipping_policies_texts", ["user_id"], name: "index_tipping_policies_texts_on_user_id" create_table "tips", force: true do |t| + t.integer "user_id" t.integer "amount", limit: 8 t.integer "distribution_id" t.datetime "created_at" @@ -186,11 +187,11 @@ t.string "commit" t.integer "project_id" t.datetime "refunded_at" - t.string "commit_message" + t.text "commit_message" t.string "comment" t.integer "reason_id" t.string "reason_type" - t.integer "user_id" + t.datetime "decided_at" end add_index "tips", ["distribution_id"], name: "index_tips_on_distribution_id" @@ -199,6 +200,7 @@ add_index "tips", ["user_id"], name: "index_tips_on_user_id" create_table "users", force: true do |t| + t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" @@ -210,6 +212,7 @@ t.string "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" + t.string "nickname" t.string "name" t.string "image" t.string "bitcoin_address" @@ -222,10 +225,9 @@ t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" - t.string "email" - t.string "nickname" end + add_index "users", ["email"], name: "index_users_on_email", unique: true add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end