diff --git a/db/migrate/20150617010614_create_posts.rb b/db/migrate/20150617010614_create_posts.rb index 23230ab..4424833 100644 --- a/db/migrate/20150617010614_create_posts.rb +++ b/db/migrate/20150617010614_create_posts.rb @@ -1,4 +1,4 @@ -class CreatePosts < ActiveRecord::Migration +class CreatePosts < ActiveRecord::Migration[5.0] def change create_table :posts do |t| t.text :content diff --git a/db/migrate/20150617013037_add_attachment_image_to_posts.rb b/db/migrate/20150617013037_add_attachment_image_to_posts.rb index af7844e..11bd896 100644 --- a/db/migrate/20150617013037_add_attachment_image_to_posts.rb +++ b/db/migrate/20150617013037_add_attachment_image_to_posts.rb @@ -1,4 +1,4 @@ -class AddAttachmentImageToPosts < ActiveRecord::Migration +class AddAttachmentImageToPosts < ActiveRecord::Migration[5.0] def self.up change_table :posts do |t| t.attachment :attachment diff --git a/db/migrate/20150711011916_devise_create_users.rb b/db/migrate/20150711011916_devise_create_users.rb index 5144934..1fd5889 100644 --- a/db/migrate/20150711011916_devise_create_users.rb +++ b/db/migrate/20150711011916_devise_create_users.rb @@ -1,4 +1,4 @@ -class DeviseCreateUsers < ActiveRecord::Migration +class DeviseCreateUsers < ActiveRecord::Migration[5.0] def change create_table(:users) do |t| ## Database authenticatable diff --git a/db/migrate/20150711011919_add_first_name_last_name_user_name_to_user.rb b/db/migrate/20150711011919_add_first_name_last_name_user_name_to_user.rb index 093f277..0b8bbe9 100644 --- a/db/migrate/20150711011919_add_first_name_last_name_user_name_to_user.rb +++ b/db/migrate/20150711011919_add_first_name_last_name_user_name_to_user.rb @@ -1,4 +1,4 @@ -class AddFirstNameLastNameUserNameToUser < ActiveRecord::Migration +class AddFirstNameLastNameUserNameToUser < ActiveRecord::Migration[5.0] def change add_column :users, :first_name, :string add_column :users, :last_name, :string diff --git a/db/migrate/20150711072447_add_user_id_to_posts.rb b/db/migrate/20150711072447_add_user_id_to_posts.rb index 1bea36e..1be0a49 100644 --- a/db/migrate/20150711072447_add_user_id_to_posts.rb +++ b/db/migrate/20150711072447_add_user_id_to_posts.rb @@ -1,4 +1,4 @@ -class AddUserIdToPosts < ActiveRecord::Migration +class AddUserIdToPosts < ActiveRecord::Migration[5.0] def change add_reference :posts, :user, index: true add_foreign_key :posts, :users diff --git a/db/migrate/20150713011155_create_comments.rb b/db/migrate/20150713011155_create_comments.rb index 677de33..5541cce 100644 --- a/db/migrate/20150713011155_create_comments.rb +++ b/db/migrate/20150713011155_create_comments.rb @@ -1,4 +1,4 @@ -class CreateComments < ActiveRecord::Migration +class CreateComments < ActiveRecord::Migration[5.0] def change create_table :comments do |t| t.references :user, index: true diff --git a/db/migrate/20151016102706_add_attachment_avatar_to_users.rb b/db/migrate/20151016102706_add_attachment_avatar_to_users.rb index 1d87ba8..fdd95ca 100644 --- a/db/migrate/20151016102706_add_attachment_avatar_to_users.rb +++ b/db/migrate/20151016102706_add_attachment_avatar_to_users.rb @@ -1,4 +1,4 @@ -class AddAttachmentAvatarToUsers < ActiveRecord::Migration +class AddAttachmentAvatarToUsers < ActiveRecord::Migration[5.0] def self.up change_table :users do |t| t.attachment :avatar diff --git a/db/migrate/20151016103736_add_bio_to_users.rb b/db/migrate/20151016103736_add_bio_to_users.rb index 7198e99..d7629b4 100644 --- a/db/migrate/20151016103736_add_bio_to_users.rb +++ b/db/migrate/20151016103736_add_bio_to_users.rb @@ -1,4 +1,4 @@ -class AddBioToUsers < ActiveRecord::Migration +class AddBioToUsers < ActiveRecord::Migration[5.0] def change add_column :users, :bio, :text end diff --git a/db/migrate/20151029095601_acts_as_votable_migration.rb b/db/migrate/20151029095601_acts_as_votable_migration.rb index 5f381af..6b55ef7 100644 --- a/db/migrate/20151029095601_acts_as_votable_migration.rb +++ b/db/migrate/20151029095601_acts_as_votable_migration.rb @@ -1,4 +1,4 @@ -class ActsAsVotableMigration < ActiveRecord::Migration +class ActsAsVotableMigration < ActiveRecord::Migration[5.0] def self.up create_table :votes do |t| diff --git a/db/migrate/20160629131918_add_index_to_user.rb b/db/migrate/20160629131918_add_index_to_user.rb index eab9ba5..c643895 100644 --- a/db/migrate/20160629131918_add_index_to_user.rb +++ b/db/migrate/20160629131918_add_index_to_user.rb @@ -1,4 +1,4 @@ -class AddIndexToUser < ActiveRecord::Migration +class AddIndexToUser < ActiveRecord::Migration[5.0] def change add_index :users, :user_name,unique: true end diff --git a/db/migrate/20160630205627_create_follow_join_table.rb b/db/migrate/20160630205627_create_follow_join_table.rb index b40c8d3..1288797 100644 --- a/db/migrate/20160630205627_create_follow_join_table.rb +++ b/db/migrate/20160630205627_create_follow_join_table.rb @@ -1,4 +1,4 @@ -class CreateFollowJoinTable < ActiveRecord::Migration +class CreateFollowJoinTable < ActiveRecord::Migration[5.0] def change create_table 'follows' do |t| t.integer 'following_id', :null => false @@ -11,4 +11,4 @@ def change add_index :follows, :follower_id add_index :follows, [:following_id, :follower_id], unique: true end -end \ No newline at end of file +end diff --git a/db/migrate/20170111190314_add_attachment_thumbnail_image_to_groups.rb b/db/migrate/20170111190314_add_attachment_thumbnail_image_to_groups.rb index c3dd99b..6c2b268 100644 --- a/db/migrate/20170111190314_add_attachment_thumbnail_image_to_groups.rb +++ b/db/migrate/20170111190314_add_attachment_thumbnail_image_to_groups.rb @@ -1,4 +1,4 @@ -class AddAttachmentThumbnailImageToGroups < ActiveRecord::Migration +class AddAttachmentThumbnailImageToGroups < ActiveRecord::Migration[5.0] def self.up change_table :groups do |t| t.attachment :thumbnail_image diff --git a/db/migrate/20170111190347_add_attachment_timeline_image_to_groups.rb b/db/migrate/20170111190347_add_attachment_timeline_image_to_groups.rb index e9d4c9e..3dbde79 100644 --- a/db/migrate/20170111190347_add_attachment_timeline_image_to_groups.rb +++ b/db/migrate/20170111190347_add_attachment_timeline_image_to_groups.rb @@ -1,4 +1,4 @@ -class AddAttachmentTimelineImageToGroups < ActiveRecord::Migration +class AddAttachmentTimelineImageToGroups < ActiveRecord::Migration[5.0] def self.up change_table :groups do |t| t.attachment :timeline_image diff --git a/db/migrate/20170115053259_add_attachment_attachment_to_personal_messages.rb b/db/migrate/20170115053259_add_attachment_attachment_to_personal_messages.rb index 112a3a3..6c34af7 100644 --- a/db/migrate/20170115053259_add_attachment_attachment_to_personal_messages.rb +++ b/db/migrate/20170115053259_add_attachment_attachment_to_personal_messages.rb @@ -1,4 +1,4 @@ -class AddAttachmentAttachmentToPersonalMessages < ActiveRecord::Migration +class AddAttachmentAttachmentToPersonalMessages < ActiveRecord::Migration[5.0] def self.up change_table :personal_messages do |t| t.attachment :attachment diff --git a/db/schema.rb b/db/schema.rb index a0fbf79..2865a0b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -13,17 +13,17 @@ ActiveRecord::Schema.define(version: 20170116043801) do create_table "chat_rooms", force: :cascade do |t| - t.string "title" - t.integer "user_id" + t.string "title" + t.integer "user_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["user_id"], name: "index_chat_rooms_on_user_id" end create_table "comments", force: :cascade do |t| - t.integer "user_id" - t.integer "post_id" - t.text "content" + t.integer "user_id" + t.integer "post_id" + t.text "content" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["post_id"], name: "index_comments_on_post_id" @@ -31,29 +31,29 @@ end create_table "conversations", force: :cascade do |t| - t.integer "author_id" - t.integer "receiver_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "author_id" + t.integer "receiver_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["author_id", "receiver_id"], name: "index_conversations_on_author_id_and_receiver_id", unique: true t.index ["author_id"], name: "index_conversations_on_author_id" t.index ["receiver_id"], name: "index_conversations_on_receiver_id" end create_table "follows", force: :cascade do |t| - t.integer "following_id", null: false - t.integer "follower_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.integer "following_id", null: false + t.integer "follower_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["follower_id"], name: "index_follows_on_follower_id" t.index ["following_id", "follower_id"], name: "index_follows_on_following_id_and_follower_id", unique: true t.index ["following_id"], name: "index_follows_on_following_id" end create_table "group_memberships", force: :cascade do |t| - t.integer "user_id" - t.integer "group_id" - t.integer "role_id" + t.integer "user_id" + t.integer "group_id" + t.integer "role_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["group_id"], name: "index_group_memberships_on_group_id" @@ -63,9 +63,9 @@ end create_table "group_messages", force: :cascade do |t| - t.text "body" - t.integer "user_id" - t.integer "group_id" + t.text "body" + t.integer "user_id" + t.integer "group_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["group_id"], name: "index_group_messages_on_group_id" @@ -73,106 +73,106 @@ end create_table "groups", force: :cascade do |t| - t.string "name" - t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "thumbnail_image_file_name" - t.string "thumbnail_image_content_type" - t.integer "thumbnail_image_file_size" + t.string "name" + t.text "description" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "thumbnail_image_file_name" + t.string "thumbnail_image_content_type" + t.integer "thumbnail_image_file_size" t.datetime "thumbnail_image_updated_at" - t.string "timeline_image_file_name" - t.string "timeline_image_content_type" - t.integer "timeline_image_file_size" + t.string "timeline_image_file_name" + t.string "timeline_image_content_type" + t.integer "timeline_image_file_size" t.datetime "timeline_image_updated_at" end create_table "messages", force: :cascade do |t| - t.text "body" - t.integer "user_id" - t.integer "chat_room_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.text "body" + t.integer "user_id" + t.integer "chat_room_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["chat_room_id"], name: "index_messages_on_chat_room_id" t.index ["user_id"], name: "index_messages_on_user_id" end create_table "notifications", force: :cascade do |t| - t.integer "recipient_id" - t.integer "actor_id" + t.integer "recipient_id" + t.integer "actor_id" t.datetime "read_at" - t.string "action" - t.integer "notifiable_id" - t.string "notifiable_type" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "action" + t.integer "notifiable_id" + t.string "notifiable_type" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "personal_messages", force: :cascade do |t| - t.text "body" - t.integer "conversation_id" - t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "attachment_file_name" - t.string "attachment_content_type" - t.integer "attachment_file_size" + t.text "body" + t.integer "conversation_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "attachment_file_name" + t.string "attachment_content_type" + t.integer "attachment_file_size" t.datetime "attachment_updated_at" t.index ["conversation_id"], name: "index_personal_messages_on_conversation_id" t.index ["user_id"], name: "index_personal_messages_on_user_id" end create_table "posts", force: :cascade do |t| - t.text "content" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "attachment_file_name" - t.string "attachment_content_type" - t.integer "attachment_file_size" + t.text "content" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "attachment_file_name" + t.string "attachment_content_type" + t.integer "attachment_file_size" t.datetime "attachment_updated_at" - t.integer "user_id" - t.string "postable_type" - t.integer "postable_id" + t.integer "user_id" + t.string "postable_type" + t.integer "postable_id" t.index ["postable_id", "postable_type"], name: "index_posts_on_postable_id_and_postable_type" t.index ["user_id"], name: "index_posts_on_user_id" end create_table "roles", force: :cascade do |t| - t.string "name" + t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "users", force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "", null: false - t.string "reset_password_token" + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false + t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0, null: false + t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" - t.string "current_sign_in_ip" - t.string "last_sign_in_ip" - t.string "confirmation_token" + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" + t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.string "unconfirmed_email" - t.integer "failed_attempts", default: 0, null: false - t.string "unlock_token" + t.string "unconfirmed_email" + t.integer "failed_attempts", default: 0, null: false + t.string "unlock_token" t.datetime "locked_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "first_name" - t.string "last_name" - t.string "user_name" - t.string "avatar_file_name" - t.string "avatar_content_type" - t.integer "avatar_file_size" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "first_name" + t.string "last_name" + t.string "user_name" + t.string "avatar_file_name" + t.string "avatar_content_type" + t.integer "avatar_file_size" t.datetime "avatar_updated_at" - t.text "bio" - t.boolean "is_female", default: false - t.integer "role_id" + t.text "bio" + t.boolean "is_female", default: false + t.integer "role_id" t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true @@ -182,17 +182,19 @@ end create_table "votes", force: :cascade do |t| - t.string "votable_type" - t.integer "votable_id" - t.string "voter_type" - t.integer "voter_id" - t.boolean "vote_flag" - t.string "vote_scope" - t.integer "vote_weight" - t.datetime "created_at" - t.datetime "updated_at" + t.string "votable_type" + t.integer "votable_id" + t.string "voter_type" + t.integer "voter_id" + t.boolean "vote_flag" + t.string "vote_scope" + t.integer "vote_weight" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["votable_id", "votable_type", "vote_scope"], name: "index_votes_on_votable_id_and_votable_type_and_vote_scope" + t.index ["votable_type", "votable_id"], name: "index_votes_on_votable_type_and_votable_id" t.index ["voter_id", "voter_type", "vote_scope"], name: "index_votes_on_voter_id_and_voter_type_and_vote_scope" + t.index ["voter_type", "voter_id"], name: "index_votes_on_voter_type_and_voter_id" end end