From b61423750440f08f8c6a425ab2fb2692df8a7dc9 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Mon, 7 Aug 2017 15:20:15 +0200 Subject: [PATCH] Make all current migrations Rails 4.2 based --- db/migrate/0000_create_schema.rb | 2 +- db/migrate/20130207231310_add_facebook_id_to_post.rb | 2 +- db/migrate/20130404211624_fix_default_image_url_from_profile.rb | 2 +- db/migrate/20130429073928_add_tweet_id_to_post.rb | 2 +- db/migrate/20130608171134_add_open_graph_cache.rb | 2 +- .../20130613203350_remove_limit_from_root_guid_in_posts.rb | 2 +- .../20130717104359_migrate_activity_stream_to_status_message.rb | 2 +- db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb | 2 +- db/migrate/20131017093025_create_post_reports.rb | 2 +- db/migrate/20131213171804_create_simple_captcha_data.rb | 2 +- db/migrate/20140121132816_add_post_type_to_post_report.rb | 2 +- db/migrate/20140214104217_rename_post_report_to_report.rb | 2 +- db/migrate/20140222162826_devise_add_lastseenable_user.rb | 2 +- db/migrate/20140308154022_create_polls.rb | 2 +- db/migrate/20140422134050_rename_post_columns_to_item.rb | 2 +- db/migrate/20140422134627_change_user_id_type_to_integer.rb | 2 +- ...taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb | 2 +- db/migrate/20140801101230_create_chat_contacts.rb | 2 +- db/migrate/20140801101352_create_chat_fragments.rb | 2 +- .../20140824230505_add_completed_at_to_account_deletions.rb | 2 +- db/migrate/20140826165533_increase_simple_captcha_limit.rb | 2 +- db/migrate/20140906192846_fix_open_graph_data.rb | 2 +- db/migrate/20141001162851_add_remove_after_to_users.rb | 2 +- db/migrate/20141007003922_add_chat_enabled_to_aspects.rb | 2 +- db/migrate/20141024170120_create_chat_offline_messages.rb | 2 +- .../20141209041241_drop_open_graph_caches_with_invalid_urls.rb | 2 +- db/migrate/20141216213423_purge_orphan_conversations.rb | 2 +- db/migrate/20141227120907_add_export_to_user.rb | 2 +- db/migrate/20141230214830_user_pref_strip_exif.rb | 2 +- db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb | 2 +- db/migrate/20150209230946_disable_mail_for_closed_account.rb | 2 +- db/migrate/20150220001357_add_photos_export_to_user.rb | 2 +- ...150403192408_remove_deleted_aspects_from_auto_follow_back.rb | 2 +- db/migrate/20150403212139_fix_wrong_only_sharing.rb | 2 +- db/migrate/20150523004437_enable_color_themes.rb | 2 +- db/migrate/20150531005120_cleanup_default_avatars.rb | 2 +- db/migrate/20150607143809_fix_photo_public_flag.rb | 2 +- db/migrate/20150613202109_create_o_auth_applications.rb | 2 +- db/migrate/20150630221004_add_public_to_profiles.rb | 2 +- db/migrate/20150708153926_create_authorizations.rb | 2 +- db/migrate/20150708153928_create_o_auth_access_tokens.rb | 2 +- db/migrate/20150714055110_create_id_tokens.rb | 2 +- db/migrate/20150724152052_remove_favorites_from_posts.rb | 2 +- .../20150731123113_create_pairwise_pseudonymous_identifiers.rb | 2 +- db/migrate/20150731123114_add_status_to_pods.rb | 2 +- db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb | 2 +- db/migrate/20151003142048_update_report_item_types.rb | 2 +- db/migrate/20151210213023_remove_signatures_from_relayables.rb | 2 +- db/migrate/20160124234712_extend_pods.rb | 2 +- db/migrate/20160225232049_link_share_visibilities_with_user.rb | 2 +- db/migrate/20160302025129_cleanup_aspect_visibility.rb | 2 +- db/migrate/20160307142216_cleanup_handles.rb | 2 +- .../20160327103605_add_author_id_index_to_participations.rb | 2 +- .../20160509232726_cleanup_duplicates_and_add_unique_indexes.rb | 2 +- .../20160531170531_remove_duplicate_aspect_visibilities.rb | 2 +- db/migrate/20160618033455_cleanup_participations.rb | 2 +- db/migrate/20160720212620_create_signature_tables.rb | 2 +- db/migrate/20160802212635_cleanup_posts_table.rb | 2 +- db/migrate/20160807212443_participation_counter.rb | 2 +- .../20160810230114_cleanup_invitation_columns_from_users.rb | 2 +- db/migrate/20160813115514_remove_id_tokens.rb | 2 +- ...2739_remove_started_sharing_notifications_without_contact.rb | 2 +- db/migrate/20160829170244_add_post_default_to_aspects.rb | 2 +- db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb | 2 +- db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb | 2 +- db/migrate/20160906225138_fix_photos_share_visibilities.rb | 2 +- db/migrate/20161015174300_remove_empty_pod.rb | 2 +- db/migrate/20161024231443_add_scheduled_check_to_pod.rb | 2 +- db/migrate/20161107100840_polymorphic_mentions.rb | 2 +- db/migrate/20170430022507_remove_message_signature.rb | 2 +- 70 files changed, 70 insertions(+), 70 deletions(-) diff --git a/db/migrate/0000_create_schema.rb b/db/migrate/0000_create_schema.rb index 97fcc3da6..900b8a8e8 100644 --- a/db/migrate/0000_create_schema.rb +++ b/db/migrate/0000_create_schema.rb @@ -1,4 +1,4 @@ -class CreateSchema < ActiveRecord::Migration +class CreateSchema < ActiveRecord::Migration[4.2] create_table "account_deletions", :force => true do |t| t.string "diaspora_handle" t.integer "person_id" diff --git a/db/migrate/20130207231310_add_facebook_id_to_post.rb b/db/migrate/20130207231310_add_facebook_id_to_post.rb index df888dcca..f559f46a7 100644 --- a/db/migrate/20130207231310_add_facebook_id_to_post.rb +++ b/db/migrate/20130207231310_add_facebook_id_to_post.rb @@ -1,4 +1,4 @@ -class AddFacebookIdToPost < ActiveRecord::Migration +class AddFacebookIdToPost < ActiveRecord::Migration[4.2] def change add_column :posts, :facebook_id, :string end diff --git a/db/migrate/20130404211624_fix_default_image_url_from_profile.rb b/db/migrate/20130404211624_fix_default_image_url_from_profile.rb index 4749728fc..80618b8a5 100644 --- a/db/migrate/20130404211624_fix_default_image_url_from_profile.rb +++ b/db/migrate/20130404211624_fix_default_image_url_from_profile.rb @@ -1,4 +1,4 @@ -class FixDefaultImageUrlFromProfile < ActiveRecord::Migration +class FixDefaultImageUrlFromProfile < ActiveRecord::Migration[4.2] def up execute("UPDATE profiles SET image_url = REPLACE(image_url, 'images', 'assets'), image_url_small = REPLACE(image_url_small, 'images', 'assets'), image_url_medium = REPLACE(image_url_medium, 'images', 'assets') WHERE image_url LIKE '%images/user/default.png';") end diff --git a/db/migrate/20130429073928_add_tweet_id_to_post.rb b/db/migrate/20130429073928_add_tweet_id_to_post.rb index f62c2b964..7f9c5808f 100644 --- a/db/migrate/20130429073928_add_tweet_id_to_post.rb +++ b/db/migrate/20130429073928_add_tweet_id_to_post.rb @@ -1,4 +1,4 @@ -class AddTweetIdToPost < ActiveRecord::Migration +class AddTweetIdToPost < ActiveRecord::Migration[4.2] def change add_column :posts, :tweet_id, :string add_index :posts, ['tweet_id'], :length => { "tweet_id" => 191 } diff --git a/db/migrate/20130608171134_add_open_graph_cache.rb b/db/migrate/20130608171134_add_open_graph_cache.rb index ccf4aecc4..ac4826c1f 100644 --- a/db/migrate/20130608171134_add_open_graph_cache.rb +++ b/db/migrate/20130608171134_add_open_graph_cache.rb @@ -1,4 +1,4 @@ -class AddOpenGraphCache < ActiveRecord::Migration +class AddOpenGraphCache < ActiveRecord::Migration[4.2] def up create_table :open_graph_caches do |t| t.string :title diff --git a/db/migrate/20130613203350_remove_limit_from_root_guid_in_posts.rb b/db/migrate/20130613203350_remove_limit_from_root_guid_in_posts.rb index 97b653a10..2e88f0a1e 100644 --- a/db/migrate/20130613203350_remove_limit_from_root_guid_in_posts.rb +++ b/db/migrate/20130613203350_remove_limit_from_root_guid_in_posts.rb @@ -1,4 +1,4 @@ -class RemoveLimitFromRootGuidInPosts < ActiveRecord::Migration +class RemoveLimitFromRootGuidInPosts < ActiveRecord::Migration[4.2] def up remove_index 'posts', :name => 'index_posts_on_root_guid' remove_index 'posts', :name => 'index_posts_on_author_id_and_root_guid' diff --git a/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb b/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb index 678cc8410..c37d8dd3e 100644 --- a/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb +++ b/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb @@ -1,4 +1,4 @@ -class MigrateActivityStreamToStatusMessage < ActiveRecord::Migration +class MigrateActivityStreamToStatusMessage < ActiveRecord::Migration[4.2] class Post < ApplicationRecord; self.inheritance_column = false; end def up posts_stream_photos = Post.where(type: 'ActivityStreams::Photo') diff --git a/db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb b/db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb index e8ddb4877..638157388 100644 --- a/db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb +++ b/db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb @@ -1,4 +1,4 @@ -class AddTumblrPostIdsToPosts < ActiveRecord::Migration +class AddTumblrPostIdsToPosts < ActiveRecord::Migration[4.2] def change add_column :posts, :tumblr_ids, :text end diff --git a/db/migrate/20131017093025_create_post_reports.rb b/db/migrate/20131017093025_create_post_reports.rb index bb68ff896..5ccceca03 100644 --- a/db/migrate/20131017093025_create_post_reports.rb +++ b/db/migrate/20131017093025_create_post_reports.rb @@ -1,4 +1,4 @@ -class CreatePostReports < ActiveRecord::Migration +class CreatePostReports < ActiveRecord::Migration[4.2] def change create_table :post_reports do |t| t.integer :post_id, :null => false diff --git a/db/migrate/20131213171804_create_simple_captcha_data.rb b/db/migrate/20131213171804_create_simple_captcha_data.rb index 4573b2056..9068aec00 100644 --- a/db/migrate/20131213171804_create_simple_captcha_data.rb +++ b/db/migrate/20131213171804_create_simple_captcha_data.rb @@ -1,4 +1,4 @@ -class CreateSimpleCaptchaData < ActiveRecord::Migration +class CreateSimpleCaptchaData < ActiveRecord::Migration[4.2] def self.up create_table :simple_captcha_data do |t| t.string :key, :limit => 40 diff --git a/db/migrate/20140121132816_add_post_type_to_post_report.rb b/db/migrate/20140121132816_add_post_type_to_post_report.rb index 4d6686eea..766efb9b9 100644 --- a/db/migrate/20140121132816_add_post_type_to_post_report.rb +++ b/db/migrate/20140121132816_add_post_type_to_post_report.rb @@ -1,4 +1,4 @@ -class AddPostTypeToPostReport < ActiveRecord::Migration +class AddPostTypeToPostReport < ActiveRecord::Migration[4.2] def change add_column :post_reports, :post_type, :string, :null => false, :after => :post_id, :default => 'post' change_column_default :post_reports, :post_type, nil diff --git a/db/migrate/20140214104217_rename_post_report_to_report.rb b/db/migrate/20140214104217_rename_post_report_to_report.rb index 2d477491e..3b02b0aec 100644 --- a/db/migrate/20140214104217_rename_post_report_to_report.rb +++ b/db/migrate/20140214104217_rename_post_report_to_report.rb @@ -1,4 +1,4 @@ -class RenamePostReportToReport < ActiveRecord::Migration +class RenamePostReportToReport < ActiveRecord::Migration[4.2] def self.up rename_table :post_reports, :reports end diff --git a/db/migrate/20140222162826_devise_add_lastseenable_user.rb b/db/migrate/20140222162826_devise_add_lastseenable_user.rb index 5c62814af..c0a5428d4 100644 --- a/db/migrate/20140222162826_devise_add_lastseenable_user.rb +++ b/db/migrate/20140222162826_devise_add_lastseenable_user.rb @@ -1,4 +1,4 @@ -class DeviseAddLastseenableUser < ActiveRecord::Migration +class DeviseAddLastseenableUser < ActiveRecord::Migration[4.2] def self.up add_column :users, :last_seen, :datetime User.find_each do |user| diff --git a/db/migrate/20140308154022_create_polls.rb b/db/migrate/20140308154022_create_polls.rb index f2d84ba6a..c9dd794a2 100644 --- a/db/migrate/20140308154022_create_polls.rb +++ b/db/migrate/20140308154022_create_polls.rb @@ -1,4 +1,4 @@ -class CreatePolls < ActiveRecord::Migration +class CreatePolls < ActiveRecord::Migration[4.2] def up create_table :polls do |t| t.string :question, :null => false diff --git a/db/migrate/20140422134050_rename_post_columns_to_item.rb b/db/migrate/20140422134050_rename_post_columns_to_item.rb index 4550eacd7..986326152 100644 --- a/db/migrate/20140422134050_rename_post_columns_to_item.rb +++ b/db/migrate/20140422134050_rename_post_columns_to_item.rb @@ -1,4 +1,4 @@ -class RenamePostColumnsToItem < ActiveRecord::Migration +class RenamePostColumnsToItem < ActiveRecord::Migration[4.2] def up rename_column :reports, :post_id, :item_id rename_column :reports, :post_type, :item_type diff --git a/db/migrate/20140422134627_change_user_id_type_to_integer.rb b/db/migrate/20140422134627_change_user_id_type_to_integer.rb index 1f4918e8b..019cef962 100644 --- a/db/migrate/20140422134627_change_user_id_type_to_integer.rb +++ b/db/migrate/20140422134627_change_user_id_type_to_integer.rb @@ -1,4 +1,4 @@ -class ChangeUserIdTypeToInteger < ActiveRecord::Migration +class ChangeUserIdTypeToInteger < ActiveRecord::Migration[4.2] def up remove_column :reports, :user_id add_column :reports, :user_id, :integer, :null => false, :default => 1 diff --git a/db/migrate/20140601102543_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb b/db/migrate/20140601102543_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb index 8edb50807..5a3f71a25 100644 --- a/db/migrate/20140601102543_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +++ b/db/migrate/20140601102543_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb @@ -1,5 +1,5 @@ # This migration comes from acts_as_taggable_on_engine (originally 3) -class AddTaggingsCounterCacheToTags < ActiveRecord::Migration +class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2] def self.up add_column :tags, :taggings_count, :integer, default: 0 diff --git a/db/migrate/20140801101230_create_chat_contacts.rb b/db/migrate/20140801101230_create_chat_contacts.rb index 718b5ae8d..b50afcece 100644 --- a/db/migrate/20140801101230_create_chat_contacts.rb +++ b/db/migrate/20140801101230_create_chat_contacts.rb @@ -1,4 +1,4 @@ -class CreateChatContacts < ActiveRecord::Migration +class CreateChatContacts < ActiveRecord::Migration[4.2] def up create_table :chat_contacts do |t| t.integer :user_id, null: false diff --git a/db/migrate/20140801101352_create_chat_fragments.rb b/db/migrate/20140801101352_create_chat_fragments.rb index 0fbdc40ee..0457abf22 100644 --- a/db/migrate/20140801101352_create_chat_fragments.rb +++ b/db/migrate/20140801101352_create_chat_fragments.rb @@ -1,4 +1,4 @@ -class CreateChatFragments < ActiveRecord::Migration +class CreateChatFragments < ActiveRecord::Migration[4.2] def up create_table :chat_fragments do |t| t.integer :user_id, null: false diff --git a/db/migrate/20140824230505_add_completed_at_to_account_deletions.rb b/db/migrate/20140824230505_add_completed_at_to_account_deletions.rb index 9b2af8c6a..2c701dcac 100644 --- a/db/migrate/20140824230505_add_completed_at_to_account_deletions.rb +++ b/db/migrate/20140824230505_add_completed_at_to_account_deletions.rb @@ -1,4 +1,4 @@ -class AddCompletedAtToAccountDeletions < ActiveRecord::Migration +class AddCompletedAtToAccountDeletions < ActiveRecord::Migration[4.2] def change add_column :account_deletions, :completed_at, :datetime end diff --git a/db/migrate/20140826165533_increase_simple_captcha_limit.rb b/db/migrate/20140826165533_increase_simple_captcha_limit.rb index b4d43dd64..c0d7d4827 100644 --- a/db/migrate/20140826165533_increase_simple_captcha_limit.rb +++ b/db/migrate/20140826165533_increase_simple_captcha_limit.rb @@ -1,4 +1,4 @@ -class IncreaseSimpleCaptchaLimit < ActiveRecord::Migration +class IncreaseSimpleCaptchaLimit < ActiveRecord::Migration[4.2] def self.up change_column :simple_captcha_data, :value, :string, :limit => 12 end diff --git a/db/migrate/20140906192846_fix_open_graph_data.rb b/db/migrate/20140906192846_fix_open_graph_data.rb index 54959931d..5aec2b531 100644 --- a/db/migrate/20140906192846_fix_open_graph_data.rb +++ b/db/migrate/20140906192846_fix_open_graph_data.rb @@ -1,4 +1,4 @@ -class FixOpenGraphData < ActiveRecord::Migration +class FixOpenGraphData < ActiveRecord::Migration[4.2] def self.up change_column :open_graph_caches, :url, :text change_column :open_graph_caches, :image, :text diff --git a/db/migrate/20141001162851_add_remove_after_to_users.rb b/db/migrate/20141001162851_add_remove_after_to_users.rb index c63b916b6..8169e5e8b 100644 --- a/db/migrate/20141001162851_add_remove_after_to_users.rb +++ b/db/migrate/20141001162851_add_remove_after_to_users.rb @@ -1,4 +1,4 @@ -class AddRemoveAfterToUsers < ActiveRecord::Migration +class AddRemoveAfterToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :remove_after, :datetime end diff --git a/db/migrate/20141007003922_add_chat_enabled_to_aspects.rb b/db/migrate/20141007003922_add_chat_enabled_to_aspects.rb index ba4fd31fc..a5e300b94 100644 --- a/db/migrate/20141007003922_add_chat_enabled_to_aspects.rb +++ b/db/migrate/20141007003922_add_chat_enabled_to_aspects.rb @@ -1,4 +1,4 @@ -class AddChatEnabledToAspects < ActiveRecord::Migration +class AddChatEnabledToAspects < ActiveRecord::Migration[4.2] def self.up add_column :aspects, :chat_enabled, :boolean, default: false end diff --git a/db/migrate/20141024170120_create_chat_offline_messages.rb b/db/migrate/20141024170120_create_chat_offline_messages.rb index 8c30101b0..5c31e632d 100644 --- a/db/migrate/20141024170120_create_chat_offline_messages.rb +++ b/db/migrate/20141024170120_create_chat_offline_messages.rb @@ -1,4 +1,4 @@ -class CreateChatOfflineMessages < ActiveRecord::Migration +class CreateChatOfflineMessages < ActiveRecord::Migration[4.2] def self.up create_table :chat_offline_messages do |t| t.string :from, :null => false diff --git a/db/migrate/20141209041241_drop_open_graph_caches_with_invalid_urls.rb b/db/migrate/20141209041241_drop_open_graph_caches_with_invalid_urls.rb index bfbfab884..1c2b3dbf7 100644 --- a/db/migrate/20141209041241_drop_open_graph_caches_with_invalid_urls.rb +++ b/db/migrate/20141209041241_drop_open_graph_caches_with_invalid_urls.rb @@ -1,4 +1,4 @@ -class DropOpenGraphCachesWithInvalidUrls < ActiveRecord::Migration +class DropOpenGraphCachesWithInvalidUrls < ActiveRecord::Migration[4.2] def up OpenGraphCache.where(url: 'http://').delete_all end diff --git a/db/migrate/20141216213423_purge_orphan_conversations.rb b/db/migrate/20141216213423_purge_orphan_conversations.rb index c5eb90bff..45e6f5856 100644 --- a/db/migrate/20141216213423_purge_orphan_conversations.rb +++ b/db/migrate/20141216213423_purge_orphan_conversations.rb @@ -1,4 +1,4 @@ -class PurgeOrphanConversations < ActiveRecord::Migration +class PurgeOrphanConversations < ActiveRecord::Migration[4.2] def up Conversation.where(id: Conversation.joins("LEFT JOIN conversation_visibilities ON conversation_visibilities.conversation_id = conversations.id") .group('conversations.id') diff --git a/db/migrate/20141227120907_add_export_to_user.rb b/db/migrate/20141227120907_add_export_to_user.rb index 376d5fe36..ef1779f76 100644 --- a/db/migrate/20141227120907_add_export_to_user.rb +++ b/db/migrate/20141227120907_add_export_to_user.rb @@ -1,4 +1,4 @@ -class AddExportToUser < ActiveRecord::Migration +class AddExportToUser < ActiveRecord::Migration[4.2] def change add_column :users, :export, :string add_column :users, :exported_at, :datetime diff --git a/db/migrate/20141230214830_user_pref_strip_exif.rb b/db/migrate/20141230214830_user_pref_strip_exif.rb index 79983181d..b573d4874 100644 --- a/db/migrate/20141230214830_user_pref_strip_exif.rb +++ b/db/migrate/20141230214830_user_pref_strip_exif.rb @@ -1,4 +1,4 @@ -class UserPrefStripExif < ActiveRecord::Migration +class UserPrefStripExif < ActiveRecord::Migration[4.2] def up add_column :users, :strip_exif, :boolean, default: true end diff --git a/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb b/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb index 832742889..37cef149a 100644 --- a/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb +++ b/db/migrate/20150106050733_set_mysql_to_unicode_mb4.rb @@ -1,4 +1,4 @@ -class SetMysqlToUnicodeMb4 < ActiveRecord::Migration +class SetMysqlToUnicodeMb4 < ActiveRecord::Migration[4.2] # Converts the tables and strings columns to utf8mb4, which is the true, full # unicode support in MySQl diff --git a/db/migrate/20150209230946_disable_mail_for_closed_account.rb b/db/migrate/20150209230946_disable_mail_for_closed_account.rb index 575b16cfc..2dd573745 100644 --- a/db/migrate/20150209230946_disable_mail_for_closed_account.rb +++ b/db/migrate/20150209230946_disable_mail_for_closed_account.rb @@ -1,4 +1,4 @@ -class DisableMailForClosedAccount < ActiveRecord::Migration +class DisableMailForClosedAccount < ActiveRecord::Migration[4.2] def up User.joins(:person).where(people: {closed_account: true}).update_all(disable_mail: true) end diff --git a/db/migrate/20150220001357_add_photos_export_to_user.rb b/db/migrate/20150220001357_add_photos_export_to_user.rb index f19349723..6bec80420 100644 --- a/db/migrate/20150220001357_add_photos_export_to_user.rb +++ b/db/migrate/20150220001357_add_photos_export_to_user.rb @@ -1,4 +1,4 @@ -class AddPhotosExportToUser < ActiveRecord::Migration +class AddPhotosExportToUser < ActiveRecord::Migration[4.2] def up add_column :users, :exported_photos_file, :string add_column :users, :exported_photos_at, :datetime diff --git a/db/migrate/20150403192408_remove_deleted_aspects_from_auto_follow_back.rb b/db/migrate/20150403192408_remove_deleted_aspects_from_auto_follow_back.rb index d0d12058d..f5f19e750 100644 --- a/db/migrate/20150403192408_remove_deleted_aspects_from_auto_follow_back.rb +++ b/db/migrate/20150403192408_remove_deleted_aspects_from_auto_follow_back.rb @@ -1,4 +1,4 @@ -class RemoveDeletedAspectsFromAutoFollowBack < ActiveRecord::Migration +class RemoveDeletedAspectsFromAutoFollowBack < ActiveRecord::Migration[4.2] def up User.where.not(auto_follow_back_aspect_id: Aspect.select(:id)) .where(auto_follow_back: true) diff --git a/db/migrate/20150403212139_fix_wrong_only_sharing.rb b/db/migrate/20150403212139_fix_wrong_only_sharing.rb index 8299ea88b..c02f4bba6 100644 --- a/db/migrate/20150403212139_fix_wrong_only_sharing.rb +++ b/db/migrate/20150403212139_fix_wrong_only_sharing.rb @@ -1,4 +1,4 @@ -class FixWrongOnlySharing < ActiveRecord::Migration +class FixWrongOnlySharing < ActiveRecord::Migration[4.2] def up Contact.where(sharing: true, receiving: false) .where(id: AspectMembership.select(:contact_id)) diff --git a/db/migrate/20150523004437_enable_color_themes.rb b/db/migrate/20150523004437_enable_color_themes.rb index d9cea868d..816fd1fbf 100644 --- a/db/migrate/20150523004437_enable_color_themes.rb +++ b/db/migrate/20150523004437_enable_color_themes.rb @@ -1,4 +1,4 @@ -class EnableColorThemes < ActiveRecord::Migration +class EnableColorThemes < ActiveRecord::Migration[4.2] def up add_column(:users, :color_theme, :string) end diff --git a/db/migrate/20150531005120_cleanup_default_avatars.rb b/db/migrate/20150531005120_cleanup_default_avatars.rb index 93010fb2a..f3dcee9a2 100644 --- a/db/migrate/20150531005120_cleanup_default_avatars.rb +++ b/db/migrate/20150531005120_cleanup_default_avatars.rb @@ -1,4 +1,4 @@ -class CleanupDefaultAvatars < ActiveRecord::Migration +class CleanupDefaultAvatars < ActiveRecord::Migration[4.2] def up Profile.where("image_url LIKE ?", "%user/default%") .update_all(image_url: nil, image_url_small: nil, image_url_medium: nil) diff --git a/db/migrate/20150607143809_fix_photo_public_flag.rb b/db/migrate/20150607143809_fix_photo_public_flag.rb index fa75167ef..ee223cd6a 100644 --- a/db/migrate/20150607143809_fix_photo_public_flag.rb +++ b/db/migrate/20150607143809_fix_photo_public_flag.rb @@ -1,4 +1,4 @@ -class FixPhotoPublicFlag < ActiveRecord::Migration +class FixPhotoPublicFlag < ActiveRecord::Migration[4.2] def up Photo.joins(:status_message).where(posts: {public: true}).update_all(public: true) end diff --git a/db/migrate/20150613202109_create_o_auth_applications.rb b/db/migrate/20150613202109_create_o_auth_applications.rb index 1170b5c9e..a39f0ace9 100644 --- a/db/migrate/20150613202109_create_o_auth_applications.rb +++ b/db/migrate/20150613202109_create_o_auth_applications.rb @@ -1,6 +1,6 @@ # Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829023826_create_clients.rb -class CreateOAuthApplications < ActiveRecord::Migration +class CreateOAuthApplications < ActiveRecord::Migration[4.2] def change create_table :o_auth_applications do |t| t.belongs_to :user, index: true diff --git a/db/migrate/20150630221004_add_public_to_profiles.rb b/db/migrate/20150630221004_add_public_to_profiles.rb index 06973e027..4797c1f38 100644 --- a/db/migrate/20150630221004_add_public_to_profiles.rb +++ b/db/migrate/20150630221004_add_public_to_profiles.rb @@ -1,4 +1,4 @@ -class AddPublicToProfiles < ActiveRecord::Migration +class AddPublicToProfiles < ActiveRecord::Migration[4.2] def change add_column :profiles, :public_details, :boolean, default: false end diff --git a/db/migrate/20150708153926_create_authorizations.rb b/db/migrate/20150708153926_create_authorizations.rb index ee88ab017..b9e06dd2c 100644 --- a/db/migrate/20150708153926_create_authorizations.rb +++ b/db/migrate/20150708153926_create_authorizations.rb @@ -1,4 +1,4 @@ -class CreateAuthorizations < ActiveRecord::Migration +class CreateAuthorizations < ActiveRecord::Migration[4.2] def change create_table :authorizations do |t| t.belongs_to :user, index: true diff --git a/db/migrate/20150708153928_create_o_auth_access_tokens.rb b/db/migrate/20150708153928_create_o_auth_access_tokens.rb index d833011c5..779283cbe 100644 --- a/db/migrate/20150708153928_create_o_auth_access_tokens.rb +++ b/db/migrate/20150708153928_create_o_auth_access_tokens.rb @@ -1,6 +1,6 @@ # Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829023837_create_access_tokens.rb -class CreateOAuthAccessTokens < ActiveRecord::Migration +class CreateOAuthAccessTokens < ActiveRecord::Migration[4.2] def change create_table :o_auth_access_tokens do |t| t.belongs_to :authorization, index: true diff --git a/db/migrate/20150714055110_create_id_tokens.rb b/db/migrate/20150714055110_create_id_tokens.rb index b1e3abdfa..df98206a4 100644 --- a/db/migrate/20150714055110_create_id_tokens.rb +++ b/db/migrate/20150714055110_create_id_tokens.rb @@ -1,6 +1,6 @@ # Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829024010_create_id_tokens.rb -class CreateIdTokens < ActiveRecord::Migration +class CreateIdTokens < ActiveRecord::Migration[4.2] def change create_table :id_tokens do |t| t.belongs_to :authorization, index: true diff --git a/db/migrate/20150724152052_remove_favorites_from_posts.rb b/db/migrate/20150724152052_remove_favorites_from_posts.rb index 8d4bd873f..737d3c593 100644 --- a/db/migrate/20150724152052_remove_favorites_from_posts.rb +++ b/db/migrate/20150724152052_remove_favorites_from_posts.rb @@ -1,4 +1,4 @@ -class RemoveFavoritesFromPosts < ActiveRecord::Migration +class RemoveFavoritesFromPosts < ActiveRecord::Migration[4.2] def self.up remove_column :posts, :favorite end diff --git a/db/migrate/20150731123113_create_pairwise_pseudonymous_identifiers.rb b/db/migrate/20150731123113_create_pairwise_pseudonymous_identifiers.rb index 0c8690848..12ed8597f 100644 --- a/db/migrate/20150731123113_create_pairwise_pseudonymous_identifiers.rb +++ b/db/migrate/20150731123113_create_pairwise_pseudonymous_identifiers.rb @@ -1,6 +1,6 @@ # Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829024140_create_pairwise_pseudonymous_identifiers.rb -class CreatePairwisePseudonymousIdentifiers < ActiveRecord::Migration +class CreatePairwisePseudonymousIdentifiers < ActiveRecord::Migration[4.2] def change create_table :ppid do |t| t.belongs_to :o_auth_application, index: true diff --git a/db/migrate/20150731123114_add_status_to_pods.rb b/db/migrate/20150731123114_add_status_to_pods.rb index b53051f06..e94a011b1 100644 --- a/db/migrate/20150731123114_add_status_to_pods.rb +++ b/db/migrate/20150731123114_add_status_to_pods.rb @@ -1,4 +1,4 @@ -class AddStatusToPods < ActiveRecord::Migration +class AddStatusToPods < ActiveRecord::Migration[4.2] def change add_column :pods, :status, :integer, default: 0 add_column :pods, :checked_at, :datetime, default: Time.zone.at(0) diff --git a/db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb b/db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb index e93acf722..f3d434474 100644 --- a/db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb +++ b/db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb @@ -1,4 +1,4 @@ -class RemoveDuplicateAndEmptyPods < ActiveRecord::Migration +class RemoveDuplicateAndEmptyPods < ActiveRecord::Migration[4.2] def up remove_dupes remove_empty_or_nil diff --git a/db/migrate/20151003142048_update_report_item_types.rb b/db/migrate/20151003142048_update_report_item_types.rb index 9a318edff..3d4972537 100644 --- a/db/migrate/20151003142048_update_report_item_types.rb +++ b/db/migrate/20151003142048_update_report_item_types.rb @@ -1,4 +1,4 @@ -class UpdateReportItemTypes < ActiveRecord::Migration +class UpdateReportItemTypes < ActiveRecord::Migration[4.2] def change Report.all.each do |report| report.update_attribute :item_type, report[:item_type].capitalize diff --git a/db/migrate/20151210213023_remove_signatures_from_relayables.rb b/db/migrate/20151210213023_remove_signatures_from_relayables.rb index 1d2cb485c..c9b7a45fa 100644 --- a/db/migrate/20151210213023_remove_signatures_from_relayables.rb +++ b/db/migrate/20151210213023_remove_signatures_from_relayables.rb @@ -1,4 +1,4 @@ -class RemoveSignaturesFromRelayables < ActiveRecord::Migration +class RemoveSignaturesFromRelayables < ActiveRecord::Migration[4.2] def change remove_column :comments, :parent_author_signature, :text remove_column :poll_participations, :parent_author_signature, :text diff --git a/db/migrate/20160124234712_extend_pods.rb b/db/migrate/20160124234712_extend_pods.rb index d86769091..8e9d6c20b 100644 --- a/db/migrate/20160124234712_extend_pods.rb +++ b/db/migrate/20160124234712_extend_pods.rb @@ -1,4 +1,4 @@ -class ExtendPods < ActiveRecord::Migration +class ExtendPods < ActiveRecord::Migration[4.2] class Pod < ApplicationRecord has_many :people diff --git a/db/migrate/20160225232049_link_share_visibilities_with_user.rb b/db/migrate/20160225232049_link_share_visibilities_with_user.rb index a31a2b0ef..9a18e5586 100644 --- a/db/migrate/20160225232049_link_share_visibilities_with_user.rb +++ b/db/migrate/20160225232049_link_share_visibilities_with_user.rb @@ -1,4 +1,4 @@ -class LinkShareVisibilitiesWithUser < ActiveRecord::Migration +class LinkShareVisibilitiesWithUser < ActiveRecord::Migration[4.2] class ShareVisibility < ApplicationRecord end diff --git a/db/migrate/20160302025129_cleanup_aspect_visibility.rb b/db/migrate/20160302025129_cleanup_aspect_visibility.rb index 18be29f05..eae7a4491 100644 --- a/db/migrate/20160302025129_cleanup_aspect_visibility.rb +++ b/db/migrate/20160302025129_cleanup_aspect_visibility.rb @@ -1,4 +1,4 @@ -class CleanupAspectVisibility < ActiveRecord::Migration +class CleanupAspectVisibility < ActiveRecord::Migration[4.2] class AspectVisibility < ApplicationRecord end diff --git a/db/migrate/20160307142216_cleanup_handles.rb b/db/migrate/20160307142216_cleanup_handles.rb index b2ed8fc8a..e39be2279 100644 --- a/db/migrate/20160307142216_cleanup_handles.rb +++ b/db/migrate/20160307142216_cleanup_handles.rb @@ -1,4 +1,4 @@ -class CleanupHandles < ActiveRecord::Migration +class CleanupHandles < ActiveRecord::Migration[4.2] def change remove_column :photos, :tmp_old_id, :integer remove_column :photos, :diaspora_handle, :string diff --git a/db/migrate/20160327103605_add_author_id_index_to_participations.rb b/db/migrate/20160327103605_add_author_id_index_to_participations.rb index 8a6382aeb..c41607981 100644 --- a/db/migrate/20160327103605_add_author_id_index_to_participations.rb +++ b/db/migrate/20160327103605_add_author_id_index_to_participations.rb @@ -1,4 +1,4 @@ -class AddAuthorIdIndexToParticipations < ActiveRecord::Migration +class AddAuthorIdIndexToParticipations < ActiveRecord::Migration[4.2] def change add_index :participations, :author_id, :using => :btree end diff --git a/db/migrate/20160509232726_cleanup_duplicates_and_add_unique_indexes.rb b/db/migrate/20160509232726_cleanup_duplicates_and_add_unique_indexes.rb index 26b79067b..4e17deb71 100644 --- a/db/migrate/20160509232726_cleanup_duplicates_and_add_unique_indexes.rb +++ b/db/migrate/20160509232726_cleanup_duplicates_and_add_unique_indexes.rb @@ -1,4 +1,4 @@ -class CleanupDuplicatesAndAddUniqueIndexes < ActiveRecord::Migration +class CleanupDuplicatesAndAddUniqueIndexes < ActiveRecord::Migration[4.2] def up # temporary index to speed up the migration add_index :photos, :guid, length: 191 diff --git a/db/migrate/20160531170531_remove_duplicate_aspect_visibilities.rb b/db/migrate/20160531170531_remove_duplicate_aspect_visibilities.rb index 8269606be..40306c898 100644 --- a/db/migrate/20160531170531_remove_duplicate_aspect_visibilities.rb +++ b/db/migrate/20160531170531_remove_duplicate_aspect_visibilities.rb @@ -1,4 +1,4 @@ -class RemoveDuplicateAspectVisibilities < ActiveRecord::Migration +class RemoveDuplicateAspectVisibilities < ActiveRecord::Migration[4.2] def up where = "WHERE a1.aspect_id = a2.aspect_id AND a1.shareable_id = a2.shareable_id AND "\ "a1.shareable_type = a2.shareable_type AND a1.id > a2.id" diff --git a/db/migrate/20160618033455_cleanup_participations.rb b/db/migrate/20160618033455_cleanup_participations.rb index 42d4fdd3c..49a03addc 100644 --- a/db/migrate/20160618033455_cleanup_participations.rb +++ b/db/migrate/20160618033455_cleanup_participations.rb @@ -1,4 +1,4 @@ -class CleanupParticipations < ActiveRecord::Migration +class CleanupParticipations < ActiveRecord::Migration[4.2] class Participation < ApplicationRecord end diff --git a/db/migrate/20160720212620_create_signature_tables.rb b/db/migrate/20160720212620_create_signature_tables.rb index 8bc82befc..fa843fcdd 100644 --- a/db/migrate/20160720212620_create_signature_tables.rb +++ b/db/migrate/20160720212620_create_signature_tables.rb @@ -1,4 +1,4 @@ -class CreateSignatureTables < ActiveRecord::Migration +class CreateSignatureTables < ActiveRecord::Migration[4.2] class SignatureOrder < ApplicationRecord end diff --git a/db/migrate/20160802212635_cleanup_posts_table.rb b/db/migrate/20160802212635_cleanup_posts_table.rb index 79e473e8e..ffab18c7d 100644 --- a/db/migrate/20160802212635_cleanup_posts_table.rb +++ b/db/migrate/20160802212635_cleanup_posts_table.rb @@ -1,4 +1,4 @@ -class CleanupPostsTable < ActiveRecord::Migration +class CleanupPostsTable < ActiveRecord::Migration[4.2] def change remove_index :posts, column: %i(status_message_guid pending), name: :index_posts_on_status_message_guid_and_pending, length: {status_message_guid: 190} diff --git a/db/migrate/20160807212443_participation_counter.rb b/db/migrate/20160807212443_participation_counter.rb index fae1d9b03..719458ec7 100644 --- a/db/migrate/20160807212443_participation_counter.rb +++ b/db/migrate/20160807212443_participation_counter.rb @@ -1,4 +1,4 @@ -class ParticipationCounter < ActiveRecord::Migration +class ParticipationCounter < ActiveRecord::Migration[4.2] class Comment < ApplicationRecord end diff --git a/db/migrate/20160810230114_cleanup_invitation_columns_from_users.rb b/db/migrate/20160810230114_cleanup_invitation_columns_from_users.rb index 895b75471..57fdc03d4 100644 --- a/db/migrate/20160810230114_cleanup_invitation_columns_from_users.rb +++ b/db/migrate/20160810230114_cleanup_invitation_columns_from_users.rb @@ -1,4 +1,4 @@ -class CleanupInvitationColumnsFromUsers < ActiveRecord::Migration +class CleanupInvitationColumnsFromUsers < ActiveRecord::Migration[4.2] class InvitationCode < ApplicationRecord end diff --git a/db/migrate/20160813115514_remove_id_tokens.rb b/db/migrate/20160813115514_remove_id_tokens.rb index 36689d688..346b2a24b 100644 --- a/db/migrate/20160813115514_remove_id_tokens.rb +++ b/db/migrate/20160813115514_remove_id_tokens.rb @@ -1,6 +1,6 @@ require_relative "20150714055110_create_id_tokens" -class RemoveIdTokens < ActiveRecord::Migration +class RemoveIdTokens < ActiveRecord::Migration[4.2] def change revert CreateIdTokens end diff --git a/db/migrate/20160822212739_remove_started_sharing_notifications_without_contact.rb b/db/migrate/20160822212739_remove_started_sharing_notifications_without_contact.rb index f41f1d202..2761cbe5e 100644 --- a/db/migrate/20160822212739_remove_started_sharing_notifications_without_contact.rb +++ b/db/migrate/20160822212739_remove_started_sharing_notifications_without_contact.rb @@ -1,4 +1,4 @@ -class RemoveStartedSharingNotificationsWithoutContact < ActiveRecord::Migration +class RemoveStartedSharingNotificationsWithoutContact < ActiveRecord::Migration[4.2] class Notification < ApplicationRecord end diff --git a/db/migrate/20160829170244_add_post_default_to_aspects.rb b/db/migrate/20160829170244_add_post_default_to_aspects.rb index dcc2d76c6..e86193346 100644 --- a/db/migrate/20160829170244_add_post_default_to_aspects.rb +++ b/db/migrate/20160829170244_add_post_default_to_aspects.rb @@ -1,4 +1,4 @@ -class AddPostDefaultToAspects < ActiveRecord::Migration +class AddPostDefaultToAspects < ActiveRecord::Migration[4.2] def change add_column :aspects, :post_default, :boolean, default: true add_column :users, :post_default_public, :boolean, default: false diff --git a/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb b/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb index 487248a26..eb123a6b3 100644 --- a/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb +++ b/db/migrate/20160901072443_add_video_url_to_open_graph_cache.rb @@ -1,4 +1,4 @@ -class AddVideoUrlToOpenGraphCache < ActiveRecord::Migration +class AddVideoUrlToOpenGraphCache < ActiveRecord::Migration[4.2] def change add_column :open_graph_caches, :video_url, :text end diff --git a/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb b/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb index 0e98b4499..27a7feecf 100644 --- a/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb +++ b/db/migrate/20160902180630_remove_invalid_unconfirmed_emails.rb @@ -1,4 +1,4 @@ -class RemoveInvalidUnconfirmedEmails < ActiveRecord::Migration +class RemoveInvalidUnconfirmedEmails < ActiveRecord::Migration[4.2] class User < ApplicationRecord end diff --git a/db/migrate/20160906225138_fix_photos_share_visibilities.rb b/db/migrate/20160906225138_fix_photos_share_visibilities.rb index cd2627c8b..ff382a7d5 100644 --- a/db/migrate/20160906225138_fix_photos_share_visibilities.rb +++ b/db/migrate/20160906225138_fix_photos_share_visibilities.rb @@ -1,4 +1,4 @@ -class FixPhotosShareVisibilities < ActiveRecord::Migration +class FixPhotosShareVisibilities < ActiveRecord::Migration[4.2] class Photo < ApplicationRecord end diff --git a/db/migrate/20161015174300_remove_empty_pod.rb b/db/migrate/20161015174300_remove_empty_pod.rb index 482b4f5db..9e3ddd367 100644 --- a/db/migrate/20161015174300_remove_empty_pod.rb +++ b/db/migrate/20161015174300_remove_empty_pod.rb @@ -1,4 +1,4 @@ -class RemoveEmptyPod < ActiveRecord::Migration +class RemoveEmptyPod < ActiveRecord::Migration[4.2] def up Pod.delete_all("host IS NULL") diff --git a/db/migrate/20161024231443_add_scheduled_check_to_pod.rb b/db/migrate/20161024231443_add_scheduled_check_to_pod.rb index 6d18ba228..b080564b7 100644 --- a/db/migrate/20161024231443_add_scheduled_check_to_pod.rb +++ b/db/migrate/20161024231443_add_scheduled_check_to_pod.rb @@ -1,4 +1,4 @@ -class AddScheduledCheckToPod < ActiveRecord::Migration +class AddScheduledCheckToPod < ActiveRecord::Migration[4.2] def change add_column :pods, :scheduled_check, :boolean, default: false, null: false end diff --git a/db/migrate/20161107100840_polymorphic_mentions.rb b/db/migrate/20161107100840_polymorphic_mentions.rb index 69bd3017a..99f65d822 100644 --- a/db/migrate/20161107100840_polymorphic_mentions.rb +++ b/db/migrate/20161107100840_polymorphic_mentions.rb @@ -1,4 +1,4 @@ -class PolymorphicMentions < ActiveRecord::Migration +class PolymorphicMentions < ActiveRecord::Migration[4.2] def change remove_index :mentions, column: %i(post_id) remove_index :mentions, column: %i(person_id post_id), unique: true diff --git a/db/migrate/20170430022507_remove_message_signature.rb b/db/migrate/20170430022507_remove_message_signature.rb index f2519dba5..a8e65c2e0 100644 --- a/db/migrate/20170430022507_remove_message_signature.rb +++ b/db/migrate/20170430022507_remove_message_signature.rb @@ -1,4 +1,4 @@ -class RemoveMessageSignature < ActiveRecord::Migration +class RemoveMessageSignature < ActiveRecord::Migration[4.2] def change remove_column :messages, :author_signature, :text end