From e1f775d95575c32ba238317fafc941a375816289 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 19 Apr 2020 18:10:31 +0200 Subject: [PATCH] append used Rails version to ActiveRecord::Migration --- db/20150724154106_create_themes_table.rb | 2 +- .../20140801095807_devise_create_users.rb | 2 +- ...20140801103309_add_screen_name_to_users.rb | 2 +- db/migrate/20140801174930_create_questions.rb | 2 +- db/migrate/20140801175112_create_answers.rb | 2 +- db/migrate/20140801175137_create_comments.rb | 2 +- .../20141102153520_add_counts_to_users.rb | 2 +- ...0141104143648_add_display_name_to_users.rb | 2 +- db/migrate/20141110210154_create_inboxes.rb | 2 +- ...141113164048_add_smile_count_to_answers.rb | 2 +- ...0141113164314_add_smiled_count_to_users.rb | 2 +- .../20141126154451_add_admin_to_users.rb | 2 +- ...29211448_add_motivation_header_to_users.rb | 2 +- .../20141130130221_create_relationships.rb | 2 +- db/migrate/20141130175749_create_smiles.rb | 2 +- ...0141130180152_rename_columns_in_answers.rb | 2 +- .../20141201191324_add_fields_to_users.rb | 2 +- ...207194424_add_answer_count_to_questions.rb | 2 +- ...11714_change_answer_content_column_type.rb | 2 +- db/migrate/20141212193625_create_services.rb | 2 +- .../20141213182609_create_notifications.rb | 2 +- .../20141226115905_add_moderator_to_users.rb | 2 +- db/migrate/20141227130438_create_reports.rb | 2 +- .../20141227130545_create_moderation_votes.rb | 2 +- ...141227130618_create_moderation_comments.rb | 2 +- .../20141228202825_add_deleted_to_reports.rb | 2 +- ...add_attachment_profile_picture_to_users.rb | 2 +- ...add_profile_picture_processing_to_users.rb | 2 +- ...20141229133149_add_crop_values_to_users.rb | 2 +- .../20150102231343_add_supporter_to_users.rb | 2 +- ...0103200732_add_privacy_options_to_users.rb | 2 +- .../20150112210754_add_banned_to_users.rb | 2 +- db/migrate/20150112210755_create_groups.rb | 2 +- .../20150125191224_add_blogger_to_users.rb | 2 +- ...20150419201122_add_contributor_to_users.rb | 2 +- .../20150420232305_create_subscriptions.rb | 2 +- ...21120557_add_is_active_to_subscriptions.rb | 2 +- .../20150422024104_add_reason_to_report.rb | 2 +- ...e_banned_to_permanently_banned_in_users.rb | 2 +- ...dd_ban_reason_and_banned_until_to_users.rb | 2 +- .../20150504004931_create_comment_smiles.rb | 2 +- ..._add_attachment_profile_header_to_users.rb | 2 +- .../20150526031159_add_locale_to_user.rb | 2 +- .../20150619123121_add_translator_to_users.rb | 2 +- ...04072402_change_default_value_of_locale.rb | 2 +- ...0150721154255_add_confirmable_to_devise.rb | 2 +- db/migrate/20150825073030_create_themes.rb | 2 +- ...180139_add_show_foreign_themes_to_users.rb | 2 +- ...26224857_add_input_and_outline_to_theme.rb | 2 +- ...160105165913_add_export_fields_to_users.rb | 2 +- db/schema.rb | 425 +++++++++--------- 51 files changed, 256 insertions(+), 269 deletions(-) diff --git a/db/20150724154106_create_themes_table.rb b/db/20150724154106_create_themes_table.rb index 64ac0fd1..0d326836 100644 --- a/db/20150724154106_create_themes_table.rb +++ b/db/20150724154106_create_themes_table.rb @@ -1,4 +1,4 @@ -class CreateThemesTable < ActiveRecord::Migration +class CreateThemesTable < ActiveRecord::Migration[4.2] def change create_table :themes do |t| end diff --git a/db/migrate/20140801095807_devise_create_users.rb b/db/migrate/20140801095807_devise_create_users.rb index cf497c27..0115292e 100644 --- a/db/migrate/20140801095807_devise_create_users.rb +++ b/db/migrate/20140801095807_devise_create_users.rb @@ -1,4 +1,4 @@ -class DeviseCreateUsers < ActiveRecord::Migration +class DeviseCreateUsers < ActiveRecord::Migration[4.2] def change create_table(:users) do |t| ## Database authenticatable diff --git a/db/migrate/20140801103309_add_screen_name_to_users.rb b/db/migrate/20140801103309_add_screen_name_to_users.rb index dc4acf9a..ad028c8f 100644 --- a/db/migrate/20140801103309_add_screen_name_to_users.rb +++ b/db/migrate/20140801103309_add_screen_name_to_users.rb @@ -1,4 +1,4 @@ -class AddScreenNameToUsers < ActiveRecord::Migration +class AddScreenNameToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :screen_name, :string add_index :users, :screen_name, unique: true diff --git a/db/migrate/20140801174930_create_questions.rb b/db/migrate/20140801174930_create_questions.rb index ce85c988..ae872a7e 100644 --- a/db/migrate/20140801174930_create_questions.rb +++ b/db/migrate/20140801174930_create_questions.rb @@ -1,4 +1,4 @@ -class CreateQuestions < ActiveRecord::Migration +class CreateQuestions < ActiveRecord::Migration[4.2] def change create_table :questions do |t| t.string :content diff --git a/db/migrate/20140801175112_create_answers.rb b/db/migrate/20140801175112_create_answers.rb index d10e4682..510d73bc 100644 --- a/db/migrate/20140801175112_create_answers.rb +++ b/db/migrate/20140801175112_create_answers.rb @@ -1,4 +1,4 @@ -class CreateAnswers < ActiveRecord::Migration +class CreateAnswers < ActiveRecord::Migration[4.2] def change create_table :answers do |t| t.string :content diff --git a/db/migrate/20140801175137_create_comments.rb b/db/migrate/20140801175137_create_comments.rb index 7d2e3e4c..cb785fff 100644 --- a/db/migrate/20140801175137_create_comments.rb +++ b/db/migrate/20140801175137_create_comments.rb @@ -1,4 +1,4 @@ -class CreateComments < ActiveRecord::Migration +class CreateComments < ActiveRecord::Migration[4.2] def change create_table :comments do |t| t.string :content diff --git a/db/migrate/20141102153520_add_counts_to_users.rb b/db/migrate/20141102153520_add_counts_to_users.rb index d38c009b..37db7152 100644 --- a/db/migrate/20141102153520_add_counts_to_users.rb +++ b/db/migrate/20141102153520_add_counts_to_users.rb @@ -1,4 +1,4 @@ -class AddCountsToUsers < ActiveRecord::Migration +class AddCountsToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :friend_count, :integer, default: 0, null: false add_column :users, :follower_count, :integer, default: 0, null: false diff --git a/db/migrate/20141104143648_add_display_name_to_users.rb b/db/migrate/20141104143648_add_display_name_to_users.rb index 9e783036..6db1c1c1 100644 --- a/db/migrate/20141104143648_add_display_name_to_users.rb +++ b/db/migrate/20141104143648_add_display_name_to_users.rb @@ -1,4 +1,4 @@ -class AddDisplayNameToUsers < ActiveRecord::Migration +class AddDisplayNameToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :display_name, :string end diff --git a/db/migrate/20141110210154_create_inboxes.rb b/db/migrate/20141110210154_create_inboxes.rb index fca0cd00..bfb140d0 100644 --- a/db/migrate/20141110210154_create_inboxes.rb +++ b/db/migrate/20141110210154_create_inboxes.rb @@ -1,4 +1,4 @@ -class CreateInboxes < ActiveRecord::Migration +class CreateInboxes < ActiveRecord::Migration[4.2] def change create_table :inboxes do |t| t.integer :user_id diff --git a/db/migrate/20141113164048_add_smile_count_to_answers.rb b/db/migrate/20141113164048_add_smile_count_to_answers.rb index b3983533..c40b7166 100644 --- a/db/migrate/20141113164048_add_smile_count_to_answers.rb +++ b/db/migrate/20141113164048_add_smile_count_to_answers.rb @@ -1,4 +1,4 @@ -class AddSmileCountToAnswers < ActiveRecord::Migration +class AddSmileCountToAnswers < ActiveRecord::Migration[4.2] def change add_column :answers, :smile_count, :integer, default: 0, null: false end diff --git a/db/migrate/20141113164314_add_smiled_count_to_users.rb b/db/migrate/20141113164314_add_smiled_count_to_users.rb index 9bd92879..dda9e08b 100644 --- a/db/migrate/20141113164314_add_smiled_count_to_users.rb +++ b/db/migrate/20141113164314_add_smiled_count_to_users.rb @@ -1,4 +1,4 @@ -class AddSmiledCountToUsers < ActiveRecord::Migration +class AddSmiledCountToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :smiled_count, :integer, default: 0, null: false end diff --git a/db/migrate/20141126154451_add_admin_to_users.rb b/db/migrate/20141126154451_add_admin_to_users.rb index 7dccaf2d..d225ea61 100644 --- a/db/migrate/20141126154451_add_admin_to_users.rb +++ b/db/migrate/20141126154451_add_admin_to_users.rb @@ -1,4 +1,4 @@ -class AddAdminToUsers < ActiveRecord::Migration +class AddAdminToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :admin, :boolean, default: false, null: false end diff --git a/db/migrate/20141129211448_add_motivation_header_to_users.rb b/db/migrate/20141129211448_add_motivation_header_to_users.rb index 73dcefb7..7cd1d6dd 100644 --- a/db/migrate/20141129211448_add_motivation_header_to_users.rb +++ b/db/migrate/20141129211448_add_motivation_header_to_users.rb @@ -1,4 +1,4 @@ -class AddMotivationHeaderToUsers < ActiveRecord::Migration +class AddMotivationHeaderToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :motivation_header, :string, default: '', null: false end diff --git a/db/migrate/20141130130221_create_relationships.rb b/db/migrate/20141130130221_create_relationships.rb index 838d0fea..98ab31e8 100644 --- a/db/migrate/20141130130221_create_relationships.rb +++ b/db/migrate/20141130130221_create_relationships.rb @@ -1,4 +1,4 @@ -class CreateRelationships < ActiveRecord::Migration +class CreateRelationships < ActiveRecord::Migration[4.2] def change create_table :relationships do |t| t.integer :source_id diff --git a/db/migrate/20141130175749_create_smiles.rb b/db/migrate/20141130175749_create_smiles.rb index c993b858..de5004b4 100644 --- a/db/migrate/20141130175749_create_smiles.rb +++ b/db/migrate/20141130175749_create_smiles.rb @@ -1,4 +1,4 @@ -class CreateSmiles < ActiveRecord::Migration +class CreateSmiles < ActiveRecord::Migration[4.2] def change create_table :smiles do |t| t.integer :user_id diff --git a/db/migrate/20141130180152_rename_columns_in_answers.rb b/db/migrate/20141130180152_rename_columns_in_answers.rb index 7798cc8f..0a3fac1f 100644 --- a/db/migrate/20141130180152_rename_columns_in_answers.rb +++ b/db/migrate/20141130180152_rename_columns_in_answers.rb @@ -1,4 +1,4 @@ -class RenameColumnsInAnswers < ActiveRecord::Migration +class RenameColumnsInAnswers < ActiveRecord::Migration[4.2] def change rename_column :answers, :comments, :comment_count remove_column :answers, :likes diff --git a/db/migrate/20141201191324_add_fields_to_users.rb b/db/migrate/20141201191324_add_fields_to_users.rb index d6fb9ca8..6ba0d729 100644 --- a/db/migrate/20141201191324_add_fields_to_users.rb +++ b/db/migrate/20141201191324_add_fields_to_users.rb @@ -1,4 +1,4 @@ -class AddFieldsToUsers < ActiveRecord::Migration +class AddFieldsToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :website, :string, default: '', null: false add_column :users, :location, :string, default: '', null: false diff --git a/db/migrate/20141207194424_add_answer_count_to_questions.rb b/db/migrate/20141207194424_add_answer_count_to_questions.rb index 76f139ac..ff3acb3e 100644 --- a/db/migrate/20141207194424_add_answer_count_to_questions.rb +++ b/db/migrate/20141207194424_add_answer_count_to_questions.rb @@ -1,4 +1,4 @@ -class AddAnswerCountToQuestions < ActiveRecord::Migration +class AddAnswerCountToQuestions < ActiveRecord::Migration[4.2] def change add_column :questions, :answer_count, :integer, default: 0, null: false end diff --git a/db/migrate/20141208111714_change_answer_content_column_type.rb b/db/migrate/20141208111714_change_answer_content_column_type.rb index f882ba97..454b897c 100644 --- a/db/migrate/20141208111714_change_answer_content_column_type.rb +++ b/db/migrate/20141208111714_change_answer_content_column_type.rb @@ -1,4 +1,4 @@ -class ChangeAnswerContentColumnType < ActiveRecord::Migration +class ChangeAnswerContentColumnType < ActiveRecord::Migration[4.2] def change change_table :answers do |t| t.change :content, :text diff --git a/db/migrate/20141212193625_create_services.rb b/db/migrate/20141212193625_create_services.rb index 0ee0db34..7426d605 100644 --- a/db/migrate/20141212193625_create_services.rb +++ b/db/migrate/20141212193625_create_services.rb @@ -1,4 +1,4 @@ -class CreateServices < ActiveRecord::Migration +class CreateServices < ActiveRecord::Migration[4.2] def change create_table :services do |t| t.string :type, null: false diff --git a/db/migrate/20141213182609_create_notifications.rb b/db/migrate/20141213182609_create_notifications.rb index 160261a3..a3fa3bcc 100644 --- a/db/migrate/20141213182609_create_notifications.rb +++ b/db/migrate/20141213182609_create_notifications.rb @@ -1,4 +1,4 @@ -class CreateNotifications < ActiveRecord::Migration +class CreateNotifications < ActiveRecord::Migration[4.2] def change create_table :notifications do |t| t.string :target_type diff --git a/db/migrate/20141226115905_add_moderator_to_users.rb b/db/migrate/20141226115905_add_moderator_to_users.rb index 4d8d77f1..1ef1db05 100644 --- a/db/migrate/20141226115905_add_moderator_to_users.rb +++ b/db/migrate/20141226115905_add_moderator_to_users.rb @@ -1,4 +1,4 @@ -class AddModeratorToUsers < ActiveRecord::Migration +class AddModeratorToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :moderator, :boolean, default: false, null: false end diff --git a/db/migrate/20141227130438_create_reports.rb b/db/migrate/20141227130438_create_reports.rb index 257ab53a..ce3c795c 100644 --- a/db/migrate/20141227130438_create_reports.rb +++ b/db/migrate/20141227130438_create_reports.rb @@ -1,4 +1,4 @@ -class CreateReports < ActiveRecord::Migration +class CreateReports < ActiveRecord::Migration[4.2] def change create_table :reports do |t| t.string :type, null: false diff --git a/db/migrate/20141227130545_create_moderation_votes.rb b/db/migrate/20141227130545_create_moderation_votes.rb index 339d2e8a..4e73c91a 100644 --- a/db/migrate/20141227130545_create_moderation_votes.rb +++ b/db/migrate/20141227130545_create_moderation_votes.rb @@ -1,4 +1,4 @@ -class CreateModerationVotes < ActiveRecord::Migration +class CreateModerationVotes < ActiveRecord::Migration[4.2] def change create_table :moderation_votes do |t| t.integer :report_id, null: false diff --git a/db/migrate/20141227130618_create_moderation_comments.rb b/db/migrate/20141227130618_create_moderation_comments.rb index 13741f39..c06d8410 100644 --- a/db/migrate/20141227130618_create_moderation_comments.rb +++ b/db/migrate/20141227130618_create_moderation_comments.rb @@ -1,4 +1,4 @@ -class CreateModerationComments < ActiveRecord::Migration +class CreateModerationComments < ActiveRecord::Migration[4.2] def change create_table :moderation_comments do |t| t.integer :report_id diff --git a/db/migrate/20141228202825_add_deleted_to_reports.rb b/db/migrate/20141228202825_add_deleted_to_reports.rb index e8dbab4a..c8c6d343 100644 --- a/db/migrate/20141228202825_add_deleted_to_reports.rb +++ b/db/migrate/20141228202825_add_deleted_to_reports.rb @@ -1,4 +1,4 @@ -class AddDeletedToReports < ActiveRecord::Migration +class AddDeletedToReports < ActiveRecord::Migration[4.2] def change add_column :reports, :deleted, :boolean, default: false end diff --git a/db/migrate/20141229085904_add_attachment_profile_picture_to_users.rb b/db/migrate/20141229085904_add_attachment_profile_picture_to_users.rb index 5191d385..7c59a2fe 100644 --- a/db/migrate/20141229085904_add_attachment_profile_picture_to_users.rb +++ b/db/migrate/20141229085904_add_attachment_profile_picture_to_users.rb @@ -1,4 +1,4 @@ -class AddAttachmentProfilePictureToUsers < ActiveRecord::Migration +class AddAttachmentProfilePictureToUsers < ActiveRecord::Migration[4.2] def self.up change_table :users do |t| t.attachment :profile_picture diff --git a/db/migrate/20141229105013_add_profile_picture_processing_to_users.rb b/db/migrate/20141229105013_add_profile_picture_processing_to_users.rb index a5f7e85d..0832cc17 100644 --- a/db/migrate/20141229105013_add_profile_picture_processing_to_users.rb +++ b/db/migrate/20141229105013_add_profile_picture_processing_to_users.rb @@ -1,4 +1,4 @@ -class AddProfilePictureProcessingToUsers < ActiveRecord::Migration +class AddProfilePictureProcessingToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :profile_picture_processing, :boolean end diff --git a/db/migrate/20141229133149_add_crop_values_to_users.rb b/db/migrate/20141229133149_add_crop_values_to_users.rb index f3580dcf..8da16793 100644 --- a/db/migrate/20141229133149_add_crop_values_to_users.rb +++ b/db/migrate/20141229133149_add_crop_values_to_users.rb @@ -1,4 +1,4 @@ -class AddCropValuesToUsers < ActiveRecord::Migration +class AddCropValuesToUsers < ActiveRecord::Migration[4.2] def change # this is a ugly hack and will stay until I find a way to pass parameters # to the paperclip Sidekiq worker. oh well. diff --git a/db/migrate/20150102231343_add_supporter_to_users.rb b/db/migrate/20150102231343_add_supporter_to_users.rb index 7f691fa9..e23d5eb2 100644 --- a/db/migrate/20150102231343_add_supporter_to_users.rb +++ b/db/migrate/20150102231343_add_supporter_to_users.rb @@ -1,4 +1,4 @@ -class AddSupporterToUsers < ActiveRecord::Migration +class AddSupporterToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :supporter, :boolean, default: false end diff --git a/db/migrate/20150103200732_add_privacy_options_to_users.rb b/db/migrate/20150103200732_add_privacy_options_to_users.rb index 464589ae..2d7ec342 100644 --- a/db/migrate/20150103200732_add_privacy_options_to_users.rb +++ b/db/migrate/20150103200732_add_privacy_options_to_users.rb @@ -1,4 +1,4 @@ -class AddPrivacyOptionsToUsers < ActiveRecord::Migration +class AddPrivacyOptionsToUsers < ActiveRecord::Migration[4.2] def change %i{ privacy_allow_anonymous_questions diff --git a/db/migrate/20150112210754_add_banned_to_users.rb b/db/migrate/20150112210754_add_banned_to_users.rb index 6b7c65b7..7a857608 100644 --- a/db/migrate/20150112210754_add_banned_to_users.rb +++ b/db/migrate/20150112210754_add_banned_to_users.rb @@ -1,4 +1,4 @@ -class AddBannedToUsers < ActiveRecord::Migration +class AddBannedToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :banned, :boolean, default: false end diff --git a/db/migrate/20150112210755_create_groups.rb b/db/migrate/20150112210755_create_groups.rb index 252ae75b..9c44ef5c 100644 --- a/db/migrate/20150112210755_create_groups.rb +++ b/db/migrate/20150112210755_create_groups.rb @@ -1,4 +1,4 @@ -class CreateGroups < ActiveRecord::Migration +class CreateGroups < ActiveRecord::Migration[4.2] def change create_table :groups do |t| t.integer :user_id, null: false diff --git a/db/migrate/20150125191224_add_blogger_to_users.rb b/db/migrate/20150125191224_add_blogger_to_users.rb index cc860fa3..05edee57 100644 --- a/db/migrate/20150125191224_add_blogger_to_users.rb +++ b/db/migrate/20150125191224_add_blogger_to_users.rb @@ -1,4 +1,4 @@ -class AddBloggerToUsers < ActiveRecord::Migration +class AddBloggerToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :blogger, :boolean, default: :false end diff --git a/db/migrate/20150419201122_add_contributor_to_users.rb b/db/migrate/20150419201122_add_contributor_to_users.rb index b105796b..91a548aa 100644 --- a/db/migrate/20150419201122_add_contributor_to_users.rb +++ b/db/migrate/20150419201122_add_contributor_to_users.rb @@ -1,4 +1,4 @@ -class AddContributorToUsers < ActiveRecord::Migration +class AddContributorToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :contributor, :boolean, default: :false end diff --git a/db/migrate/20150420232305_create_subscriptions.rb b/db/migrate/20150420232305_create_subscriptions.rb index 0fc970cb..72061a84 100644 --- a/db/migrate/20150420232305_create_subscriptions.rb +++ b/db/migrate/20150420232305_create_subscriptions.rb @@ -1,4 +1,4 @@ -class CreateSubscriptions < ActiveRecord::Migration +class CreateSubscriptions < ActiveRecord::Migration[4.2] def change create_table :subscriptions do |t| t.integer :user_id, null: false diff --git a/db/migrate/20150421120557_add_is_active_to_subscriptions.rb b/db/migrate/20150421120557_add_is_active_to_subscriptions.rb index afdfc81e..059d4a7b 100644 --- a/db/migrate/20150421120557_add_is_active_to_subscriptions.rb +++ b/db/migrate/20150421120557_add_is_active_to_subscriptions.rb @@ -1,4 +1,4 @@ -class AddIsActiveToSubscriptions < ActiveRecord::Migration +class AddIsActiveToSubscriptions < ActiveRecord::Migration[4.2] def change add_column :subscriptions, :is_active, :boolean, default: :true end diff --git a/db/migrate/20150422024104_add_reason_to_report.rb b/db/migrate/20150422024104_add_reason_to_report.rb index c3f31615..51531b65 100644 --- a/db/migrate/20150422024104_add_reason_to_report.rb +++ b/db/migrate/20150422024104_add_reason_to_report.rb @@ -1,4 +1,4 @@ -class AddReasonToReport < ActiveRecord::Migration +class AddReasonToReport < ActiveRecord::Migration[4.2] def change add_column :reports, :reason, :string, default: nil end diff --git a/db/migrate/20150422224203_rename_banned_to_permanently_banned_in_users.rb b/db/migrate/20150422224203_rename_banned_to_permanently_banned_in_users.rb index 26d50c78..81954d3f 100644 --- a/db/migrate/20150422224203_rename_banned_to_permanently_banned_in_users.rb +++ b/db/migrate/20150422224203_rename_banned_to_permanently_banned_in_users.rb @@ -1,4 +1,4 @@ -class RenameBannedToPermanentlyBannedInUsers < ActiveRecord::Migration +class RenameBannedToPermanentlyBannedInUsers < ActiveRecord::Migration[4.2] def up rename_column :users, :banned, :permanently_banned end diff --git a/db/migrate/20150422224225_add_ban_reason_and_banned_until_to_users.rb b/db/migrate/20150422224225_add_ban_reason_and_banned_until_to_users.rb index 9e2ac7a4..55936ff8 100644 --- a/db/migrate/20150422224225_add_ban_reason_and_banned_until_to_users.rb +++ b/db/migrate/20150422224225_add_ban_reason_and_banned_until_to_users.rb @@ -1,4 +1,4 @@ -class AddBanReasonAndBannedUntilToUsers < ActiveRecord::Migration +class AddBanReasonAndBannedUntilToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :ban_reason, :string, default: nil add_column :users, :banned_until, :datetime, default: nil diff --git a/db/migrate/20150504004931_create_comment_smiles.rb b/db/migrate/20150504004931_create_comment_smiles.rb index e14cde62..ea86bca2 100644 --- a/db/migrate/20150504004931_create_comment_smiles.rb +++ b/db/migrate/20150504004931_create_comment_smiles.rb @@ -1,4 +1,4 @@ -class CreateCommentSmiles < ActiveRecord::Migration +class CreateCommentSmiles < ActiveRecord::Migration[4.2] def change create_table :comment_smiles do |t| t.integer :user_id diff --git a/db/migrate/20150508144336_add_attachment_profile_header_to_users.rb b/db/migrate/20150508144336_add_attachment_profile_header_to_users.rb index 7cd1ae7e..dff46586 100644 --- a/db/migrate/20150508144336_add_attachment_profile_header_to_users.rb +++ b/db/migrate/20150508144336_add_attachment_profile_header_to_users.rb @@ -1,4 +1,4 @@ -class AddAttachmentProfileHeaderToUsers < ActiveRecord::Migration +class AddAttachmentProfileHeaderToUsers < ActiveRecord::Migration[4.2] def change change_table :users do |t| t.attachment :profile_header diff --git a/db/migrate/20150526031159_add_locale_to_user.rb b/db/migrate/20150526031159_add_locale_to_user.rb index fdea9cfd..76c828c5 100644 --- a/db/migrate/20150526031159_add_locale_to_user.rb +++ b/db/migrate/20150526031159_add_locale_to_user.rb @@ -1,4 +1,4 @@ -class AddLocaleToUser < ActiveRecord::Migration +class AddLocaleToUser < ActiveRecord::Migration[4.2] def change add_column :users, :locale, :string end diff --git a/db/migrate/20150619123121_add_translator_to_users.rb b/db/migrate/20150619123121_add_translator_to_users.rb index 849d5ebc..8f8da49b 100644 --- a/db/migrate/20150619123121_add_translator_to_users.rb +++ b/db/migrate/20150619123121_add_translator_to_users.rb @@ -1,4 +1,4 @@ -class AddTranslatorToUsers < ActiveRecord::Migration +class AddTranslatorToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :translator, :boolean, default: :false end diff --git a/db/migrate/20150704072402_change_default_value_of_locale.rb b/db/migrate/20150704072402_change_default_value_of_locale.rb index 5ee208ff..ed8f0fe8 100644 --- a/db/migrate/20150704072402_change_default_value_of_locale.rb +++ b/db/migrate/20150704072402_change_default_value_of_locale.rb @@ -1,4 +1,4 @@ -class ChangeDefaultValueOfLocale < ActiveRecord::Migration +class ChangeDefaultValueOfLocale < ActiveRecord::Migration[4.2] def change change_column :users, :locale, :string, :default => 'en' end diff --git a/db/migrate/20150721154255_add_confirmable_to_devise.rb b/db/migrate/20150721154255_add_confirmable_to_devise.rb index 0ecd833d..fb435503 100644 --- a/db/migrate/20150721154255_add_confirmable_to_devise.rb +++ b/db/migrate/20150721154255_add_confirmable_to_devise.rb @@ -1,4 +1,4 @@ -class AddConfirmableToDevise < ActiveRecord::Migration +class AddConfirmableToDevise < ActiveRecord::Migration[4.2] def up add_column :users, :confirmation_token, :string add_column :users, :confirmed_at, :datetime diff --git a/db/migrate/20150825073030_create_themes.rb b/db/migrate/20150825073030_create_themes.rb index dec69a9f..9c423709 100644 --- a/db/migrate/20150825073030_create_themes.rb +++ b/db/migrate/20150825073030_create_themes.rb @@ -1,4 +1,4 @@ -class CreateThemes < ActiveRecord::Migration +class CreateThemes < ActiveRecord::Migration[4.2] def change create_table :themes do |t| t.integer :user_id, null: false diff --git a/db/migrate/20150825180139_add_show_foreign_themes_to_users.rb b/db/migrate/20150825180139_add_show_foreign_themes_to_users.rb index 4b7abd69..9d00452e 100644 --- a/db/migrate/20150825180139_add_show_foreign_themes_to_users.rb +++ b/db/migrate/20150825180139_add_show_foreign_themes_to_users.rb @@ -1,4 +1,4 @@ -class AddShowForeignThemesToUsers < ActiveRecord::Migration +class AddShowForeignThemesToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :show_foreign_themes, :boolean, default: true, null: false end diff --git a/db/migrate/20150826224857_add_input_and_outline_to_theme.rb b/db/migrate/20150826224857_add_input_and_outline_to_theme.rb index e7e3cb8c..e4d24e3c 100644 --- a/db/migrate/20150826224857_add_input_and_outline_to_theme.rb +++ b/db/migrate/20150826224857_add_input_and_outline_to_theme.rb @@ -1,4 +1,4 @@ -class AddInputAndOutlineToTheme < ActiveRecord::Migration +class AddInputAndOutlineToTheme < ActiveRecord::Migration[4.2] def change add_column :themes, :input_color, :integer, default: 0xFFFFFF, null: false add_column :themes, :input_text, :integer, default: 0x000000, null: false diff --git a/db/migrate/20160105165913_add_export_fields_to_users.rb b/db/migrate/20160105165913_add_export_fields_to_users.rb index 4b98e6e5..fe4a4fe8 100644 --- a/db/migrate/20160105165913_add_export_fields_to_users.rb +++ b/db/migrate/20160105165913_add_export_fields_to_users.rb @@ -1,4 +1,4 @@ -class AddExportFieldsToUsers < ActiveRecord::Migration +class AddExportFieldsToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :export_url, :string add_column :users, :export_processing, :boolean, default: false, null: false diff --git a/db/schema.rb b/db/schema.rb index 79959331..439625e6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,3 @@ -# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -11,276 +10,264 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160105165913) do +ActiveRecord::Schema.define(version: 2016_01_05_165913) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" - create_table "answers", force: :cascade do |t| - t.text "content" - t.integer "question_id" - t.integer "comment_count", default: 0, null: false - t.integer "user_id" + create_table "answers", id: :serial, force: :cascade do |t| + t.text "content" + t.integer "question_id" + t.integer "comment_count", default: 0, null: false + t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "smile_count", default: 0, null: false + t.integer "smile_count", default: 0, null: false + t.index ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at" end - add_index "answers", ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at", using: :btree - - create_table "comment_smiles", force: :cascade do |t| - t.integer "user_id" - t.integer "comment_id" + create_table "comment_smiles", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.integer "comment_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["comment_id"], name: "index_comment_smiles_on_comment_id" + t.index ["user_id", "comment_id"], name: "index_comment_smiles_on_user_id_and_comment_id", unique: true + t.index ["user_id"], name: "index_comment_smiles_on_user_id" end - add_index "comment_smiles", ["comment_id"], name: "index_comment_smiles_on_comment_id", using: :btree - add_index "comment_smiles", ["user_id", "comment_id"], name: "index_comment_smiles_on_user_id_and_comment_id", unique: true, using: :btree - add_index "comment_smiles", ["user_id"], name: "index_comment_smiles_on_user_id", using: :btree - - create_table "comments", force: :cascade do |t| - t.string "content" - t.integer "answer_id" - t.integer "user_id" + create_table "comments", id: :serial, force: :cascade do |t| + t.string "content" + t.integer "answer_id" + t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "smile_count", default: 0, null: false + t.integer "smile_count", default: 0, null: false + t.index ["user_id", "created_at"], name: "index_comments_on_user_id_and_created_at" end - add_index "comments", ["user_id", "created_at"], name: "index_comments_on_user_id_and_created_at", using: :btree + create_table "group_members", id: :serial, force: :cascade do |t| + t.integer "group_id", null: false + t.integer "user_id", null: false + t.datetime "created_at" + t.datetime "updated_at" + t.index ["group_id", "user_id"], name: "index_group_members_on_group_id_and_user_id", unique: true + t.index ["group_id"], name: "index_group_members_on_group_id" + t.index ["user_id"], name: "index_group_members_on_user_id" + end - create_table "group_members", force: :cascade do |t| - t.integer "group_id", null: false - t.integer "user_id", null: false + create_table "groups", id: :serial, force: :cascade do |t| + t.integer "user_id", null: false + t.string "name" + t.string "display_name" + t.boolean "private", default: true + t.datetime "created_at" + t.datetime "updated_at" + t.index ["name"], name: "index_groups_on_name" + t.index ["user_id", "name"], name: "index_groups_on_user_id_and_name", unique: true + t.index ["user_id"], name: "index_groups_on_user_id" + end + + create_table "inboxes", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.integer "question_id" + t.boolean "new" t.datetime "created_at" t.datetime "updated_at" end - add_index "group_members", ["group_id", "user_id"], name: "index_group_members_on_group_id_and_user_id", unique: true, using: :btree - add_index "group_members", ["group_id"], name: "index_group_members_on_group_id", using: :btree - add_index "group_members", ["user_id"], name: "index_group_members_on_user_id", using: :btree + create_table "moderation_comments", id: :serial, force: :cascade do |t| + t.integer "report_id" + t.integer "user_id" + t.string "content" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["user_id", "created_at"], name: "index_moderation_comments_on_user_id_and_created_at" + end - create_table "groups", force: :cascade do |t| - t.integer "user_id", null: false - t.string "name" - t.string "display_name" - t.boolean "private", default: true + create_table "moderation_votes", id: :serial, force: :cascade do |t| + t.integer "report_id", null: false + t.integer "user_id", null: false + t.boolean "upvote", default: false, null: false + t.datetime "created_at" + t.datetime "updated_at" + t.index ["report_id"], name: "index_moderation_votes_on_report_id" + t.index ["user_id", "report_id"], name: "index_moderation_votes_on_user_id_and_report_id", unique: true + t.index ["user_id"], name: "index_moderation_votes_on_user_id" + end + + create_table "notifications", id: :serial, force: :cascade do |t| + t.string "target_type" + t.integer "target_id" + t.integer "recipient_id" + t.boolean "new" t.datetime "created_at" t.datetime "updated_at" end - add_index "groups", ["name"], name: "index_groups_on_name", using: :btree - add_index "groups", ["user_id", "name"], name: "index_groups_on_user_id_and_name", unique: true, using: :btree - add_index "groups", ["user_id"], name: "index_groups_on_user_id", using: :btree + create_table "questions", id: :serial, force: :cascade do |t| + t.string "content" + t.boolean "author_is_anonymous" + t.string "author_name" + t.string "author_email" + t.integer "user_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "answer_count", default: 0, null: false + t.index ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at" + end - create_table "inboxes", force: :cascade do |t| - t.integer "user_id" - t.integer "question_id" - t.boolean "new" + create_table "relationships", id: :serial, force: :cascade do |t| + t.integer "source_id" + t.integer "target_id" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["source_id", "target_id"], name: "index_relationships_on_source_id_and_target_id", unique: true + t.index ["source_id"], name: "index_relationships_on_source_id" + t.index ["target_id"], name: "index_relationships_on_target_id" + end + + create_table "reports", id: :serial, force: :cascade do |t| + t.string "type", null: false + t.integer "target_id", null: false + t.integer "user_id", null: false + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "deleted", default: false + t.string "reason" + end + + create_table "services", id: :serial, force: :cascade do |t| + t.string "type", null: false + t.integer "user_id", null: false + t.string "uid" + t.string "access_token" + t.string "access_secret" + t.string "nickname" t.datetime "created_at" t.datetime "updated_at" end - create_table "moderation_comments", force: :cascade do |t| - t.integer "report_id" - t.integer "user_id" - t.string "content" + create_table "smiles", id: :serial, force: :cascade do |t| + t.integer "user_id" + t.integer "answer_id" t.datetime "created_at" t.datetime "updated_at" + t.index ["answer_id"], name: "index_smiles_on_answer_id" + t.index ["user_id", "answer_id"], name: "index_smiles_on_user_id_and_answer_id", unique: true + t.index ["user_id"], name: "index_smiles_on_user_id" end - add_index "moderation_comments", ["user_id", "created_at"], name: "index_moderation_comments_on_user_id_and_created_at", using: :btree - - create_table "moderation_votes", force: :cascade do |t| - t.integer "report_id", null: false - t.integer "user_id", null: false - t.boolean "upvote", default: false, null: false - t.datetime "created_at" - t.datetime "updated_at" + create_table "subscriptions", id: :serial, force: :cascade do |t| + t.integer "user_id", null: false + t.integer "answer_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "is_active", default: true end - add_index "moderation_votes", ["report_id"], name: "index_moderation_votes_on_report_id", using: :btree - add_index "moderation_votes", ["user_id", "report_id"], name: "index_moderation_votes_on_user_id_and_report_id", unique: true, using: :btree - add_index "moderation_votes", ["user_id"], name: "index_moderation_votes_on_user_id", using: :btree - - create_table "notifications", force: :cascade do |t| - t.string "target_type" - t.integer "target_id" - t.integer "recipient_id" - t.boolean "new" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "questions", force: :cascade do |t| - t.string "content" - t.boolean "author_is_anonymous" - t.string "author_name" - t.string "author_email" - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "answer_count", default: 0, null: false - end - - add_index "questions", ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at", using: :btree - - create_table "relationships", force: :cascade do |t| - t.integer "source_id" - t.integer "target_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "relationships", ["source_id", "target_id"], name: "index_relationships_on_source_id_and_target_id", unique: true, using: :btree - add_index "relationships", ["source_id"], name: "index_relationships_on_source_id", using: :btree - add_index "relationships", ["target_id"], name: "index_relationships_on_target_id", using: :btree - - create_table "reports", force: :cascade do |t| - t.string "type", null: false - t.integer "target_id", null: false - t.integer "user_id", null: false - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "deleted", default: false - t.string "reason" - end - - create_table "services", force: :cascade do |t| - t.string "type", null: false - t.integer "user_id", null: false - t.string "uid" - t.string "access_token" - t.string "access_secret" - t.string "nickname" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "smiles", force: :cascade do |t| - t.integer "user_id" - t.integer "answer_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "smiles", ["answer_id"], name: "index_smiles_on_answer_id", using: :btree - add_index "smiles", ["user_id", "answer_id"], name: "index_smiles_on_user_id_and_answer_id", unique: true, using: :btree - add_index "smiles", ["user_id"], name: "index_smiles_on_user_id", using: :btree - - create_table "subscriptions", force: :cascade do |t| - t.integer "user_id", null: false - t.integer "answer_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "is_active", default: true - end - - create_table "themes", force: :cascade do |t| - t.integer "user_id", null: false - t.integer "primary_color", default: 6174129 - t.integer "primary_text", default: 16777215 - t.integer "danger_color", default: 16711737 - t.integer "danger_text", default: 16777215 - t.integer "success_color", default: 4175384 - t.integer "success_text", default: 16777215 - t.integer "warning_color", default: 16741656 - t.integer "warning_text", default: 16777215 - t.integer "info_color", default: 10048699 - t.integer "info_text", default: 16777215 - t.integer "default_color", default: 2236962 - t.integer "default_text", default: 15658734 - t.integer "panel_color", default: 16382457 - t.integer "panel_text", default: 1381653 - t.integer "link_color", default: 6174129 - t.integer "background_color", default: 16777215 - t.integer "background_text", default: 2236962 - t.integer "background_muted", default: 12303291 - t.string "css_file_name" - t.string "css_content_type" - t.integer "css_file_size" + create_table "themes", id: :serial, force: :cascade do |t| + t.integer "user_id", null: false + t.integer "primary_color", default: 6174129 + t.integer "primary_text", default: 16777215 + t.integer "danger_color", default: 16711737 + t.integer "danger_text", default: 16777215 + t.integer "success_color", default: 4175384 + t.integer "success_text", default: 16777215 + t.integer "warning_color", default: 16741656 + t.integer "warning_text", default: 16777215 + t.integer "info_color", default: 10048699 + t.integer "info_text", default: 16777215 + t.integer "default_color", default: 2236962 + t.integer "default_text", default: 15658734 + t.integer "panel_color", default: 16382457 + t.integer "panel_text", default: 1381653 + t.integer "link_color", default: 6174129 + t.integer "background_color", default: 16777215 + t.integer "background_text", default: 2236962 + t.integer "background_muted", default: 12303291 + t.string "css_file_name" + t.string "css_content_type" + t.integer "css_file_size" t.datetime "css_updated_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "input_color", default: 16777215, null: false - t.integer "input_text", default: 0, null: false - t.integer "outline_color", default: 6174129, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "input_color", default: 16777215, null: false + t.integer "input_text", default: 0, null: false + t.integer "outline_color", default: 6174129, null: false + t.index ["user_id", "created_at"], name: "index_themes_on_user_id_and_created_at" end - add_index "themes", ["user_id", "created_at"], name: "index_themes_on_user_id_and_created_at", using: :btree - - 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" + create_table "users", id: :serial, force: :cascade 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" 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 "current_sign_in_ip" + t.string "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" - t.string "screen_name" - t.integer "friend_count", default: 0, null: false - t.integer "follower_count", default: 0, null: false - t.integer "asked_count", default: 0, null: false - t.integer "answered_count", default: 0, null: false - t.integer "commented_count", default: 0, null: false - t.string "display_name" - t.integer "smiled_count", default: 0, null: false - t.boolean "admin", default: false, null: false - t.string "motivation_header", default: "", null: false - t.string "website", default: "", null: false - t.string "location", default: "", null: false - t.text "bio", default: "", null: false - t.boolean "moderator", default: false, null: false - t.string "profile_picture_file_name" - t.string "profile_picture_content_type" - t.integer "profile_picture_file_size" + t.string "screen_name" + t.integer "friend_count", default: 0, null: false + t.integer "follower_count", default: 0, null: false + t.integer "asked_count", default: 0, null: false + t.integer "answered_count", default: 0, null: false + t.integer "commented_count", default: 0, null: false + t.string "display_name" + t.integer "smiled_count", default: 0, null: false + t.boolean "admin", default: false, null: false + t.string "motivation_header", default: "", null: false + t.string "website", default: "", null: false + t.string "location", default: "", null: false + t.text "bio", default: "", null: false + t.boolean "moderator", default: false, null: false + t.string "profile_picture_file_name" + t.string "profile_picture_content_type" + t.integer "profile_picture_file_size" t.datetime "profile_picture_updated_at" - t.boolean "profile_picture_processing" - t.integer "crop_x" - t.integer "crop_y" - t.integer "crop_w" - t.integer "crop_h" - t.boolean "supporter", default: false - t.boolean "privacy_allow_anonymous_questions", default: true - t.boolean "privacy_allow_public_timeline", default: true - t.boolean "privacy_allow_stranger_answers", default: true - t.boolean "privacy_show_in_search", default: true - t.boolean "permanently_banned", default: false - t.boolean "blogger", default: false - t.boolean "contributor", default: false - t.string "ban_reason" + t.boolean "profile_picture_processing" + t.integer "crop_x" + t.integer "crop_y" + t.integer "crop_w" + t.integer "crop_h" + t.boolean "supporter", default: false + t.boolean "privacy_allow_anonymous_questions", default: true + t.boolean "privacy_allow_public_timeline", default: true + t.boolean "privacy_allow_stranger_answers", default: true + t.boolean "privacy_show_in_search", default: true + t.boolean "permanently_banned", default: false + t.boolean "blogger", default: false + t.boolean "contributor", default: false + t.string "ban_reason" t.datetime "banned_until" - t.integer "comment_smiled_count", default: 0, null: false - t.string "profile_header_file_name" - t.string "profile_header_content_type" - t.integer "profile_header_file_size" + t.integer "comment_smiled_count", default: 0, null: false + t.string "profile_header_file_name" + t.string "profile_header_content_type" + t.integer "profile_header_file_size" t.datetime "profile_header_updated_at" - t.boolean "profile_header_processing" - t.integer "crop_h_x" - t.integer "crop_h_y" - t.integer "crop_h_w" - t.integer "crop_h_h" - t.string "locale", default: "en" - t.boolean "translator", default: false - t.string "confirmation_token" + t.boolean "profile_header_processing" + t.integer "crop_h_x" + t.integer "crop_h_y" + t.integer "crop_h_w" + t.integer "crop_h_h" + t.string "locale", default: "en" + t.boolean "translator", default: false + t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.string "unconfirmed_email" - t.boolean "show_foreign_themes", default: true, null: false - t.string "export_url" - t.boolean "export_processing", default: false, null: false + t.string "unconfirmed_email" + t.boolean "show_foreign_themes", default: true, null: false + t.string "export_url" + t.boolean "export_processing", default: false, null: false t.datetime "export_created_at" + 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 + t.index ["screen_name"], name: "index_users_on_screen_name", unique: true end - add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree - add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree - add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree - add_index "users", ["screen_name"], name: "index_users_on_screen_name", unique: true, using: :btree - end