From b606acba0c28652fa6f066c2b5d989ceae41c194 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 24 Apr 2019 11:05:02 +0100 Subject: [PATCH] Use rails 4.2 defaults for older migrations --- db/migrate/001_create_osm_db.rb | 2 +- db/migrate/002_cleanup_osm_db.rb | 2 +- db/migrate/003_sql_session_store_setup.rb | 2 +- db/migrate/004_user_enhancements.rb | 2 +- db/migrate/005_tile_tracepoints.rb | 2 +- db/migrate/006_tile_nodes.rb | 2 +- db/migrate/007_add_relations.rb | 2 +- db/migrate/008_remove_segments.rb | 2 +- db/migrate/009_way_nodes_node_idx.rb | 2 +- db/migrate/010_diary_comments.rb | 2 +- db/migrate/011_add_user_image.rb | 2 +- db/migrate/012_add_admin_flag.rb | 2 +- db/migrate/013_add_email_valid.rb | 2 +- db/migrate/014_add_new_email.rb | 2 +- db/migrate/015_add_user_visible.rb | 2 +- db/migrate/016_add_creation_ip.rb | 2 +- db/migrate/017_add_gpx_indexes.rb | 2 +- db/migrate/018_create_acls.rb | 2 +- db/migrate/019_add_timestamp_indexes.rb | 2 +- db/migrate/020_populate_node_tags_and_remove.rb | 2 +- db/migrate/021_move_to_innodb.rb | 2 +- db/migrate/022_key_constraints.rb | 2 +- db/migrate/023_add_changesets.rb | 2 +- db/migrate/024_order_relation_members.rb | 2 +- db/migrate/025_add_end_time_to_changesets.rb | 2 +- db/migrate/026_add_changeset_user_index.rb | 2 +- db/migrate/027_add_changeset_indexes.rb | 2 +- db/migrate/028_add_more_changeset_indexes.rb | 2 +- db/migrate/029_add_user_foreign_keys.rb | 2 +- db/migrate/030_add_foreign_keys.rb | 2 +- db/migrate/031_create_countries.rb | 2 +- db/migrate/032_add_user_locale.rb | 2 +- db/migrate/033_change_diary_entries_language.rb | 2 +- db/migrate/034_create_languages.rb | 2 +- db/migrate/035_change_user_locale.rb | 2 +- db/migrate/036_add_visible_to_message.rb | 2 +- db/migrate/037_add_sender_visible_to_message.rb | 2 +- db/migrate/038_add_message_sender_index.rb | 2 +- db/migrate/039_add_more_controls_to_gpx_files.rb | 2 +- db/migrate/040_create_oauth_tables.rb | 2 +- db/migrate/041_add_fine_o_auth_permissions.rb | 2 +- db/migrate/042_add_foreign_keys_to_oauth_tables.rb | 2 +- db/migrate/043_add_referer_to_user_token.rb | 2 +- db/migrate/044_create_user_roles.rb | 2 +- db/migrate/045_create_user_blocks.rb | 2 +- db/migrate/046_alter_user_roles_and_blocks.rb | 2 +- db/migrate/047_add_visible_to_diaries.rb | 2 +- db/migrate/048_add_diary_creation_indexes.rb | 2 +- db/migrate/049_improve_changeset_user_index.rb | 2 +- db/migrate/050_add_user_index_to_diary_comments.rb | 2 +- db/migrate/051_add_status_to_user.rb | 2 +- db/migrate/052_add_contributor_terms_to_user.rb | 2 +- db/migrate/053_add_map_bug_tables.rb | 2 +- db/migrate/054_refactor_map_bug_tables.rb | 2 +- db/migrate/055_change_map_bug_comment_type.rb | 2 +- db/migrate/056_add_date_closed.rb | 2 +- db/migrate/057_add_map_bug_comment_event.rb | 2 +- db/migrate/20100513171259_add_user_date_index_to_changeset.rb | 2 +- db/migrate/20100516124737_add_open_id.rb | 2 +- db/migrate/20100910084426_add_callback_to_oauth_tokens.rb | 2 +- db/migrate/20101114011429_add_editor_preference_to_user.rb | 2 +- db/migrate/20110322001319_add_terms_seen_to_user.rb | 2 +- db/migrate/20110508145337_cleanup_bug_tables.rb | 2 +- db/migrate/20110521142405_rename_bugs_to_notes.rb | 2 +- db/migrate/20110925112722_rename_ids.rb | 2 +- db/migrate/20111116184519_update_oauth.rb | 2 +- db/migrate/20111212183945_add_lowercase_user_indexes.rb | 2 +- db/migrate/20120123184321_switch_to_paperclip.rb | 2 +- db/migrate/20120208122334_merge_acl_address_and_mask.rb | 2 +- db/migrate/20120208194454_add_domain_to_acl.rb | 2 +- db/migrate/20120214210114_add_text_format.rb | 2 +- db/migrate/20120219161649_add_user_image_fingerprint.rb | 2 +- db/migrate/20120318201948_create_redactions.rb | 2 +- db/migrate/20120328090602_drop_session_table.rb | 2 +- .../20120404205604_add_user_and_description_to_redaction.rb | 2 +- db/migrate/20120808231205_add_counter_caches.rb | 2 +- db/migrate/20121005195010_add_diary_entry_counter_caches.rb | 2 +- db/migrate/20121012044047_add_image_use_gravatar_to_users.rb | 2 +- db/migrate/20121119165817_drop_nearby_place_from_notes.rb | 2 +- .../20121202155309_remove_author_name_from_note_comment.rb | 2 +- db/migrate/20121203124841_change_note_address_to_inet.rb | 2 +- db/migrate/20130328184137_add_write_notes_permission.rb | 2 +- .../20131212124700_add_created_at_index_to_note_comments.rb | 2 +- db/migrate/20140115192822_add_text_index_to_note_comments.rb | 2 +- db/migrate/20140117185510_drop_countries.rb | 2 +- db/migrate/20140210003018_add_user_image_content_type.rb | 2 +- db/migrate/20140507110937_create_changeset_comments.rb | 2 +- ...0140519141742_add_join_table_between_users_and_changesets.rb | 2 +- db/migrate/20150110152606_change_default_formats.rb | 2 +- db/migrate/20150111192335_subscribe_old_changesets.rb | 2 +- db/migrate/20150222101847_rename_openid_url.rb | 2 +- .../20150818224516_set_default_gravatar_to_false_for_privacy.rb | 2 +- ...1002153425_add_join_table_between_users_and_diary_entries.rb | 2 +- db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb | 2 +- db/migrate/20170222134109_add_user_indexes.rb | 2 +- 95 files changed, 95 insertions(+), 95 deletions(-) diff --git a/db/migrate/001_create_osm_db.rb b/db/migrate/001_create_osm_db.rb index 2edb658e4..3772c5dc2 100644 --- a/db/migrate/001_create_osm_db.rb +++ b/db/migrate/001_create_osm_db.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateOsmDb < ActiveRecord::Migration[5.0] +class CreateOsmDb < ActiveRecord::Migration[4.2] def self.up create_table "current_nodes", :id => false do |t| t.column "id", :bigint, :null => false diff --git a/db/migrate/002_cleanup_osm_db.rb b/db/migrate/002_cleanup_osm_db.rb index 92a4f671a..8728f1a6a 100644 --- a/db/migrate/002_cleanup_osm_db.rb +++ b/db/migrate/002_cleanup_osm_db.rb @@ -1,6 +1,6 @@ require "migrate" -class CleanupOsmDb < ActiveRecord::Migration[5.0] +class CleanupOsmDb < ActiveRecord::Migration[4.2] def self.up change_column "current_nodes", "latitude", :float, :limit => 53, :null => false change_column "current_nodes", "longitude", :float, :limit => 53, :null => false diff --git a/db/migrate/003_sql_session_store_setup.rb b/db/migrate/003_sql_session_store_setup.rb index 47c711daf..060ffe089 100644 --- a/db/migrate/003_sql_session_store_setup.rb +++ b/db/migrate/003_sql_session_store_setup.rb @@ -1,6 +1,6 @@ require "migrate" -class SqlSessionStoreSetup < ActiveRecord::Migration[5.0] +class SqlSessionStoreSetup < ActiveRecord::Migration[4.2] def self.up create_table "sessions" do |t| t.column "session_id", :string diff --git a/db/migrate/004_user_enhancements.rb b/db/migrate/004_user_enhancements.rb index 68c6cd1de..d12b02c0a 100644 --- a/db/migrate/004_user_enhancements.rb +++ b/db/migrate/004_user_enhancements.rb @@ -1,6 +1,6 @@ require "migrate" -class UserEnhancements < ActiveRecord::Migration[5.0] +class UserEnhancements < ActiveRecord::Migration[4.2] def self.up add_column "diary_entries", "latitude", :float, :limit => 53 add_column "diary_entries", "longitude", :float, :limit => 53 diff --git a/db/migrate/005_tile_tracepoints.rb b/db/migrate/005_tile_tracepoints.rb index 2433c3f4f..a6e5c9017 100644 --- a/db/migrate/005_tile_tracepoints.rb +++ b/db/migrate/005_tile_tracepoints.rb @@ -1,6 +1,6 @@ require "migrate" -class TileTracepoints < ActiveRecord::Migration[5.0] +class TileTracepoints < ActiveRecord::Migration[4.2] def self.up add_column "gps_points", "tile", :bigint add_index "gps_points", ["tile"], :name => "points_tile_idx" diff --git a/db/migrate/006_tile_nodes.rb b/db/migrate/006_tile_nodes.rb index 138168a7b..70a31fde1 100644 --- a/db/migrate/006_tile_nodes.rb +++ b/db/migrate/006_tile_nodes.rb @@ -1,6 +1,6 @@ require "migrate" -class TileNodes < ActiveRecord::Migration[5.0] +class TileNodes < ActiveRecord::Migration[4.2] def self.upgrade_table(from_table, to_table, model) if ENV["USE_DB_FUNCTIONS"] execute <<-SQL diff --git a/db/migrate/007_add_relations.rb b/db/migrate/007_add_relations.rb index 258f1c5bc..05d3c634b 100644 --- a/db/migrate/007_add_relations.rb +++ b/db/migrate/007_add_relations.rb @@ -1,6 +1,6 @@ require "migrate" -class AddRelations < ActiveRecord::Migration[5.0] +class AddRelations < ActiveRecord::Migration[4.2] def self.up # enums work like strings but are more efficient create_enumeration :nwr_enum, %w[Node Way Relation] diff --git a/db/migrate/008_remove_segments.rb b/db/migrate/008_remove_segments.rb index 5c9bd1c39..985a85820 100644 --- a/db/migrate/008_remove_segments.rb +++ b/db/migrate/008_remove_segments.rb @@ -1,6 +1,6 @@ require "migrate" -class RemoveSegments < ActiveRecord::Migration[5.0] +class RemoveSegments < ActiveRecord::Migration[4.2] def self.up have_segs = select_value("SELECT count(*) FROM current_segments").to_i.nonzero? diff --git a/db/migrate/009_way_nodes_node_idx.rb b/db/migrate/009_way_nodes_node_idx.rb index dc4ca41ff..0a760c7c6 100644 --- a/db/migrate/009_way_nodes_node_idx.rb +++ b/db/migrate/009_way_nodes_node_idx.rb @@ -1,4 +1,4 @@ -class WayNodesNodeIdx < ActiveRecord::Migration[5.0] +class WayNodesNodeIdx < ActiveRecord::Migration[4.2] def self.up add_index "way_nodes", ["node_id"], :name => "way_nodes_node_idx" end diff --git a/db/migrate/010_diary_comments.rb b/db/migrate/010_diary_comments.rb index 00912988e..94d8a985b 100644 --- a/db/migrate/010_diary_comments.rb +++ b/db/migrate/010_diary_comments.rb @@ -1,6 +1,6 @@ require "migrate" -class DiaryComments < ActiveRecord::Migration[5.0] +class DiaryComments < ActiveRecord::Migration[4.2] def self.up create_table "diary_comments", :id => false do |t| t.column "id", :bigserial, :primary_key => true, :null => false diff --git a/db/migrate/011_add_user_image.rb b/db/migrate/011_add_user_image.rb index c25afb413..2f53c65fc 100644 --- a/db/migrate/011_add_user_image.rb +++ b/db/migrate/011_add_user_image.rb @@ -1,4 +1,4 @@ -class AddUserImage < ActiveRecord::Migration[5.0] +class AddUserImage < ActiveRecord::Migration[4.2] def self.up add_column "users", "image", :text end diff --git a/db/migrate/012_add_admin_flag.rb b/db/migrate/012_add_admin_flag.rb index d409f9f1e..5b28ed9c1 100644 --- a/db/migrate/012_add_admin_flag.rb +++ b/db/migrate/012_add_admin_flag.rb @@ -1,4 +1,4 @@ -class AddAdminFlag < ActiveRecord::Migration[5.0] +class AddAdminFlag < ActiveRecord::Migration[4.2] def self.up add_column "users", "administrator", :boolean, :default => false, :null => false end diff --git a/db/migrate/013_add_email_valid.rb b/db/migrate/013_add_email_valid.rb index 4e9112957..a45e5928a 100644 --- a/db/migrate/013_add_email_valid.rb +++ b/db/migrate/013_add_email_valid.rb @@ -1,4 +1,4 @@ -class AddEmailValid < ActiveRecord::Migration[5.0] +class AddEmailValid < ActiveRecord::Migration[4.2] def self.up add_column "users", "email_valid", :boolean, :default => false, :null => false User.update_all("email_valid = (active != 0)") # email_valid is :boolean, but active is :integer. "email_valid = active" (see r11802 or earlier) will fail for stricter dbs than mysql diff --git a/db/migrate/014_add_new_email.rb b/db/migrate/014_add_new_email.rb index e9e547738..be41f1fa5 100644 --- a/db/migrate/014_add_new_email.rb +++ b/db/migrate/014_add_new_email.rb @@ -1,4 +1,4 @@ -class AddNewEmail < ActiveRecord::Migration[5.0] +class AddNewEmail < ActiveRecord::Migration[4.2] def self.up add_column "users", "new_email", :string end diff --git a/db/migrate/015_add_user_visible.rb b/db/migrate/015_add_user_visible.rb index 561c767c3..0c7184ada 100644 --- a/db/migrate/015_add_user_visible.rb +++ b/db/migrate/015_add_user_visible.rb @@ -1,4 +1,4 @@ -class AddUserVisible < ActiveRecord::Migration[5.0] +class AddUserVisible < ActiveRecord::Migration[4.2] def self.up add_column "users", "visible", :boolean, :default => true, :null => false User.update_all(:visible => true) diff --git a/db/migrate/016_add_creation_ip.rb b/db/migrate/016_add_creation_ip.rb index 0bcdb856f..205fffe8c 100644 --- a/db/migrate/016_add_creation_ip.rb +++ b/db/migrate/016_add_creation_ip.rb @@ -1,4 +1,4 @@ -class AddCreationIp < ActiveRecord::Migration[5.0] +class AddCreationIp < ActiveRecord::Migration[4.2] def self.up add_column "users", "creation_ip", :string end diff --git a/db/migrate/017_add_gpx_indexes.rb b/db/migrate/017_add_gpx_indexes.rb index 72d28bb2d..f24803871 100644 --- a/db/migrate/017_add_gpx_indexes.rb +++ b/db/migrate/017_add_gpx_indexes.rb @@ -1,4 +1,4 @@ -class AddGpxIndexes < ActiveRecord::Migration[5.0] +class AddGpxIndexes < ActiveRecord::Migration[4.2] def self.up add_index "gpx_files", ["user_id"], :name => "gpx_files_user_id_idx" add_index "gpx_file_tags", ["tag"], :name => "gpx_file_tags_tag_idx" diff --git a/db/migrate/018_create_acls.rb b/db/migrate/018_create_acls.rb index f4fb0799d..c5c7c7444 100644 --- a/db/migrate/018_create_acls.rb +++ b/db/migrate/018_create_acls.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateAcls < ActiveRecord::Migration[5.0] +class CreateAcls < ActiveRecord::Migration[4.2] def self.up create_table "acls", :id => false do |t| t.column "id", :primary_key, :null => false diff --git a/db/migrate/019_add_timestamp_indexes.rb b/db/migrate/019_add_timestamp_indexes.rb index 8122fe1b2..d7d182f2b 100644 --- a/db/migrate/019_add_timestamp_indexes.rb +++ b/db/migrate/019_add_timestamp_indexes.rb @@ -1,4 +1,4 @@ -class AddTimestampIndexes < ActiveRecord::Migration[5.0] +class AddTimestampIndexes < ActiveRecord::Migration[4.2] def self.up add_index :current_ways, :timestamp, :name => :current_ways_timestamp_idx add_index :current_relations, :timestamp, :name => :current_relations_timestamp_idx diff --git a/db/migrate/020_populate_node_tags_and_remove.rb b/db/migrate/020_populate_node_tags_and_remove.rb index 6366a33ce..caa355419 100644 --- a/db/migrate/020_populate_node_tags_and_remove.rb +++ b/db/migrate/020_populate_node_tags_and_remove.rb @@ -1,6 +1,6 @@ require "migrate" -class PopulateNodeTagsAndRemove < ActiveRecord::Migration[5.0] +class PopulateNodeTagsAndRemove < ActiveRecord::Migration[4.2] def self.up have_nodes = select_value("SELECT count(*) FROM current_nodes").to_i.nonzero? diff --git a/db/migrate/021_move_to_innodb.rb b/db/migrate/021_move_to_innodb.rb index d1c20bcdb..47ebecc83 100644 --- a/db/migrate/021_move_to_innodb.rb +++ b/db/migrate/021_move_to_innodb.rb @@ -1,6 +1,6 @@ require "migrate" -class MoveToInnodb < ActiveRecord::Migration[5.0] +class MoveToInnodb < ActiveRecord::Migration[4.2] @conv_tables = %w[nodes ways way_tags way_nodes current_way_tags relation_members relations relation_tags current_relation_tags] @ver_tbl = %w[nodes ways relations] diff --git a/db/migrate/022_key_constraints.rb b/db/migrate/022_key_constraints.rb index 535d7d21d..3030ed2cf 100644 --- a/db/migrate/022_key_constraints.rb +++ b/db/migrate/022_key_constraints.rb @@ -1,6 +1,6 @@ require "migrate" -class KeyConstraints < ActiveRecord::Migration[5.0] +class KeyConstraints < ActiveRecord::Migration[4.2] def self.up # Primary keys add_primary_key :current_node_tags, [:id, :k] diff --git a/db/migrate/023_add_changesets.rb b/db/migrate/023_add_changesets.rb index 8d19fc1c3..d835b22cb 100644 --- a/db/migrate/023_add_changesets.rb +++ b/db/migrate/023_add_changesets.rb @@ -1,6 +1,6 @@ require "migrate" -class AddChangesets < ActiveRecord::Migration[5.0] +class AddChangesets < ActiveRecord::Migration[4.2] @conv_user_tables = %w[current_nodes current_relations current_ways nodes relations ways] def self.up diff --git a/db/migrate/024_order_relation_members.rb b/db/migrate/024_order_relation_members.rb index e773da3cd..c2a3ada32 100644 --- a/db/migrate/024_order_relation_members.rb +++ b/db/migrate/024_order_relation_members.rb @@ -1,6 +1,6 @@ require "migrate" -class OrderRelationMembers < ActiveRecord::Migration[5.0] +class OrderRelationMembers < ActiveRecord::Migration[4.2] def self.up # add sequence column. rails won't let us define an ordering here, # as defaults must be constant. diff --git a/db/migrate/025_add_end_time_to_changesets.rb b/db/migrate/025_add_end_time_to_changesets.rb index 5bd2d5879..985e57285 100644 --- a/db/migrate/025_add_end_time_to_changesets.rb +++ b/db/migrate/025_add_end_time_to_changesets.rb @@ -1,6 +1,6 @@ require "migrate" -class AddEndTimeToChangesets < ActiveRecord::Migration[5.0] +class AddEndTimeToChangesets < ActiveRecord::Migration[4.2] def self.up # swap the boolean closed-or-not for a time when the changeset will # close or has closed. diff --git a/db/migrate/026_add_changeset_user_index.rb b/db/migrate/026_add_changeset_user_index.rb index 049fdc760..71037560e 100644 --- a/db/migrate/026_add_changeset_user_index.rb +++ b/db/migrate/026_add_changeset_user_index.rb @@ -1,4 +1,4 @@ -class AddChangesetUserIndex < ActiveRecord::Migration[5.0] +class AddChangesetUserIndex < ActiveRecord::Migration[4.2] def self.up add_index "changesets", ["user_id"], :name => "changesets_user_id_idx" end diff --git a/db/migrate/027_add_changeset_indexes.rb b/db/migrate/027_add_changeset_indexes.rb index 26b96bfba..67866902b 100644 --- a/db/migrate/027_add_changeset_indexes.rb +++ b/db/migrate/027_add_changeset_indexes.rb @@ -1,4 +1,4 @@ -class AddChangesetIndexes < ActiveRecord::Migration[5.0] +class AddChangesetIndexes < ActiveRecord::Migration[4.2] def self.up add_index "nodes", ["changeset_id"], :name => "nodes_changeset_id_idx" add_index "ways", ["changeset_id"], :name => "ways_changeset_id_idx" diff --git a/db/migrate/028_add_more_changeset_indexes.rb b/db/migrate/028_add_more_changeset_indexes.rb index 4f07b9d58..3a5e941ed 100644 --- a/db/migrate/028_add_more_changeset_indexes.rb +++ b/db/migrate/028_add_more_changeset_indexes.rb @@ -1,6 +1,6 @@ require "migrate" -class AddMoreChangesetIndexes < ActiveRecord::Migration[5.0] +class AddMoreChangesetIndexes < ActiveRecord::Migration[4.2] def self.up add_index "changesets", ["created_at"], :name => "changesets_created_at_idx" add_index "changesets", ["closed_at"], :name => "changesets_closed_at_idx" diff --git a/db/migrate/029_add_user_foreign_keys.rb b/db/migrate/029_add_user_foreign_keys.rb index 84771f826..d91b9a17e 100644 --- a/db/migrate/029_add_user_foreign_keys.rb +++ b/db/migrate/029_add_user_foreign_keys.rb @@ -1,6 +1,6 @@ require "migrate" -class AddUserForeignKeys < ActiveRecord::Migration[5.0] +class AddUserForeignKeys < ActiveRecord::Migration[4.2] def change add_foreign_key :changesets, :users, :name => "changesets_user_id_fkey" add_foreign_key :diary_comments, :users, :name => "diary_comments_user_id_fkey" diff --git a/db/migrate/030_add_foreign_keys.rb b/db/migrate/030_add_foreign_keys.rb index d55c96380..ed7652543 100644 --- a/db/migrate/030_add_foreign_keys.rb +++ b/db/migrate/030_add_foreign_keys.rb @@ -1,6 +1,6 @@ require "migrate" -class AddForeignKeys < ActiveRecord::Migration[5.0] +class AddForeignKeys < ActiveRecord::Migration[4.2] def self.up add_foreign_key :changeset_tags, :changesets, :column => :id, :name => "changeset_tags_id_fkey" add_foreign_key :diary_comments, :diary_entries, :name => "diary_comments_diary_entry_id_fkey" diff --git a/db/migrate/031_create_countries.rb b/db/migrate/031_create_countries.rb index 180605b26..bdb247036 100644 --- a/db/migrate/031_create_countries.rb +++ b/db/migrate/031_create_countries.rb @@ -1,7 +1,7 @@ require "migrate" require "rexml/document" -class CreateCountries < ActiveRecord::Migration[5.0] +class CreateCountries < ActiveRecord::Migration[4.2] def self.up create_table :countries, :id => false do |t| t.column :id, :primary_key, :null => false diff --git a/db/migrate/032_add_user_locale.rb b/db/migrate/032_add_user_locale.rb index cf5f05808..54c2eb258 100644 --- a/db/migrate/032_add_user_locale.rb +++ b/db/migrate/032_add_user_locale.rb @@ -1,4 +1,4 @@ -class AddUserLocale < ActiveRecord::Migration[5.0] +class AddUserLocale < ActiveRecord::Migration[4.2] def self.up add_column "users", "locale", :string end diff --git a/db/migrate/033_change_diary_entries_language.rb b/db/migrate/033_change_diary_entries_language.rb index db011d83f..6c3ae7de2 100644 --- a/db/migrate/033_change_diary_entries_language.rb +++ b/db/migrate/033_change_diary_entries_language.rb @@ -1,4 +1,4 @@ -class ChangeDiaryEntriesLanguage < ActiveRecord::Migration[5.0] +class ChangeDiaryEntriesLanguage < ActiveRecord::Migration[4.2] def self.up remove_column "diary_entries", "language" add_column "diary_entries", "language_code", :string, :null => false, :default => "en" diff --git a/db/migrate/034_create_languages.rb b/db/migrate/034_create_languages.rb index 603ad3066..459d7f647 100644 --- a/db/migrate/034_create_languages.rb +++ b/db/migrate/034_create_languages.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateLanguages < ActiveRecord::Migration[5.0] +class CreateLanguages < ActiveRecord::Migration[4.2] def change create_table :languages, :id => false do |t| t.string :code, :null => false diff --git a/db/migrate/035_change_user_locale.rb b/db/migrate/035_change_user_locale.rb index 4155fbced..3de3492c8 100644 --- a/db/migrate/035_change_user_locale.rb +++ b/db/migrate/035_change_user_locale.rb @@ -1,6 +1,6 @@ require "migrate" -class ChangeUserLocale < ActiveRecord::Migration[5.0] +class ChangeUserLocale < ActiveRecord::Migration[4.2] def self.up remove_foreign_key :users, :column => :locale, :name => "users_locale_fkey" diff --git a/db/migrate/036_add_visible_to_message.rb b/db/migrate/036_add_visible_to_message.rb index ecbe2d0d1..2cdabd781 100644 --- a/db/migrate/036_add_visible_to_message.rb +++ b/db/migrate/036_add_visible_to_message.rb @@ -1,4 +1,4 @@ -class AddVisibleToMessage < ActiveRecord::Migration[5.0] +class AddVisibleToMessage < ActiveRecord::Migration[4.2] def self.up add_column :messages, :visible, :boolean, :default => true, :null => false end diff --git a/db/migrate/037_add_sender_visible_to_message.rb b/db/migrate/037_add_sender_visible_to_message.rb index 4ab347388..05ef2e085 100644 --- a/db/migrate/037_add_sender_visible_to_message.rb +++ b/db/migrate/037_add_sender_visible_to_message.rb @@ -1,4 +1,4 @@ -class AddSenderVisibleToMessage < ActiveRecord::Migration[5.0] +class AddSenderVisibleToMessage < ActiveRecord::Migration[4.2] def self.up rename_column :messages, :visible, :to_user_visible add_column :messages, :from_user_visible, :boolean, :default => true, :null => false diff --git a/db/migrate/038_add_message_sender_index.rb b/db/migrate/038_add_message_sender_index.rb index 0df145711..b862b1cc4 100644 --- a/db/migrate/038_add_message_sender_index.rb +++ b/db/migrate/038_add_message_sender_index.rb @@ -1,4 +1,4 @@ -class AddMessageSenderIndex < ActiveRecord::Migration[5.0] +class AddMessageSenderIndex < ActiveRecord::Migration[4.2] def self.up add_index :messages, [:from_user_id], :name => "messages_from_user_id_idx" end diff --git a/db/migrate/039_add_more_controls_to_gpx_files.rb b/db/migrate/039_add_more_controls_to_gpx_files.rb index 945a7021d..8cc08cda6 100644 --- a/db/migrate/039_add_more_controls_to_gpx_files.rb +++ b/db/migrate/039_add_more_controls_to_gpx_files.rb @@ -1,6 +1,6 @@ require "migrate" -class AddMoreControlsToGpxFiles < ActiveRecord::Migration[5.0] +class AddMoreControlsToGpxFiles < ActiveRecord::Migration[4.2] def self.up create_enumeration :gpx_visibility_enum, %w[private public trackable identifiable] add_column :gpx_files, :visibility, :gpx_visibility_enum, :default => "public", :null => false diff --git a/db/migrate/040_create_oauth_tables.rb b/db/migrate/040_create_oauth_tables.rb index e718bbc17..5306b173e 100644 --- a/db/migrate/040_create_oauth_tables.rb +++ b/db/migrate/040_create_oauth_tables.rb @@ -1,4 +1,4 @@ -class CreateOauthTables < ActiveRecord::Migration[5.0] +class CreateOauthTables < ActiveRecord::Migration[4.2] def self.up create_table :client_applications do |t| t.string :name diff --git a/db/migrate/041_add_fine_o_auth_permissions.rb b/db/migrate/041_add_fine_o_auth_permissions.rb index 3ce10c4e6..59172fed9 100644 --- a/db/migrate/041_add_fine_o_auth_permissions.rb +++ b/db/migrate/041_add_fine_o_auth_permissions.rb @@ -1,4 +1,4 @@ -class AddFineOAuthPermissions < ActiveRecord::Migration[5.0] +class AddFineOAuthPermissions < ActiveRecord::Migration[4.2] PERMISSIONS = [:allow_read_prefs, :allow_write_prefs, :allow_write_diary, :allow_write_api, :allow_read_gpx, :allow_write_gpx].freeze def self.up diff --git a/db/migrate/042_add_foreign_keys_to_oauth_tables.rb b/db/migrate/042_add_foreign_keys_to_oauth_tables.rb index 4268dddd1..b302458c7 100644 --- a/db/migrate/042_add_foreign_keys_to_oauth_tables.rb +++ b/db/migrate/042_add_foreign_keys_to_oauth_tables.rb @@ -1,6 +1,6 @@ require "migrate" -class AddForeignKeysToOauthTables < ActiveRecord::Migration[5.0] +class AddForeignKeysToOauthTables < ActiveRecord::Migration[4.2] def change add_foreign_key :oauth_tokens, :users, :name => "oauth_tokens_user_id_fkey" add_foreign_key :oauth_tokens, :client_applications, :name => "oauth_tokens_client_application_id_fkey" diff --git a/db/migrate/043_add_referer_to_user_token.rb b/db/migrate/043_add_referer_to_user_token.rb index 0bfe07073..143ac758b 100644 --- a/db/migrate/043_add_referer_to_user_token.rb +++ b/db/migrate/043_add_referer_to_user_token.rb @@ -1,4 +1,4 @@ -class AddRefererToUserToken < ActiveRecord::Migration[5.0] +class AddRefererToUserToken < ActiveRecord::Migration[4.2] def self.up add_column :user_tokens, :referer, :text end diff --git a/db/migrate/044_create_user_roles.rb b/db/migrate/044_create_user_roles.rb index 3a3fa3faf..b62d8b890 100644 --- a/db/migrate/044_create_user_roles.rb +++ b/db/migrate/044_create_user_roles.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateUserRoles < ActiveRecord::Migration[5.0] +class CreateUserRoles < ActiveRecord::Migration[4.2] def self.up create_enumeration :user_role_enum, %w[administrator moderator] diff --git a/db/migrate/045_create_user_blocks.rb b/db/migrate/045_create_user_blocks.rb index 3ccd522f9..182e2f498 100644 --- a/db/migrate/045_create_user_blocks.rb +++ b/db/migrate/045_create_user_blocks.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateUserBlocks < ActiveRecord::Migration[5.0] +class CreateUserBlocks < ActiveRecord::Migration[4.2] def change create_table :user_blocks do |t| t.column :user_id, :bigint, :null => false diff --git a/db/migrate/046_alter_user_roles_and_blocks.rb b/db/migrate/046_alter_user_roles_and_blocks.rb index 812572e23..a61c36344 100644 --- a/db/migrate/046_alter_user_roles_and_blocks.rb +++ b/db/migrate/046_alter_user_roles_and_blocks.rb @@ -1,6 +1,6 @@ require "migrate" -class AlterUserRolesAndBlocks < ActiveRecord::Migration[5.0] +class AlterUserRolesAndBlocks < ActiveRecord::Migration[4.2] def self.up # the initial granter IDs can be "self" - there are none of these # in the current live DB, but there may be some in people's own local diff --git a/db/migrate/047_add_visible_to_diaries.rb b/db/migrate/047_add_visible_to_diaries.rb index 4e76f04ca..86a491da7 100644 --- a/db/migrate/047_add_visible_to_diaries.rb +++ b/db/migrate/047_add_visible_to_diaries.rb @@ -1,4 +1,4 @@ -class AddVisibleToDiaries < ActiveRecord::Migration[5.0] +class AddVisibleToDiaries < ActiveRecord::Migration[4.2] def self.up add_column :diary_entries, :visible, :boolean, :null => false, :default => true add_column :diary_comments, :visible, :boolean, :null => false, :default => true diff --git a/db/migrate/048_add_diary_creation_indexes.rb b/db/migrate/048_add_diary_creation_indexes.rb index 54edfe065..36390255b 100644 --- a/db/migrate/048_add_diary_creation_indexes.rb +++ b/db/migrate/048_add_diary_creation_indexes.rb @@ -1,4 +1,4 @@ -class AddDiaryCreationIndexes < ActiveRecord::Migration[5.0] +class AddDiaryCreationIndexes < ActiveRecord::Migration[4.2] def self.up add_index :diary_entries, [:created_at], :name => "diary_entry_created_at_index" add_index :diary_entries, [:user_id, :created_at], :name => "diary_entry_user_id_created_at_index" diff --git a/db/migrate/049_improve_changeset_user_index.rb b/db/migrate/049_improve_changeset_user_index.rb index 824911327..b58860d60 100644 --- a/db/migrate/049_improve_changeset_user_index.rb +++ b/db/migrate/049_improve_changeset_user_index.rb @@ -1,4 +1,4 @@ -class ImproveChangesetUserIndex < ActiveRecord::Migration[5.0] +class ImproveChangesetUserIndex < ActiveRecord::Migration[4.2] def self.up add_index :changesets, [:user_id, :id], :name => "changesets_user_id_id_idx" remove_index :changesets, :name => "changesets_user_id_idx" diff --git a/db/migrate/050_add_user_index_to_diary_comments.rb b/db/migrate/050_add_user_index_to_diary_comments.rb index 48e0593ba..70eb88b00 100644 --- a/db/migrate/050_add_user_index_to_diary_comments.rb +++ b/db/migrate/050_add_user_index_to_diary_comments.rb @@ -1,4 +1,4 @@ -class AddUserIndexToDiaryComments < ActiveRecord::Migration[5.0] +class AddUserIndexToDiaryComments < ActiveRecord::Migration[4.2] def self.up add_index :diary_comments, [:user_id, :created_at], :name => "diary_comment_user_id_created_at_index" end diff --git a/db/migrate/051_add_status_to_user.rb b/db/migrate/051_add_status_to_user.rb index d3adcee33..a58f8f8c9 100644 --- a/db/migrate/051_add_status_to_user.rb +++ b/db/migrate/051_add_status_to_user.rb @@ -1,6 +1,6 @@ require "migrate" -class AddStatusToUser < ActiveRecord::Migration[5.0] +class AddStatusToUser < ActiveRecord::Migration[4.2] def self.up create_enumeration :user_status_enum, %w[pending active confirmed suspended deleted] diff --git a/db/migrate/052_add_contributor_terms_to_user.rb b/db/migrate/052_add_contributor_terms_to_user.rb index 01835b981..2169b9126 100644 --- a/db/migrate/052_add_contributor_terms_to_user.rb +++ b/db/migrate/052_add_contributor_terms_to_user.rb @@ -1,4 +1,4 @@ -class AddContributorTermsToUser < ActiveRecord::Migration[5.0] +class AddContributorTermsToUser < ActiveRecord::Migration[4.2] def self.up add_column :users, :terms_agreed, :datetime add_column :users, :consider_pd, :boolean, :null => false, :default => false diff --git a/db/migrate/053_add_map_bug_tables.rb b/db/migrate/053_add_map_bug_tables.rb index aac3c11c4..e8e01ec07 100644 --- a/db/migrate/053_add_map_bug_tables.rb +++ b/db/migrate/053_add_map_bug_tables.rb @@ -1,6 +1,6 @@ require "migrate" -class AddMapBugTables < ActiveRecord::Migration[5.0] +class AddMapBugTables < ActiveRecord::Migration[4.2] def self.up create_enumeration :map_bug_status_enum, %w[open closed hidden] diff --git a/db/migrate/054_refactor_map_bug_tables.rb b/db/migrate/054_refactor_map_bug_tables.rb index e29ec0704..4bd713bd7 100644 --- a/db/migrate/054_refactor_map_bug_tables.rb +++ b/db/migrate/054_refactor_map_bug_tables.rb @@ -1,6 +1,6 @@ require "migrate" -class RefactorMapBugTables < ActiveRecord::Migration[5.0] +class RefactorMapBugTables < ActiveRecord::Migration[4.2] def self.up create_table :map_bug_comment do |t| t.column :bug_id, :bigint, :null => false diff --git a/db/migrate/055_change_map_bug_comment_type.rb b/db/migrate/055_change_map_bug_comment_type.rb index 6b8407623..c206325fa 100644 --- a/db/migrate/055_change_map_bug_comment_type.rb +++ b/db/migrate/055_change_map_bug_comment_type.rb @@ -1,6 +1,6 @@ require "migrate" -class ChangeMapBugCommentType < ActiveRecord::Migration[5.0] +class ChangeMapBugCommentType < ActiveRecord::Migration[4.2] def self.up change_column :map_bug_comment, :comment, :text end diff --git a/db/migrate/056_add_date_closed.rb b/db/migrate/056_add_date_closed.rb index 7b1a3233d..57efa7c8a 100644 --- a/db/migrate/056_add_date_closed.rb +++ b/db/migrate/056_add_date_closed.rb @@ -1,6 +1,6 @@ require "migrate" -class AddDateClosed < ActiveRecord::Migration[5.0] +class AddDateClosed < ActiveRecord::Migration[4.2] def self.up add_column :map_bugs, :date_closed, :timestamp end diff --git a/db/migrate/057_add_map_bug_comment_event.rb b/db/migrate/057_add_map_bug_comment_event.rb index 0d1a2c8ab..ecdb967a1 100644 --- a/db/migrate/057_add_map_bug_comment_event.rb +++ b/db/migrate/057_add_map_bug_comment_event.rb @@ -1,6 +1,6 @@ require "migrate" -class AddMapBugCommentEvent < ActiveRecord::Migration[5.0] +class AddMapBugCommentEvent < ActiveRecord::Migration[4.2] def self.up create_enumeration :map_bug_event_enum, %w[opened closed reopened commented hidden] diff --git a/db/migrate/20100513171259_add_user_date_index_to_changeset.rb b/db/migrate/20100513171259_add_user_date_index_to_changeset.rb index 7c9c13782..d15cad5ed 100644 --- a/db/migrate/20100513171259_add_user_date_index_to_changeset.rb +++ b/db/migrate/20100513171259_add_user_date_index_to_changeset.rb @@ -1,4 +1,4 @@ -class AddUserDateIndexToChangeset < ActiveRecord::Migration[5.0] +class AddUserDateIndexToChangeset < ActiveRecord::Migration[4.2] def self.up add_index :changesets, [:user_id, :created_at], :name => "changesets_user_id_created_at_idx" end diff --git a/db/migrate/20100516124737_add_open_id.rb b/db/migrate/20100516124737_add_open_id.rb index 74d86440c..4b686beb4 100644 --- a/db/migrate/20100516124737_add_open_id.rb +++ b/db/migrate/20100516124737_add_open_id.rb @@ -1,4 +1,4 @@ -class AddOpenId < ActiveRecord::Migration[5.0] +class AddOpenId < ActiveRecord::Migration[4.2] def self.up add_column :users, :openid_url, :string add_index :users, [:openid_url], :name => "user_openid_url_idx", :unique => true diff --git a/db/migrate/20100910084426_add_callback_to_oauth_tokens.rb b/db/migrate/20100910084426_add_callback_to_oauth_tokens.rb index 5db1201fd..65e42eab7 100644 --- a/db/migrate/20100910084426_add_callback_to_oauth_tokens.rb +++ b/db/migrate/20100910084426_add_callback_to_oauth_tokens.rb @@ -1,4 +1,4 @@ -class AddCallbackToOauthTokens < ActiveRecord::Migration[5.0] +class AddCallbackToOauthTokens < ActiveRecord::Migration[4.2] def self.up add_column :oauth_tokens, :callback_url, :string add_column :oauth_tokens, :verifier, :string, :limit => 20 diff --git a/db/migrate/20101114011429_add_editor_preference_to_user.rb b/db/migrate/20101114011429_add_editor_preference_to_user.rb index b7f82e325..85d9a9399 100644 --- a/db/migrate/20101114011429_add_editor_preference_to_user.rb +++ b/db/migrate/20101114011429_add_editor_preference_to_user.rb @@ -1,4 +1,4 @@ -class AddEditorPreferenceToUser < ActiveRecord::Migration[5.0] +class AddEditorPreferenceToUser < ActiveRecord::Migration[4.2] def self.up add_column :users, :preferred_editor, :string end diff --git a/db/migrate/20110322001319_add_terms_seen_to_user.rb b/db/migrate/20110322001319_add_terms_seen_to_user.rb index a95f15b4e..729048bb2 100644 --- a/db/migrate/20110322001319_add_terms_seen_to_user.rb +++ b/db/migrate/20110322001319_add_terms_seen_to_user.rb @@ -1,4 +1,4 @@ -class AddTermsSeenToUser < ActiveRecord::Migration[5.0] +class AddTermsSeenToUser < ActiveRecord::Migration[4.2] def self.up add_column :users, :terms_seen, :boolean, :null => false, :default => false diff --git a/db/migrate/20110508145337_cleanup_bug_tables.rb b/db/migrate/20110508145337_cleanup_bug_tables.rb index 2a285b453..763b456a9 100644 --- a/db/migrate/20110508145337_cleanup_bug_tables.rb +++ b/db/migrate/20110508145337_cleanup_bug_tables.rb @@ -1,4 +1,4 @@ -class CleanupBugTables < ActiveRecord::Migration[5.0] +class CleanupBugTables < ActiveRecord::Migration[4.2] def self.up rename_column :map_bugs, :date_created, :created_at rename_column :map_bugs, :last_changed, :updated_at diff --git a/db/migrate/20110521142405_rename_bugs_to_notes.rb b/db/migrate/20110521142405_rename_bugs_to_notes.rb index a22041a29..54b443b32 100644 --- a/db/migrate/20110521142405_rename_bugs_to_notes.rb +++ b/db/migrate/20110521142405_rename_bugs_to_notes.rb @@ -1,6 +1,6 @@ require "migrate" -class RenameBugsToNotes < ActiveRecord::Migration[5.0] +class RenameBugsToNotes < ActiveRecord::Migration[4.2] def self.up rename_enumeration "map_bug_status_enum", "note_status_enum" rename_enumeration "map_bug_event_enum", "note_event_enum" diff --git a/db/migrate/20110925112722_rename_ids.rb b/db/migrate/20110925112722_rename_ids.rb index 7d7aa8f94..661e405af 100644 --- a/db/migrate/20110925112722_rename_ids.rb +++ b/db/migrate/20110925112722_rename_ids.rb @@ -1,4 +1,4 @@ -class RenameIds < ActiveRecord::Migration[5.0] +class RenameIds < ActiveRecord::Migration[4.2] def change rename_column :changeset_tags, :id, :changeset_id rename_column :current_node_tags, :id, :node_id diff --git a/db/migrate/20111116184519_update_oauth.rb b/db/migrate/20111116184519_update_oauth.rb index 654e79ef3..07b17c05a 100644 --- a/db/migrate/20111116184519_update_oauth.rb +++ b/db/migrate/20111116184519_update_oauth.rb @@ -1,4 +1,4 @@ -class UpdateOauth < ActiveRecord::Migration[5.0] +class UpdateOauth < ActiveRecord::Migration[4.2] def up add_column :oauth_tokens, :scope, :string add_column :oauth_tokens, :valid_to, :timestamp diff --git a/db/migrate/20111212183945_add_lowercase_user_indexes.rb b/db/migrate/20111212183945_add_lowercase_user_indexes.rb index 7d1a5e9a9..202b23388 100644 --- a/db/migrate/20111212183945_add_lowercase_user_indexes.rb +++ b/db/migrate/20111212183945_add_lowercase_user_indexes.rb @@ -1,6 +1,6 @@ require "migrate" -class AddLowercaseUserIndexes < ActiveRecord::Migration[5.0] +class AddLowercaseUserIndexes < ActiveRecord::Migration[4.2] def up add_index :users, [], :columns => "LOWER(display_name)", :name => "users_display_name_lower_idx" add_index :users, [], :columns => "LOWER(email)", :name => "users_email_lower_idx" diff --git a/db/migrate/20120123184321_switch_to_paperclip.rb b/db/migrate/20120123184321_switch_to_paperclip.rb index 8dfcce4fb..d5d8908c1 100644 --- a/db/migrate/20120123184321_switch_to_paperclip.rb +++ b/db/migrate/20120123184321_switch_to_paperclip.rb @@ -1,4 +1,4 @@ -class SwitchToPaperclip < ActiveRecord::Migration[5.0] +class SwitchToPaperclip < ActiveRecord::Migration[4.2] def up rename_column :users, :image, :image_file_name end diff --git a/db/migrate/20120208122334_merge_acl_address_and_mask.rb b/db/migrate/20120208122334_merge_acl_address_and_mask.rb index 1e67f46dd..48cdbbc2a 100644 --- a/db/migrate/20120208122334_merge_acl_address_and_mask.rb +++ b/db/migrate/20120208122334_merge_acl_address_and_mask.rb @@ -10,7 +10,7 @@ class IPAddr end end -class MergeAclAddressAndMask < ActiveRecord::Migration[5.0] +class MergeAclAddressAndMask < ActiveRecord::Migration[4.2] def up Acl.find_each do |acl| address = IPAddr.new(acl.address) diff --git a/db/migrate/20120208194454_add_domain_to_acl.rb b/db/migrate/20120208194454_add_domain_to_acl.rb index 5dd1b6957..51f114758 100644 --- a/db/migrate/20120208194454_add_domain_to_acl.rb +++ b/db/migrate/20120208194454_add_domain_to_acl.rb @@ -1,4 +1,4 @@ -class AddDomainToAcl < ActiveRecord::Migration[5.0] +class AddDomainToAcl < ActiveRecord::Migration[4.2] def up add_column :acls, :domain, :string change_column :acls, :address, :inet, :null => true diff --git a/db/migrate/20120214210114_add_text_format.rb b/db/migrate/20120214210114_add_text_format.rb index 8e6853188..6ec84ce44 100644 --- a/db/migrate/20120214210114_add_text_format.rb +++ b/db/migrate/20120214210114_add_text_format.rb @@ -1,6 +1,6 @@ require "migrate" -class AddTextFormat < ActiveRecord::Migration[5.0] +class AddTextFormat < ActiveRecord::Migration[4.2] def up create_enumeration :format_enum, %w[html markdown text] add_column :users, :description_format, :format_enum, :null => false, :default => "html" diff --git a/db/migrate/20120219161649_add_user_image_fingerprint.rb b/db/migrate/20120219161649_add_user_image_fingerprint.rb index c3dc5c51a..1e6a19c21 100644 --- a/db/migrate/20120219161649_add_user_image_fingerprint.rb +++ b/db/migrate/20120219161649_add_user_image_fingerprint.rb @@ -1,4 +1,4 @@ -class AddUserImageFingerprint < ActiveRecord::Migration[5.0] +class AddUserImageFingerprint < ActiveRecord::Migration[4.2] def up add_column :users, :image_fingerprint, :string, :null => true diff --git a/db/migrate/20120318201948_create_redactions.rb b/db/migrate/20120318201948_create_redactions.rb index 1cdcc8625..e108ea84b 100644 --- a/db/migrate/20120318201948_create_redactions.rb +++ b/db/migrate/20120318201948_create_redactions.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateRedactions < ActiveRecord::Migration[5.0] +class CreateRedactions < ActiveRecord::Migration[4.2] def change create_table :redactions do |t| t.string :title diff --git a/db/migrate/20120328090602_drop_session_table.rb b/db/migrate/20120328090602_drop_session_table.rb index ad0789ae3..5423974e5 100644 --- a/db/migrate/20120328090602_drop_session_table.rb +++ b/db/migrate/20120328090602_drop_session_table.rb @@ -1,6 +1,6 @@ require "migrate" -class DropSessionTable < ActiveRecord::Migration[5.0] +class DropSessionTable < ActiveRecord::Migration[4.2] def up drop_table "sessions" end diff --git a/db/migrate/20120404205604_add_user_and_description_to_redaction.rb b/db/migrate/20120404205604_add_user_and_description_to_redaction.rb index 32d188c8f..f23bd2ffc 100644 --- a/db/migrate/20120404205604_add_user_and_description_to_redaction.rb +++ b/db/migrate/20120404205604_add_user_and_description_to_redaction.rb @@ -1,6 +1,6 @@ require "migrate" -class AddUserAndDescriptionToRedaction < ActiveRecord::Migration[5.0] +class AddUserAndDescriptionToRedaction < ActiveRecord::Migration[4.2] def change add_column :redactions, :user_id, :bigint, :null => false add_column :redactions, :description_format, :format_enum, :null => false, :default => "markdown" diff --git a/db/migrate/20120808231205_add_counter_caches.rb b/db/migrate/20120808231205_add_counter_caches.rb index 1dffb8ffd..45cee5331 100644 --- a/db/migrate/20120808231205_add_counter_caches.rb +++ b/db/migrate/20120808231205_add_counter_caches.rb @@ -1,4 +1,4 @@ -class AddCounterCaches < ActiveRecord::Migration[5.0] +class AddCounterCaches < ActiveRecord::Migration[4.2] def self.up add_column :users, :changesets_count, :integer, :null => false, :default => 0 add_column :users, :traces_count, :integer, :null => false, :default => 0 diff --git a/db/migrate/20121005195010_add_diary_entry_counter_caches.rb b/db/migrate/20121005195010_add_diary_entry_counter_caches.rb index 1a61ddd41..d145c6bd5 100644 --- a/db/migrate/20121005195010_add_diary_entry_counter_caches.rb +++ b/db/migrate/20121005195010_add_diary_entry_counter_caches.rb @@ -1,4 +1,4 @@ -class AddDiaryEntryCounterCaches < ActiveRecord::Migration[5.0] +class AddDiaryEntryCounterCaches < ActiveRecord::Migration[4.2] def self.up add_column :users, :diary_entries_count, :integer, :null => false, :default => 0 diff --git a/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb b/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb index 532edd2c7..6099f5546 100644 --- a/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb +++ b/db/migrate/20121012044047_add_image_use_gravatar_to_users.rb @@ -1,4 +1,4 @@ -class AddImageUseGravatarToUsers < ActiveRecord::Migration[5.0] +class AddImageUseGravatarToUsers < ActiveRecord::Migration[4.2] def self.up add_column :users, :image_use_gravatar, :boolean, :null => false, :default => false diff --git a/db/migrate/20121119165817_drop_nearby_place_from_notes.rb b/db/migrate/20121119165817_drop_nearby_place_from_notes.rb index 1aaa43fff..7e6f27f99 100644 --- a/db/migrate/20121119165817_drop_nearby_place_from_notes.rb +++ b/db/migrate/20121119165817_drop_nearby_place_from_notes.rb @@ -1,4 +1,4 @@ -class DropNearbyPlaceFromNotes < ActiveRecord::Migration[5.0] +class DropNearbyPlaceFromNotes < ActiveRecord::Migration[4.2] def up remove_column :notes, :nearby_place end diff --git a/db/migrate/20121202155309_remove_author_name_from_note_comment.rb b/db/migrate/20121202155309_remove_author_name_from_note_comment.rb index b844d0ca1..758df5c37 100644 --- a/db/migrate/20121202155309_remove_author_name_from_note_comment.rb +++ b/db/migrate/20121202155309_remove_author_name_from_note_comment.rb @@ -1,4 +1,4 @@ -class RemoveAuthorNameFromNoteComment < ActiveRecord::Migration[5.0] +class RemoveAuthorNameFromNoteComment < ActiveRecord::Migration[4.2] def up remove_column :note_comments, :author_name end diff --git a/db/migrate/20121203124841_change_note_address_to_inet.rb b/db/migrate/20121203124841_change_note_address_to_inet.rb index 5ba8611cf..e2956daf9 100644 --- a/db/migrate/20121203124841_change_note_address_to_inet.rb +++ b/db/migrate/20121203124841_change_note_address_to_inet.rb @@ -1,4 +1,4 @@ -class ChangeNoteAddressToInet < ActiveRecord::Migration[5.0] +class ChangeNoteAddressToInet < ActiveRecord::Migration[4.2] def up execute "ALTER TABLE note_comments ALTER COLUMN author_ip TYPE inet USING CAST(author_ip AS inet)" end diff --git a/db/migrate/20130328184137_add_write_notes_permission.rb b/db/migrate/20130328184137_add_write_notes_permission.rb index 6db39f49f..254b5a0ee 100644 --- a/db/migrate/20130328184137_add_write_notes_permission.rb +++ b/db/migrate/20130328184137_add_write_notes_permission.rb @@ -1,4 +1,4 @@ -class AddWriteNotesPermission < ActiveRecord::Migration[5.0] +class AddWriteNotesPermission < ActiveRecord::Migration[4.2] def up add_column :oauth_tokens, :allow_write_notes, :boolean, :null => false, :default => false add_column :client_applications, :allow_write_notes, :boolean, :null => false, :default => false diff --git a/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb b/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb index baee598cb..309af1d26 100644 --- a/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb +++ b/db/migrate/20131212124700_add_created_at_index_to_note_comments.rb @@ -1,4 +1,4 @@ -class AddCreatedAtIndexToNoteComments < ActiveRecord::Migration[5.0] +class AddCreatedAtIndexToNoteComments < ActiveRecord::Migration[4.2] def change add_index :note_comments, :created_at end diff --git a/db/migrate/20140115192822_add_text_index_to_note_comments.rb b/db/migrate/20140115192822_add_text_index_to_note_comments.rb index cc9736988..dc17d386e 100644 --- a/db/migrate/20140115192822_add_text_index_to_note_comments.rb +++ b/db/migrate/20140115192822_add_text_index_to_note_comments.rb @@ -1,6 +1,6 @@ require "migrate" -class AddTextIndexToNoteComments < ActiveRecord::Migration[5.0] +class AddTextIndexToNoteComments < ActiveRecord::Migration[4.2] def up add_index :note_comments, [], :columns => "to_tsvector('english', body)", :using => "GIN", :name => "index_note_comments_on_body" end diff --git a/db/migrate/20140117185510_drop_countries.rb b/db/migrate/20140117185510_drop_countries.rb index 1b58c9fc0..1102cbc88 100644 --- a/db/migrate/20140117185510_drop_countries.rb +++ b/db/migrate/20140117185510_drop_countries.rb @@ -1,4 +1,4 @@ -class DropCountries < ActiveRecord::Migration[5.0] +class DropCountries < ActiveRecord::Migration[4.2] def up drop_table :countries end diff --git a/db/migrate/20140210003018_add_user_image_content_type.rb b/db/migrate/20140210003018_add_user_image_content_type.rb index 4001ae8fb..cfad48d96 100644 --- a/db/migrate/20140210003018_add_user_image_content_type.rb +++ b/db/migrate/20140210003018_add_user_image_content_type.rb @@ -1,4 +1,4 @@ -class AddUserImageContentType < ActiveRecord::Migration[5.0] +class AddUserImageContentType < ActiveRecord::Migration[4.2] def change add_column :users, :image_content_type, :string end diff --git a/db/migrate/20140507110937_create_changeset_comments.rb b/db/migrate/20140507110937_create_changeset_comments.rb index d4475b4d8..fdcdaf65d 100644 --- a/db/migrate/20140507110937_create_changeset_comments.rb +++ b/db/migrate/20140507110937_create_changeset_comments.rb @@ -1,6 +1,6 @@ require "migrate" -class CreateChangesetComments < ActiveRecord::Migration[5.0] +class CreateChangesetComments < ActiveRecord::Migration[4.2] def change create_table :changeset_comments do |t| t.column :changeset_id, :bigint, :null => false diff --git a/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb b/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb index a5cfabd69..c761af38b 100644 --- a/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb +++ b/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb @@ -1,6 +1,6 @@ require "migrate" -class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration[5.0] +class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration[4.2] def change create_table :changesets_subscribers, :id => false do |t| t.column :subscriber_id, :bigint, :null => false diff --git a/db/migrate/20150110152606_change_default_formats.rb b/db/migrate/20150110152606_change_default_formats.rb index 3f18f6ac2..33de9b9c3 100644 --- a/db/migrate/20150110152606_change_default_formats.rb +++ b/db/migrate/20150110152606_change_default_formats.rb @@ -1,4 +1,4 @@ -class ChangeDefaultFormats < ActiveRecord::Migration[5.0] +class ChangeDefaultFormats < ActiveRecord::Migration[4.2] def up change_column_default :diary_entries, :body_format, "markdown" change_column_default :diary_comments, :body_format, "markdown" diff --git a/db/migrate/20150111192335_subscribe_old_changesets.rb b/db/migrate/20150111192335_subscribe_old_changesets.rb index 0a722b3a1..ad23026d0 100644 --- a/db/migrate/20150111192335_subscribe_old_changesets.rb +++ b/db/migrate/20150111192335_subscribe_old_changesets.rb @@ -1,4 +1,4 @@ -class SubscribeOldChangesets < ActiveRecord::Migration[5.0] +class SubscribeOldChangesets < ActiveRecord::Migration[4.2] def up Changeset.find_each do |changeset| changeset.subscribers << changeset.user unless changeset.subscribers.exists?(changeset.user.id) diff --git a/db/migrate/20150222101847_rename_openid_url.rb b/db/migrate/20150222101847_rename_openid_url.rb index 8d49dc973..3b9a8effd 100644 --- a/db/migrate/20150222101847_rename_openid_url.rb +++ b/db/migrate/20150222101847_rename_openid_url.rb @@ -1,4 +1,4 @@ -class RenameOpenidUrl < ActiveRecord::Migration[5.0] +class RenameOpenidUrl < ActiveRecord::Migration[4.2] def change rename_column :users, :openid_url, :auth_uid add_column :users, :auth_provider, :string diff --git a/db/migrate/20150818224516_set_default_gravatar_to_false_for_privacy.rb b/db/migrate/20150818224516_set_default_gravatar_to_false_for_privacy.rb index 28f3c828d..4d4ef0296 100644 --- a/db/migrate/20150818224516_set_default_gravatar_to_false_for_privacy.rb +++ b/db/migrate/20150818224516_set_default_gravatar_to_false_for_privacy.rb @@ -1,4 +1,4 @@ -class SetDefaultGravatarToFalseForPrivacy < ActiveRecord::Migration[5.0] +class SetDefaultGravatarToFalseForPrivacy < ActiveRecord::Migration[4.2] def up change_column :users, :image_use_gravatar, :boolean, :default => false end diff --git a/db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb b/db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb index 088b9d28b..624eb10f9 100644 --- a/db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb +++ b/db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb @@ -1,6 +1,6 @@ require "migrate" -class AddJoinTableBetweenUsersAndDiaryEntries < ActiveRecord::Migration[5.0] +class AddJoinTableBetweenUsersAndDiaryEntries < ActiveRecord::Migration[4.2] def self.up create_table :diary_entry_subscriptions, :id => false do |t| t.column :user_id, :bigint, :null => false diff --git a/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb b/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb index 219386900..a02f52fe8 100644 --- a/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb +++ b/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb @@ -1,4 +1,4 @@ -class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[5.0] +class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[4.2] def up DiaryEntry.find_each do |diary_entry| diary_entry.subscriptions.create(:user => diary_entry.user) unless diary_entry.subscribers.exists?(diary_entry.user.id) diff --git a/db/migrate/20170222134109_add_user_indexes.rb b/db/migrate/20170222134109_add_user_indexes.rb index b138039ea..97ae11f78 100644 --- a/db/migrate/20170222134109_add_user_indexes.rb +++ b/db/migrate/20170222134109_add_user_indexes.rb @@ -1,4 +1,4 @@ -class AddUserIndexes < ActiveRecord::Migration[5.0] +class AddUserIndexes < ActiveRecord::Migration[4.2] def change add_index :oauth_tokens, [:user_id] add_index :client_applications, [:user_id] -- 2.39.5