diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-05-10 15:15:39 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-05-10 16:19:56 +0200 |
commit | 4a70792b4a8393a0cfd83a7e70f72179899111fa (patch) | |
tree | d340885b5dfb0f990c81b1a29f529a258c49d591 /db | |
parent | c6ff4c634caf718adf7280e04909c091d15add1d (diff) | |
parent | 4b766f984689311523b89e1b68d2a11dff3fc396 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `Gemfile.lock`: Not a real conflict, just a glitch-soc-only dependency too close to a dependency that got updated upstream. Updated as well. - `app/models/status.rb`: Not a real conflict, just a change too close to glitch-soc-changed code for optionally showing boosts in public timelines. Applied upstream changes. - `app/views/layouts/application.html.haml`: Upstream a new, static CSS file, conflict due to glitch-soc's theming system, include the file regardless of the theme. - `config/initializers/content_security_policy.rb`: Upstream dropped 'unsafe-inline' from the 'style-src' directive, but both files are very different. Removed 'unsafe-inline' as well.
Diffstat (limited to 'db')
8 files changed, 22 insertions, 8 deletions
diff --git a/db/migrate/20171125031751_add_invite_id_to_users.rb b/db/migrate/20171125031751_add_invite_id_to_users.rb index 16829f866..9cfb0c542 100644 --- a/db/migrate/20171125031751_add_invite_id_to_users.rb +++ b/db/migrate/20171125031751_add_invite_id_to_users.rb @@ -1,5 +1,5 @@ class AddInviteIdToUsers < ActiveRecord::Migration[5.1] def change - add_reference :users, :invite, null: true, default: nil, foreign_key: { on_delete: :nullify }, index: false + safety_assured { add_reference :users, :invite, null: true, default: nil, foreign_key: { on_delete: :nullify }, index: false } end end diff --git a/db/migrate/20180402031200_add_assigned_account_id_to_reports.rb b/db/migrate/20180402031200_add_assigned_account_id_to_reports.rb index 0456839c4..e2d1371d2 100644 --- a/db/migrate/20180402031200_add_assigned_account_id_to_reports.rb +++ b/db/migrate/20180402031200_add_assigned_account_id_to_reports.rb @@ -1,5 +1,5 @@ class AddAssignedAccountIdToReports < ActiveRecord::Migration[5.1] def change - add_reference :reports, :assigned_account, null: true, default: nil, foreign_key: { on_delete: :nullify, to_table: :accounts }, index: false + safety_assured { add_reference :reports, :assigned_account, null: true, default: nil, foreign_key: { on_delete: :nullify, to_table: :accounts }, index: false } end end diff --git a/db/migrate/20180510214435_add_access_token_id_to_web_push_subscriptions.rb b/db/migrate/20180510214435_add_access_token_id_to_web_push_subscriptions.rb index 94ef8e0f5..f60716532 100644 --- a/db/migrate/20180510214435_add_access_token_id_to_web_push_subscriptions.rb +++ b/db/migrate/20180510214435_add_access_token_id_to_web_push_subscriptions.rb @@ -1,6 +1,8 @@ class AddAccessTokenIdToWebPushSubscriptions < ActiveRecord::Migration[5.2] def change - add_reference :web_push_subscriptions, :access_token, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :oauth_access_tokens }, index: false - add_reference :web_push_subscriptions, :user, null: true, default: nil, foreign_key: { on_delete: :cascade }, index: false + safety_assured do + add_reference :web_push_subscriptions, :access_token, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :oauth_access_tokens }, index: false + add_reference :web_push_subscriptions, :user, null: true, default: nil, foreign_key: { on_delete: :cascade }, index: false + end end end diff --git a/db/migrate/20181219235220_add_created_by_application_id_to_users.rb b/db/migrate/20181219235220_add_created_by_application_id_to_users.rb index 17ce900af..81c9237e8 100644 --- a/db/migrate/20181219235220_add_created_by_application_id_to_users.rb +++ b/db/migrate/20181219235220_add_created_by_application_id_to_users.rb @@ -2,7 +2,7 @@ class AddCreatedByApplicationIdToUsers < ActiveRecord::Migration[5.2] disable_ddl_transaction! def change - add_reference :users, :created_by_application, foreign_key: { to_table: 'oauth_applications', on_delete: :nullify }, index: false + safety_assured { add_reference :users, :created_by_application, foreign_key: { to_table: 'oauth_applications', on_delete: :nullify }, index: false } add_index :users, :created_by_application_id, algorithm: :concurrently end end diff --git a/db/migrate/20190103124754_add_scheduled_status_id_to_media_attachments.rb b/db/migrate/20190103124754_add_scheduled_status_id_to_media_attachments.rb index 6f6cf2351..7d904af60 100644 --- a/db/migrate/20190103124754_add_scheduled_status_id_to_media_attachments.rb +++ b/db/migrate/20190103124754_add_scheduled_status_id_to_media_attachments.rb @@ -2,7 +2,7 @@ class AddScheduledStatusIdToMediaAttachments < ActiveRecord::Migration[5.2] disable_ddl_transaction! def change - add_reference :media_attachments, :scheduled_status, foreign_key: { on_delete: :nullify }, index: false + safety_assured { add_reference :media_attachments, :scheduled_status, foreign_key: { on_delete: :nullify }, index: false } add_index :media_attachments, :scheduled_status_id, algorithm: :concurrently end end diff --git a/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb b/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb index 03915040c..54ca3b87c 100644 --- a/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb +++ b/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb @@ -1,5 +1,5 @@ class AddParentIdToEmailDomainBlocks < ActiveRecord::Migration[5.2] def change - add_reference :email_domain_blocks, :parent, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :email_domain_blocks }, index: false + safety_assured { add_reference :email_domain_blocks, :parent, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :email_domain_blocks }, index: false } end end diff --git a/db/migrate/20200508212852_reset_unique_jobs_locks.rb b/db/migrate/20200508212852_reset_unique_jobs_locks.rb new file mode 100644 index 000000000..3ffdeb0aa --- /dev/null +++ b/db/migrate/20200508212852_reset_unique_jobs_locks.rb @@ -0,0 +1,12 @@ +class ResetUniqueJobsLocks < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def up + # We do this to clean up unique job digests that were not properly + # disposed of prior to https://github.com/tootsuite/mastodon/pull/13361 + + SidekiqUniqueJobs::Digests.delete_by_pattern('*', count: SidekiqUniqueJobs::Digests.count) + end + + def down; end +end diff --git a/db/schema.rb b/db/schema.rb index 2b27a1877..9bdff23e7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_04_17_125749) do +ActiveRecord::Schema.define(version: 2020_05_08_212852) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |