Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
	db/migrate/20170716191202_add_hide_notifications_to_mute.rb
	spec/controllers/application_controller_spec.rb

Took our version, upstream changes were only minor style linting.
This commit is contained in:
Thibaut Girka
2018-10-05 15:23:57 +02:00
93 changed files with 406 additions and 324 deletions

View File

@ -34,12 +34,12 @@ class CreateDoorkeeperTables < ActiveRecord::Migration[4.2]
# https://github.com/doorkeeper-gem/doorkeeper/tree/v3.0.0.rc1#custom-access-token-generator
#
# t.text :token, null: false
t.string :token, null: false
t.string :token, null: false
t.string :refresh_token
t.integer :expires_in
t.datetime :revoked_at
t.datetime :created_at, null: false
t.datetime :created_at, null: false
t.string :scopes
end

View File

@ -4,4 +4,4 @@ class AddOwnerToApplication < ActiveRecord::Migration[4.2]
add_column :oauth_applications, :owner_type, :string, null: true
add_index :oauth_applications, [:owner_id, :owner_type]
end
end
end

View File

@ -7,7 +7,7 @@ end
class RailsSettingsMigration < MIGRATION_BASE_CLASS
def self.up
create_table :settings do |t|
t.string :var, :null => false
t.string :var, :null => false
t.text :value
t.references :target, :null => false, :polymorphic => true
t.timestamps :null => true

View File

@ -8,7 +8,7 @@ class AddShortcodeToMediaAttachments < ActiveRecord::Migration[5.0]
end
def down
remove_index :media_attachments, :shortcode
remove_column :media_attachments, :shortcode
remove_index :media_attachments, :shortcode
remove_column :media_attachments, :shortcode
end
end

View File

@ -1,5 +1,4 @@
class ChangeTagSearchIndexToBtree < ActiveRecord::Migration[5.1]
def up
remove_index :tags, name: :hashtag_search_index
execute 'CREATE INDEX hashtag_search_index ON tags (name text_pattern_ops);'

View File

@ -28,7 +28,7 @@ class FixReblogsInFeeds < ActiveRecord::Migration[5.1]
-- So, first, we iterate over the user's feed to find any reblogs.
local items = redis.call('zrange', timeline_key, 0, -1, 'withscores')
for i = 1, #items, 2 do
local reblogged_id = items[i]
local reblogging_id = items[i + 1]

View File

@ -11,7 +11,7 @@ class AddReblogsToFollows < ActiveRecord::Migration[5.1]
add_column_with_default :follow_requests, :show_reblogs, :boolean, default: true, allow_null: false
end
end
def down
remove_column :follows, :show_reblogs
remove_column :follow_requests, :show_reblogs

View File

@ -11,7 +11,6 @@
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_08_20_232245) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"