about summary refs log tree commit diff
path: root/db/post_migrate
AgeCommit message (Collapse)Author
2023-04-09Fix most rubocop issues (#2165)Claire
* Run rubocop --autocorrect on app/, config/ and lib/, also manually fix some remaining style issues * Run rubocop --autocorrect-all on db/ * Run rubocop --autocorrect-all on `spec/` and fix remaining issues
2023-03-31Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Upstream added a link to the roadmap, but we have a completely different README. Kept ours. - `app/models/media_attachment.rb`: Upstream upped media attachment limits. Updated the default according to upstream's. - `db/migrate/20180831171112_create_bookmarks.rb`: Upstream changed the migration compatibility level. Did so too. - `config/initializers/content_security_policy.rb`: Upstream refactored this file but we have a different version. Kept our version. - `app/controllers/settings/preferences_controller.rb`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. The file does not directly references individual settings anymore. Applied upstream changes. - `app/lib/user_settings_decorator.rb`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. The file got removed entirely. Removed it as well. - `app/models/user.rb`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. References to individual settings have been removed from the file. Removed them as well. - `app/views/settings/preferences/appearance/show.html.haml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. Applied upstream's changes and ported ours back. - `app/views/settings/preferences/notifications/show.html.haml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. Applied upstream's changes and ported ours back. - `app/views/settings/preferences/other/show.html.haml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. Applied upstream's changes and ported ours back. - `config/settings.yml`: Upstream completely refactored user settings storage, and glitch-soc has a different set of settings. In particular, upstream removed user-specific and unused settings. Did the same in glitch-soc. - `spec/controllers/application_controller_spec.rb`: Conflicts due to glitch-soc's theming system. Mostly kept our version, as upstream messed up the tests.
2023-03-27Update strong-migrations-enabled migrations from 5.0 and 5.1 to 5.2 (#24275)Claire
2023-03-26Reset model in migration after removing column (#24250)Matt Jankowski
2023-02-25Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.prettierignore`: Upstream added a line at the end of the file, while glitch-soc had its own extra lines. Took upstream's change. - `CONTRIBUTING.md`: We have our custom CONTRIBUTING.md quoting upstream. Upstream made changes. Ported upstream changes. - `app/controllers/application_controller.rb`: Upstream made code style changes in a method that is entirely replaced in glitch-soc. Ignored the change. - `app/models/account.rb`: Code style changes textually close to glitch-soc-specific changes. Ported upstream changes. - `lib/sanitize_ext/sanitize_config.rb`: Upstream code style changes. Ignored them.
2023-02-20Autofix Rubocop remaining Layout rules (#23679)Nick Schonning
2023-02-20Autofix Rubocop Rails/RedundantForeignKey (#23731)Nick Schonning
2023-02-19Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/dependabot.yml`: Upstream made changes while we have dropped this file. Keep the file deleted. - `.prettierignore`: Upstream made changes at the end of the file, where we had our extra lines. Just moved our extra lines back at the end. - `app/serializers/initial_state_serializer.rb`: Upstream code style changes. Applied them. - `app/services/backup_service.rb`: Upstream code style changes. Applied them.
2023-02-18Run rubocop formatting except line length (#23632)Nick Schonning
2022-12-07Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/concerns/domain_materializable.rb`: Fixed a code style issue upstream in a PR that got merged in glitch-soc earlier. Changed the code to match upstream's.
2022-12-06Fix pre-4.0 admin action logs (#22091)Claire
* Fix BackfillAdminActionLogs post-deployment migration * Improve migration tests * Backfill admin action logs again
2022-11-06Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/javascript/mastodon/features/compose/components/poll_form.js`: glitch-soc change because of having changed the default number of available poll options. Applied upstream's changes while keeping glitch-soc's default number of poll options. - `public/oops.png`: We had a minor graphics change, probably not worth diverging from upstream. Took upstream version.
2022-11-03Fix admin action logs page (#19649)Claire
* Add tests * Fix crash when trying to display orphaned action logs * Add migration for older admin action logs
2022-11-02Change migration to migrate admins to Owner role rather than Admin role (#19671)Claire
2022-08-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/settings/preferences_controller.rb`: Upstream dropping `digest` from notifications emails while we have more notification emails settings. Removed `digest` from our list while keeping our extra settings. - `app/javascript/packs/admin.js`: Conflicts caused by glitch-soc's theming system. Applied the changes to `app/javascript/core/admin.js`. - `app/views/settings/preferences/other/show.html.haml`: Upstream removed a setting close to a glitch-soc-only setting. Applied upstream's change.
2022-08-27Fix crash when adding a new filter (#18894)Claire
Fixes #18742
2022-08-25Add audit log entries for user roles (#19040)Eugen Rochko
* Refactor audit log schema * Add audit log entries for user roles
2022-07-05Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/controllers/admin/base_controller.rb`: Minor conflict caused by glitch-soc's theming system. - `app/javascript/mastodon/initial_state.js`: Minor conflict caused by glitch-soc making use of max_toot_chars. - `app/models/form/admin_settings.rb`: Minor conflict caused by glitch-soc's theming system. - `app/models/trends.rb`: Minor conflict caused by glitch-soc having more granular notification settings for trends. - `app/views/admin/accounts/index.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/admin/instances/show.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/layouts/application.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/settings/preferences/notifications/show.html.haml`: Minor conflict caused by glitch-soc having more granular notification settings for trends. - `config/navigation.rb`: Minor conflict caused by glitch-soc having additional navigation items for the theming system while upstream slightly changed every line.
2022-07-05Add customizable user roles (#18641)Eugen Rochko
* Add customizable user roles * Various fixes and improvements * Add migration for old settings and fix tootctl role management
2022-06-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/workflows/build-image.yml`: Fix erroneous deletion in a previous merge. - `Gemfile`: Conflict caused by glitch-soc-only hCaptcha dependency - `app/controllers/auth/sessions_controller.rb`: Minor conflict due to glitch-soc's theming system. - `app/controllers/filters_controller.rb`: Minor conflict due to glitch-soc's theming system. - `app/serializers/rest/status_serializer.rb`: Minor conflict due to glitch-soc having an extra `local_only` property
2022-06-28Revamp post filtering system (#18058)Claire
* Add model for custom filter keywords * Use CustomFilterKeyword internally Does not change the API * Fix /filters/edit and /filters/new * Add migration tests * Remove whole_word column from custom_filters (covered by custom_filter_keywords) * Redesign /filters Instead of a list, present a card that displays more information and handles multiple keywords per filter. * Redesign /filters/new and /filters/edit to add and remove keywords This adds a new gem dependency: cocoon, as well as a npm dependency: cocoon-js-vanilla. Those are used to easily populate and remove form fields from the user interface when manipulating multiple keyword filters at once. * Add /api/v2/filters to edit filter with multiple keywords Entities: - `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context` `keywords` - `FilterKeyword`: `id`, `keyword`, `whole_word` API endpoits: - `GET /api/v2/filters` to list filters (including keywords) - `POST /api/v2/filters` to create a new filter `keywords_attributes` can also be passed to create keywords in one request - `GET /api/v2/filters/:id` to read a particular filter - `PUT /api/v2/filters/:id` to update a new filter `keywords_attributes` can also be passed to edit, delete or add keywords in one request - `DELETE /api/v2/filters/:id` to delete a particular filter - `GET /api/v2/filters/:id/keywords` to list keywords for a filter - `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a filter - `GET /api/v2/filter_keywords/:id` to read a particular keyword - `PUT /api/v2/filter_keywords/:id` to edit a particular keyword - `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword * Change from `irreversible` boolean to `action` enum * Remove irrelevent `irreversible_must_be_within_context` check * Fix /filters/new and /filters/edit with update for filter_action * Fix Rubocop/Codeclimate complaining about task names * Refactor FeedManager#phrase_filtered? This moves regexp building and filter caching to the `CustomFilter` class. This does not change the functional behavior yet, but this changes how the cache is built, doing per-custom_filter regexps so that filters can be matched independently, while still offering caching. * Perform server-side filtering and output result in REST API * Fix numerous filters_changed events being sent when editing multiple keywords at once * Add some tests * Use the new API in the WebUI - use client-side logic for filters we have fetched rules for. This is so that filter changes can be retroactively applied without reloading the UI. - use server-side logic for filters we haven't fetched rules for yet (e.g. network error, or initial timeline loading) * Minor optimizations and refactoring * Perform server-side filtering on the streaming server * Change the wording of filter action labels * Fix issues pointed out by linter * Change design of “Show anyway” link in accordence to review comments * Drop “irreversible” filtering behavior * Move /api/v2/filter_keywords to /api/v1/filters/keywords * Rename `filter_results` attribute to `filtered` * Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer * Fix systemChannelId value in streaming server * Simplify code by removing client-side filtering code The simplifcation comes at a cost though: filters aren't retroactively applied anymore.
2022-06-02Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/javascript/styles/fonts/montserrat.scss`: Code style changes upstream, path changes in glitch-soc. Applied upstream's code style changes. - `app/javascript/styles/fonts/roboto-mono.scss`: Code style changes upstream, path changes in glitch-soc. Applied upstream's code style changes. - `app/javascript/styles/fonts/roboto.scss`: Code style changes upstream, path changes in glitch-soc. Applied upstream's code style changes. - `app/models/account.rb`: Textual conflict only caused by glitch-soc using a different value for character limits in a nearby line. Applied upstream's changes. - `app/views/statuses/_simple_status.html.haml`: Attribute added to a tag modified by glitch-soc. Added upstream's attributes. - `yarn.lock`: Upstream added/updated dependencies close to glitch-soc-only ones. Updated/added upstream dependencies.
2022-05-27Remove unused `filtered_languages` column (#18533)Claire
* Remove unused `filtered_languages` column Fixes #18522 * Fix tests
2022-05-01Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/javascript/packs/admin.js`: Conflicts due to glitch-soc's theming system. Upstream changes have been ported to `app/javascript/core/admin.js` - `app/models/trends/statuses.rb`: Minor conflict due to glitch-soc's option to allow CWed toots in trends. Ported upstream changes.
2022-04-29Remove IP matching from e-mail domain blocks (#18190)Eugen Rochko
Clear out e-mail domain blocks created from automatically resolved DNS records
2022-03-12Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-03-12Fix null values being included in some indexes (#17711)Eugen Rochko
* Fix null values being included in some indexes * Update lib/mastodon/migration_helpers.rb Co-authored-by: Claire <claire.github-309c@sitedethib.com> * Add documentation link to corruption error message Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-03-10Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/status.rb`: Upstream updated media and edit-related code textually close to glitch-soc additions (local-only and content-type). Ported upstream changes. - `app/models/status_edit.rb`: Upstream changes textually close to glitch-soc additions (content-type). Ported upstream changes. - `app/serializers/activitypub/note_serializer.rb`: Upstream changed how media attachments are handled. Not really a conflict, but textually close to glitch-soc additions (directMessage attribute). Ported upstream changes. - `app/services/remove_status_service.rb`: Upstream changed how media attachments are handled. Not really a conflict, but textually close to glitch-soc additions (DM timeline). Ported upstream changes. - `app/services/update_status_service.rb`: Upstream fixed an issue with language selection. Not really a conflict, but textually close to glitch-soc additions (content-type). Ported upstream changes. - `db/schema.rb`: Upstream added columns to the `status_edits` table, the conflict is because of an additional column (`content-type`) in glitch-soc. Ported upstream changes. - `package.json`: Upstream dependency (express) textually adjacent to a glitch-soc-specific one (favico.js) got updated. Updated it as well.
2022-03-09Change how changes to media attachments are stored for edits (#17696)Eugen Rochko
* Change how changes to media attachments are stored for edits Fix not being able to re-order media attachments * Fix not broadcasting updates when polls/media is changed through ActivityPub * Various fixes and improvements * Update app/models/report.rb Co-authored-by: Claire <claire.github-309c@sitedethib.com> * Add tracking of media attachment description changes * Change poll in status edit to have a structure closer to the real one Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-02-26Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/account.rb`: Not a real conflict, just upstream getting rid of unused constants too close to glitch-soc-specific contents. Removed unused constants like upstream did. - `app/models/trends.rb`: Conflict because glitch-soc disabled email notifications for trending links. Upstream has refactored this quite a bit and added trending posts. Took upstream code, but disabling the extra trending stuff will come in another commit. - `app/views/admin/trends/links/index.html.haml`: Conflict due to glitch-soc's theming system. Ported upstream changes accordingly.
2022-02-25Add trending statuses (#17431)Eugen Rochko
* Add trending statuses * Fix dangling items with stale scores in localized sets * Various fixes and improvements - Change approve_all/reject_all to approve_accounts/reject_accounts - Change Trends::Query methods to not mutate the original query - Change Trends::Query#skip to offset - Change follow recommendations to be refreshed in a transaction * Add tests for trending statuses filtering behaviour * Fix not applying filtering scope in controller
2022-01-23Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `spec/models/status_spec.rb`: Upstream added tests too close to glitch-soc-specific tests. Kept both tests.
2022-01-23Remove leftover database columns from Devise::Models::Rememberable (#17191)Claire
* Remove leftover database columns from Devise::Models::Rememberable * Update fix-duplication maintenance script * Improve errors/warnings in the fix-duplicates maintenance script
2022-01-17Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/views/admin/reports/show.html.haml`: Conflicts due to glitch-soc's theming system.
2022-01-17Add notifications for statuses deleted by moderators (#17204)Eugen Rochko
2022-01-16Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `README.md`: Upstream added some text, but our README is completely different. Kept our README unchanged.
2022-01-16Remove IP tracking columns from users table (#16409)Eugen Rochko
2021-11-26Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.env.production.sample`: Copied upstream changes. - `app/controllers/settings/identity_proofs_controller.rb`: Minor conflict due to glitch-soc's extra “enable_keybase” setting. Upstream removed keybase support altogether, so did the same. - `app/controllers/well_known/keybase_proof_config_controller.rb`: Minor conflict due to glitch-soc's extra “enable_keybase” setting. Upstream removed keybase support altogether, so did the same. - `lib/mastodon/statuses_cli.rb`: Minor conflict due to an optimization that wasn't shared between the two versions. Copied upstream's version.
2021-11-26Remove Keybase integration (#17045)Eugen Rochko
2021-08-09Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `Gemfile.lock`: Not a real conflict, upstream-updated dependency (redis) textually too close to glitch-soc-only dependecy. Updated redis gem like upstream did.
2021-08-08Fix owned account notes not being deleted when an account is deleted (#16579)Claire
* Add account_notes relationship * Add tests * Fix owned account notes not being deleted when an account is deleted * Add post-migration to clean up orphaned account notes
2021-06-03Merge branch 'main' into glitch-soc/merge-upstreamClaire
2021-06-02Fix account deletion sometimes failing because of optimistic locks (#16317)Claire
* Fix account deletion sometimes failing because of optimistic locks In some rare occasions[1], deleting accounts would fail with a `StaleObjectError` exception. Indeed, account deletion manually sets the `AccountStat` values without handling cases where the optimistic locking on `AccountStat` would fail. To my knowledge, with the rewrite of account counters in #15913, the `DeleteAccountService` is now the only place that changes the counters in a way that is not atomic. Since in this specific case, we do not care about the previous values of the account counters, it appears we don't need locking at all for this table anymore. [1]: https://discourse.joinmastodon.org/t/account-cant-be-deleted/3602 * Bump MAX_SUPPORTED_VERSION in maintenance script
2021-05-08Merge branch 'main' into glitch-soc/merge-upstreamClaire
2021-05-07Remove PubSubHubbub-related columns from accounts table (#16170)Eugen Rochko
2021-05-07Merge branch 'main' into glitch-soc/merge-upstreamClaire
- `app/views/statuses/_simple_status.html.haml`: Small markup change in glitch-soc, on a line that has been modified by upstream. Ported upstream changes.
2021-05-07Change trending hashtags to be affected be reblogs (#16164)Eugen Rochko
If a status with a hashtag becomes very popular, it stands to reason that the hashtag should have a chance at trending Fix no stats being recorded for hashtags that are not allowed to trend, and stop ignoring bots Remove references to hashtags in profile directory from the code and the admin UI
2021-03-15Merge branch 'main' into glitch-soc/merge-upstreamClaire
2021-03-12Remove subscription_expires_at leftover from OStatus (#15857)Claire
2020-11-08Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/follower_accounts_controller.rb`: Conflict due to upstream changing suspension logic while glitch-soc has an extra option to hide followers count. Ported upstream changes.