Files
team/server/channels/db/migrations/migrations.list
44b55f2631 [MM-69215] warn users before their personal access tokens expire (#37272)
* MM-69215: warn users before their personal access tokens expire

Adds a new pat_expiry_notify job that proactively DMs the owner of a
personal access token as it approaches expiry, on a fixed 7/3/1 day
cascade. Previously the only signal was a passive badge in
Profile > Security, so PAT-backed scripts and integrations broke
silently the moment a token lapsed.

Behavior:
- Hourly PeriodicScheduler + SimpleWorker, modeled on expirynotify and
  gated on ServiceSettings.EnableUserAccessTokens.
- Applies to any active token with a non-zero ExpiresAt. Bot-account
  tokens and tokens owned by deactivated users are excluded by the
  store query.
- Delivery is a single system-bot DM (GetSystemBot ->
  GetOrCreateDirectChannel -> CreatePost) localized to the recipient's
  locale, including the token description.
- Only the most urgent applicable bucket is ever sent, so a token that
  first becomes visible already inside the window (short-lived token, or
  a just-reactivated owner) gets a single warning rather than a catch-up
  burst of every threshold it has already passed.

Schema/dedup:
- New nullable UserAccessToken.LastNotifiedThreshold column (migration
  000203). NULL means never notified; it decreases monotonically
  (7 -> 3 -> 1) and prevents the hourly job from re-sending a warning.
- New store methods GetExpiringTokens(now, horizon, limit) and
  UpdateLastNotifiedThreshold, wired through the retry/timer layers and
  mocks.

Covered by unit tests for the bucket math and store query, plus
app-level tests for the dedup, single-warning, and bot-exclusion cases.

* MM-69215: only fetch actionable tokens to avoid notification starvation

Address review feedback on the pat_expiry_notify job.

GetExpiringTokens previously returned every token in the 7-day window
whose marker had not reached the terminal bucket (LastNotifiedThreshold
IS NULL OR > 1), including tokens already warned at their current
bucket. Ordered by ExpiresAt ASC and capped at the batch limit, a
backlog of >1000 already-warned tokens could permanently crowd out a
less-urgent unnotified token past the limit, so it never got warned.

GetExpiringTokens now takes the notification thresholds and returns only
*actionable* rows: for each threshold T, a token qualifies when it has
entered the T-day bucket and has not been notified at T or a more urgent
bucket. Already-warned rows no longer consume a result slot, so a
backlog drains across runs without starving the least-urgent tokens.
The worker keeps recomputing each bucket and re-checking the marker as a
race guard.

Also add a store-test assertion locking down the ExpiresAt-ascending
ordering contract that the worker relies on.

* MM-69215: regenerate store layers and mocks to fix CI drift

The "Check store layers" and "Check mocks" CI jobs failed because the
hand-added GetExpiringTokens and UpdateLastNotifiedThreshold methods were
placed in a different order than the generators emit. Regenerate the
timer/retry layers with `go generate ./channels/store` and reorder the
mock methods to match mockery's alphabetical output. No behavior change.

* MM-69215: allow admins to trigger pat_expiry_notify on demand

Add JobTypePatExpiryNotify to the create-job permission allowlist
(PermissionManageJobs), consistent with its siblings expiry_notify and
cleanup_expired_access_tokens. This lets operators run the warning sweep
on demand via POST /api/v4/jobs instead of only on the hourly schedule,
and makes the job creatable from API-level tests.

Add an api4 test covering the new path: a user without manage_jobs is
forbidden, a system admin can create the job. (The notification behavior
itself is covered deterministically by the app-layer tests; the api4
harness does not execute job workers.)

* MM-69215: store last-notified timestamp instead of day bucket

Replace UserAccessToken.LastNotifiedThreshold (the smallest day bucket
already warned) with LastNotifiedAt (the time of the last warning).
Storing the moment rather than a cascade-specific bucket keeps the
column independent of the 7/3/1 day cascade and stays correct if the
buckets are later changed or refined — the bucket already covered is
recovered from (ExpiresAt - LastNotifiedAt).

The actionable-only store query is equally clean: a token still needs a
warning for threshold T when its last warning (if any) was sent while
more than T days remained, i.e. LastNotifiedAt < ExpiresAt - T*day.

Also reword the warning DM to drop the awkward "day(s)" plural: the
7/3-day buckets now render "in N days or less", and the 1-day bucket
uses a dedicated "within 24 hours" message.

Migration 000203 renamed accordingly (column lastnotifiedat bigint);
layers regenerated, mock/tests updated.

* MM-69215: read expiring tokens from master to avoid duplicate warnings

GetExpiringTokens dedups against LastNotifiedAt, which UpdateLastNotifiedAt
writes to master after each warning. Reading the dedup query from a replica
could miss a just-written LastNotifiedAt under replication lag and re-surface
an already-warned token, sending a duplicate DM — a window that on-demand
re-runs of the job (now that the job type is allowlisted) make reachable.
Switch the read to master; it is a once-per-run batch query, so there is no
read-scaling cost.

* MM-69215: shorten GetExpiringTokens master-read comment

* MM-69215: point expiry warning at regenerating the token

MM-69561 adds PAT rotation (regenerate a token's secret in place, keeping
its id/description). Reword the pre-expiry warning DMs to tell the owner to
regenerate the token rather than create a new one — regeneration is the
right action for a token that backs an integration, since only the secret
changes. Assert the "regenerate" CTA in the app test.

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-09 09:51:12 +02:00

404 lines
29 KiB
Plaintext

# Autogenerated file to synchronize migrations sequence in the PR workflow, please do not edit.
channels/db/migrations/postgres/000001_create_teams.down.sql
channels/db/migrations/postgres/000001_create_teams.up.sql
channels/db/migrations/postgres/000002_create_team_members.down.sql
channels/db/migrations/postgres/000002_create_team_members.up.sql
channels/db/migrations/postgres/000003_create_cluster_discovery.down.sql
channels/db/migrations/postgres/000003_create_cluster_discovery.up.sql
channels/db/migrations/postgres/000004_create_command_webhooks.down.sql
channels/db/migrations/postgres/000004_create_command_webhooks.up.sql
channels/db/migrations/postgres/000005_create_compliances.down.sql
channels/db/migrations/postgres/000005_create_compliances.up.sql
channels/db/migrations/postgres/000006_create_emojis.down.sql
channels/db/migrations/postgres/000006_create_emojis.up.sql
channels/db/migrations/postgres/000007_create_user_groups.down.sql
channels/db/migrations/postgres/000007_create_user_groups.up.sql
channels/db/migrations/postgres/000008_create_group_members.down.sql
channels/db/migrations/postgres/000008_create_group_members.up.sql
channels/db/migrations/postgres/000009_create_group_teams.down.sql
channels/db/migrations/postgres/000009_create_group_teams.up.sql
channels/db/migrations/postgres/000010_create_group_channels.down.sql
channels/db/migrations/postgres/000010_create_group_channels.up.sql
channels/db/migrations/postgres/000011_create_link_metadata.down.sql
channels/db/migrations/postgres/000011_create_link_metadata.up.sql
channels/db/migrations/postgres/000012_create_commands.down.sql
channels/db/migrations/postgres/000012_create_commands.up.sql
channels/db/migrations/postgres/000013_create_incoming_webhooks.down.sql
channels/db/migrations/postgres/000013_create_incoming_webhooks.up.sql
channels/db/migrations/postgres/000014_create_outgoing_webhooks.down.sql
channels/db/migrations/postgres/000014_create_outgoing_webhooks.up.sql
channels/db/migrations/postgres/000015_create_systems.down.sql
channels/db/migrations/postgres/000015_create_systems.up.sql
channels/db/migrations/postgres/000016_create_reactions.down.sql
channels/db/migrations/postgres/000016_create_reactions.up.sql
channels/db/migrations/postgres/000017_create_roles.down.sql
channels/db/migrations/postgres/000017_create_roles.up.sql
channels/db/migrations/postgres/000018_create_schemes.down.sql
channels/db/migrations/postgres/000018_create_schemes.up.sql
channels/db/migrations/postgres/000019_create_licenses.down.sql
channels/db/migrations/postgres/000019_create_licenses.up.sql
channels/db/migrations/postgres/000020_create_posts.down.sql
channels/db/migrations/postgres/000020_create_posts.up.sql
channels/db/migrations/postgres/000021_create_product_notice_view_state.down.sql
channels/db/migrations/postgres/000021_create_product_notice_view_state.up.sql
channels/db/migrations/postgres/000022_create_sessions.down.sql
channels/db/migrations/postgres/000022_create_sessions.up.sql
channels/db/migrations/postgres/000023_create_terms_of_service.down.sql
channels/db/migrations/postgres/000023_create_terms_of_service.up.sql
channels/db/migrations/postgres/000024_create_audits.down.sql
channels/db/migrations/postgres/000024_create_audits.up.sql
channels/db/migrations/postgres/000025_create_oauth_access_data.down.sql
channels/db/migrations/postgres/000025_create_oauth_access_data.up.sql
channels/db/migrations/postgres/000026_create_preferences.down.sql
channels/db/migrations/postgres/000026_create_preferences.up.sql
channels/db/migrations/postgres/000027_create_status.down.sql
channels/db/migrations/postgres/000027_create_status.up.sql
channels/db/migrations/postgres/000028_create_tokens.down.sql
channels/db/migrations/postgres/000028_create_tokens.up.sql
channels/db/migrations/postgres/000029_create_bots.down.sql
channels/db/migrations/postgres/000029_create_bots.up.sql
channels/db/migrations/postgres/000030_create_user_access_tokens.down.sql
channels/db/migrations/postgres/000030_create_user_access_tokens.up.sql
channels/db/migrations/postgres/000031_create_remote_clusters.down.sql
channels/db/migrations/postgres/000031_create_remote_clusters.up.sql
channels/db/migrations/postgres/000032_create_sharedchannels.down.sql
channels/db/migrations/postgres/000032_create_sharedchannels.up.sql
channels/db/migrations/postgres/000033_create_sidebar_channels.down.sql
channels/db/migrations/postgres/000033_create_sidebar_channels.up.sql
channels/db/migrations/postgres/000034_create_oauthauthdata.down.sql
channels/db/migrations/postgres/000034_create_oauthauthdata.up.sql
channels/db/migrations/postgres/000035_create_sharedchannelattachments.down.sql
channels/db/migrations/postgres/000035_create_sharedchannelattachments.up.sql
channels/db/migrations/postgres/000036_create_sharedchannelusers.down.sql
channels/db/migrations/postgres/000036_create_sharedchannelusers.up.sql
channels/db/migrations/postgres/000037_create_sharedchannelremotes.down.sql
channels/db/migrations/postgres/000037_create_sharedchannelremotes.up.sql
channels/db/migrations/postgres/000038_create_jobs.down.sql
channels/db/migrations/postgres/000038_create_jobs.up.sql
channels/db/migrations/postgres/000039_create_channel_member_history.down.sql
channels/db/migrations/postgres/000039_create_channel_member_history.up.sql
channels/db/migrations/postgres/000040_create_sidebar_categories.down.sql
channels/db/migrations/postgres/000040_create_sidebar_categories.up.sql
channels/db/migrations/postgres/000041_create_upload_sessions.down.sql
channels/db/migrations/postgres/000041_create_upload_sessions.up.sql
channels/db/migrations/postgres/000042_create_threads.down.sql
channels/db/migrations/postgres/000042_create_threads.up.sql
channels/db/migrations/postgres/000043_thread_memberships.down.sql
channels/db/migrations/postgres/000043_thread_memberships.up.sql
channels/db/migrations/postgres/000044_create_user_terms_of_service.down.sql
channels/db/migrations/postgres/000044_create_user_terms_of_service.up.sql
channels/db/migrations/postgres/000045_create_plugin_key_value_store.down.sql
channels/db/migrations/postgres/000045_create_plugin_key_value_store.up.sql
channels/db/migrations/postgres/000046_create_users.down.sql
channels/db/migrations/postgres/000046_create_users.up.sql
channels/db/migrations/postgres/000047_create_file_info.down.sql
channels/db/migrations/postgres/000047_create_file_info.up.sql
channels/db/migrations/postgres/000048_create_oauth_apps.down.sql
channels/db/migrations/postgres/000048_create_oauth_apps.up.sql
channels/db/migrations/postgres/000049_create_channels.down.sql
channels/db/migrations/postgres/000049_create_channels.up.sql
channels/db/migrations/postgres/000050_create_channelmembers.down.sql
channels/db/migrations/postgres/000050_create_channelmembers.up.sql
channels/db/migrations/postgres/000051_create_msg_root_count.down.sql
channels/db/migrations/postgres/000051_create_msg_root_count.up.sql
channels/db/migrations/postgres/000052_create_public_channels.down.sql
channels/db/migrations/postgres/000052_create_public_channels.up.sql
channels/db/migrations/postgres/000053_create_retention_policies.down.sql
channels/db/migrations/postgres/000053_create_retention_policies.up.sql
channels/db/migrations/postgres/000054_create_crt_channelmembership_count.down.sql
channels/db/migrations/postgres/000054_create_crt_channelmembership_count.up.sql
channels/db/migrations/postgres/000055_create_crt_thread_count_and_unreads.down.sql
channels/db/migrations/postgres/000055_create_crt_thread_count_and_unreads.up.sql
channels/db/migrations/postgres/000056_upgrade_channels_v6.0.down.sql
channels/db/migrations/postgres/000056_upgrade_channels_v6.0.up.sql
channels/db/migrations/postgres/000057_upgrade_command_webhooks_v6.0.down.sql
channels/db/migrations/postgres/000057_upgrade_command_webhooks_v6.0.up.sql
channels/db/migrations/postgres/000058_upgrade_channelmembers_v6.0.down.sql
channels/db/migrations/postgres/000058_upgrade_channelmembers_v6.0.up.sql
channels/db/migrations/postgres/000059_upgrade_users_v6.0.down.sql
channels/db/migrations/postgres/000059_upgrade_users_v6.0.up.sql
channels/db/migrations/postgres/000060_upgrade_jobs_v6.0.down.sql
channels/db/migrations/postgres/000060_upgrade_jobs_v6.0.up.sql
channels/db/migrations/postgres/000061_upgrade_link_metadata_v6.0.down.sql
channels/db/migrations/postgres/000061_upgrade_link_metadata_v6.0.up.sql
channels/db/migrations/postgres/000062_upgrade_sessions_v6.0.down.sql
channels/db/migrations/postgres/000062_upgrade_sessions_v6.0.up.sql
channels/db/migrations/postgres/000063_upgrade_threads_v6.0.down.sql
channels/db/migrations/postgres/000063_upgrade_threads_v6.0.up.sql
channels/db/migrations/postgres/000064_upgrade_status_v6.0.down.sql
channels/db/migrations/postgres/000064_upgrade_status_v6.0.up.sql
channels/db/migrations/postgres/000065_upgrade_groupchannels_v6.0.down.sql
channels/db/migrations/postgres/000065_upgrade_groupchannels_v6.0.up.sql
channels/db/migrations/postgres/000066_upgrade_posts_v6.0.down.sql
channels/db/migrations/postgres/000066_upgrade_posts_v6.0.up.sql
channels/db/migrations/postgres/000067_upgrade_channelmembers_v6.1.down.sql
channels/db/migrations/postgres/000067_upgrade_channelmembers_v6.1.up.sql
channels/db/migrations/postgres/000068_upgrade_teammembers_v6.1.down.sql
channels/db/migrations/postgres/000068_upgrade_teammembers_v6.1.up.sql
channels/db/migrations/postgres/000069_upgrade_jobs_v6.1.down.sql
channels/db/migrations/postgres/000069_upgrade_jobs_v6.1.up.sql
channels/db/migrations/postgres/000070_upgrade_cte_v6.1.down.sql
channels/db/migrations/postgres/000070_upgrade_cte_v6.1.up.sql
channels/db/migrations/postgres/000071_upgrade_sessions_v6.1.down.sql
channels/db/migrations/postgres/000071_upgrade_sessions_v6.1.up.sql
channels/db/migrations/postgres/000072_upgrade_schemes_v6.3.down.sql
channels/db/migrations/postgres/000072_upgrade_schemes_v6.3.up.sql
channels/db/migrations/postgres/000073_upgrade_plugin_key_value_store_v6.3.down.sql
channels/db/migrations/postgres/000073_upgrade_plugin_key_value_store_v6.3.up.sql
channels/db/migrations/postgres/000074_upgrade_users_v6.3.down.sql
channels/db/migrations/postgres/000074_upgrade_users_v6.3.up.sql
channels/db/migrations/postgres/000075_alter_upload_sessions_index.down.sql
channels/db/migrations/postgres/000075_alter_upload_sessions_index.up.sql
channels/db/migrations/postgres/000076_upgrade_lastrootpostat.down.sql
channels/db/migrations/postgres/000076_upgrade_lastrootpostat.up.sql
channels/db/migrations/postgres/000077_upgrade_users_v6.5.down.sql
channels/db/migrations/postgres/000077_upgrade_users_v6.5.up.sql
channels/db/migrations/postgres/000078_create_oauth_mattermost_app_id.down.sql
channels/db/migrations/postgres/000078_create_oauth_mattermost_app_id.up.sql
channels/db/migrations/postgres/000079_usergroups_displayname_index.down.sql
channels/db/migrations/postgres/000079_usergroups_displayname_index.up.sql
channels/db/migrations/postgres/000080_posts_createat_id.down.sql
channels/db/migrations/postgres/000080_posts_createat_id.up.sql
channels/db/migrations/postgres/000081_threads_deleteat.down.sql
channels/db/migrations/postgres/000081_threads_deleteat.up.sql
channels/db/migrations/postgres/000082_upgrade_oauth_mattermost_app_id.down.sql
channels/db/migrations/postgres/000082_upgrade_oauth_mattermost_app_id.up.sql
channels/db/migrations/postgres/000083_threads_threaddeleteat.down.sql
channels/db/migrations/postgres/000083_threads_threaddeleteat.up.sql
channels/db/migrations/postgres/000084_recent_searches.down.sql
channels/db/migrations/postgres/000084_recent_searches.up.sql
channels/db/migrations/postgres/000085_fileinfo_add_archived_column.down.sql
channels/db/migrations/postgres/000085_fileinfo_add_archived_column.up.sql
channels/db/migrations/postgres/000086_add_cloud_limits_archived.down.sql
channels/db/migrations/postgres/000086_add_cloud_limits_archived.up.sql
channels/db/migrations/postgres/000087_sidebar_categories_index.down.sql
channels/db/migrations/postgres/000087_sidebar_categories_index.up.sql
channels/db/migrations/postgres/000088_remaining_migrations.down.sql
channels/db/migrations/postgres/000088_remaining_migrations.up.sql
channels/db/migrations/postgres/000089_add-channelid-to-reaction.down.sql
channels/db/migrations/postgres/000089_add-channelid-to-reaction.up.sql
channels/db/migrations/postgres/000090_create_enums.down.sql
channels/db/migrations/postgres/000090_create_enums.up.sql
channels/db/migrations/postgres/000091_create_post_reminder.down.sql
channels/db/migrations/postgres/000091_create_post_reminder.up.sql
channels/db/migrations/postgres/000092_add_createat_to_teamembers.down.sql
channels/db/migrations/postgres/000092_add_createat_to_teamembers.up.sql
channels/db/migrations/postgres/000093_notify_admin.down.sql
channels/db/migrations/postgres/000093_notify_admin.up.sql
channels/db/migrations/postgres/000094_threads_teamid.down.sql
channels/db/migrations/postgres/000094_threads_teamid.up.sql
channels/db/migrations/postgres/000095_remove_posts_parentid.down.sql
channels/db/migrations/postgres/000095_remove_posts_parentid.up.sql
channels/db/migrations/postgres/000096_threads_threadteamid.down.sql
channels/db/migrations/postgres/000096_threads_threadteamid.up.sql
channels/db/migrations/postgres/000097_create_posts_priority.down.sql
channels/db/migrations/postgres/000097_create_posts_priority.up.sql
channels/db/migrations/postgres/000098_create_post_acknowledgements.down.sql
channels/db/migrations/postgres/000098_create_post_acknowledgements.up.sql
channels/db/migrations/postgres/000099_create_drafts.down.sql
channels/db/migrations/postgres/000099_create_drafts.up.sql
channels/db/migrations/postgres/000100_add_draft_priority_column.down.sql
channels/db/migrations/postgres/000100_add_draft_priority_column.up.sql
channels/db/migrations/postgres/000101_create_true_up_review_history.down.sql
channels/db/migrations/postgres/000101_create_true_up_review_history.up.sql
channels/db/migrations/postgres/000102_posts_originalid_index.down.sql
channels/db/migrations/postgres/000102_posts_originalid_index.up.sql
channels/db/migrations/postgres/000103_add_sentat_to_notifyadmin.down.sql
channels/db/migrations/postgres/000103_add_sentat_to_notifyadmin.up.sql
channels/db/migrations/postgres/000104_upgrade_notifyadmin.down.sql
channels/db/migrations/postgres/000104_upgrade_notifyadmin.up.sql
channels/db/migrations/postgres/000105_remove_tokens.down.sql
channels/db/migrations/postgres/000105_remove_tokens.up.sql
channels/db/migrations/postgres/000106_fileinfo_channelid.down.sql
channels/db/migrations/postgres/000106_fileinfo_channelid.up.sql
channels/db/migrations/postgres/000107_threadmemberships_cleanup.down.sql
channels/db/migrations/postgres/000107_threadmemberships_cleanup.up.sql
channels/db/migrations/postgres/000108_remove_orphaned_oauth_preferences.down.sql
channels/db/migrations/postgres/000108_remove_orphaned_oauth_preferences.up.sql
channels/db/migrations/postgres/000109_create_persistent_notifications.down.sql
channels/db/migrations/postgres/000109_create_persistent_notifications.up.sql
channels/db/migrations/postgres/000111_update_vacuuming.down.sql
channels/db/migrations/postgres/000111_update_vacuuming.up.sql
channels/db/migrations/postgres/000112_rework_desktop_tokens.down.sql
channels/db/migrations/postgres/000112_rework_desktop_tokens.up.sql
channels/db/migrations/postgres/000113_create_retentionidsfordeletion_table.down.sql
channels/db/migrations/postgres/000113_create_retentionidsfordeletion_table.up.sql
channels/db/migrations/postgres/000114_sharedchannelremotes_drop_nextsyncat_description.down.sql
channels/db/migrations/postgres/000114_sharedchannelremotes_drop_nextsyncat_description.up.sql
channels/db/migrations/postgres/000115_user_reporting_changes.down.sql
channels/db/migrations/postgres/000115_user_reporting_changes.up.sql
channels/db/migrations/postgres/000116_create_outgoing_oauth_connections.down.sql
channels/db/migrations/postgres/000116_create_outgoing_oauth_connections.up.sql
channels/db/migrations/postgres/000117_msteams_shared_channels.down.sql
channels/db/migrations/postgres/000117_msteams_shared_channels.up.sql
channels/db/migrations/postgres/000118_create_index_poststats.down.sql
channels/db/migrations/postgres/000118_create_index_poststats.up.sql
channels/db/migrations/postgres/000119_msteams_shared_channels_opts.down.sql
channels/db/migrations/postgres/000119_msteams_shared_channels_opts.up.sql
channels/db/migrations/postgres/000120_create_channelbookmarks_table.down.sql
channels/db/migrations/postgres/000120_create_channelbookmarks_table.up.sql
channels/db/migrations/postgres/000121_remove_true_up_review_history.down.sql
channels/db/migrations/postgres/000121_remove_true_up_review_history.up.sql
channels/db/migrations/postgres/000122_preferences_value_length.down.sql
channels/db/migrations/postgres/000122_preferences_value_length.up.sql
channels/db/migrations/postgres/000123_remove_upload_file_permission.down.sql
channels/db/migrations/postgres/000123_remove_upload_file_permission.up.sql
channels/db/migrations/postgres/000124_remove_manage_team_permission.down.sql
channels/db/migrations/postgres/000124_remove_manage_team_permission.up.sql
channels/db/migrations/postgres/000125_remoteclusters_add_default_team_id.down.sql
channels/db/migrations/postgres/000125_remoteclusters_add_default_team_id.up.sql
channels/db/migrations/postgres/000126_sharedchannels_remotes_add_deleteat.down.sql
channels/db/migrations/postgres/000126_sharedchannels_remotes_add_deleteat.up.sql
channels/db/migrations/postgres/000127_add_mfa_used_ts_to_users.down.sql
channels/db/migrations/postgres/000127_add_mfa_used_ts_to_users.up.sql
channels/db/migrations/postgres/000128_create_scheduled_posts.down.sql
channels/db/migrations/postgres/000128_create_scheduled_posts.up.sql
channels/db/migrations/postgres/000129_add_property_system_architecture.down.sql
channels/db/migrations/postgres/000129_add_property_system_architecture.up.sql
channels/db/migrations/postgres/000130_system_console_stats.down.sql
channels/db/migrations/postgres/000130_system_console_stats.up.sql
channels/db/migrations/postgres/000131_create_index_pagination_on_property_values.down.sql
channels/db/migrations/postgres/000131_create_index_pagination_on_property_values.up.sql
channels/db/migrations/postgres/000132_create_index_pagination_on_property_fields.down.sql
channels/db/migrations/postgres/000132_create_index_pagination_on_property_fields.up.sql
channels/db/migrations/postgres/000133_add_channel_banner_fields.down.sql
channels/db/migrations/postgres/000133_add_channel_banner_fields.up.sql
channels/db/migrations/postgres/000134_create_access_control_policies.down.sql
channels/db/migrations/postgres/000134_create_access_control_policies.up.sql
channels/db/migrations/postgres/000135_sidebarchannels_categoryid.down.sql
channels/db/migrations/postgres/000135_sidebarchannels_categoryid.up.sql
channels/db/migrations/postgres/000136_create_attribute_view.down.sql
channels/db/migrations/postgres/000136_create_attribute_view.up.sql
channels/db/migrations/postgres/000137_update_attribute_view.down.sql
channels/db/migrations/postgres/000137_update_attribute_view.up.sql
channels/db/migrations/postgres/000138_add_default_category_name_to_channel.down.sql
channels/db/migrations/postgres/000138_add_default_category_name_to_channel.up.sql
channels/db/migrations/postgres/000139_remoteclusters_add_last_global_user_sync_at.down.sql
channels/db/migrations/postgres/000139_remoteclusters_add_last_global_user_sync_at.up.sql
channels/db/migrations/postgres/000140_add_lastmemberssyncat_to_sharedchannelremotes.down.sql
channels/db/migrations/postgres/000140_add_lastmemberssyncat_to_sharedchannelremotes.up.sql
channels/db/migrations/postgres/000141_add_remoteid_channelid_to_post_acknowledgements.down.sql
channels/db/migrations/postgres/000141_add_remoteid_channelid_to_post_acknowledgements.up.sql
channels/db/migrations/postgres/000142_create_content_flagging_tables.down.sql
channels/db/migrations/postgres/000142_create_content_flagging_tables.up.sql
channels/db/migrations/postgres/000143_content_flagging_table_index.down.sql
channels/db/migrations/postgres/000143_content_flagging_table_index.up.sql
channels/db/migrations/postgres/000144_add_dcr_fields_to_oauth_apps.down.sql
channels/db/migrations/postgres/000144_add_dcr_fields_to_oauth_apps.up.sql
channels/db/migrations/postgres/000145_add_pkce_to_oauthauthdata.down.sql
channels/db/migrations/postgres/000145_add_pkce_to_oauthauthdata.up.sql
channels/db/migrations/postgres/000146_add_audience_and_resource_to_oauth.down.sql
channels/db/migrations/postgres/000146_add_audience_and_resource_to_oauth.up.sql
channels/db/migrations/postgres/000147_create_autotranslation_tables.down.sql
channels/db/migrations/postgres/000147_create_autotranslation_tables.up.sql
channels/db/migrations/postgres/000148_add_burn_on_read_messages.down.sql
channels/db/migrations/postgres/000148_add_burn_on_read_messages.up.sql
channels/db/migrations/postgres/000149_create_recaps.down.sql
channels/db/migrations/postgres/000149_create_recaps.up.sql
channels/db/migrations/postgres/000150_add_translation_state.down.sql
channels/db/migrations/postgres/000150_add_translation_state.up.sql
channels/db/migrations/postgres/000151_add_autotranslationdisabled_to_channelmembers.down.sql
channels/db/migrations/postgres/000151_add_autotranslationdisabled_to_channelmembers.up.sql
channels/db/migrations/postgres/000152_translations_primary_key_change.down.sql
channels/db/migrations/postgres/000152_translations_primary_key_change.up.sql
channels/db/migrations/postgres/000153_add_translation_channel_id.down.sql
channels/db/migrations/postgres/000153_add_translation_channel_id.up.sql
channels/db/migrations/postgres/000154_drop_translation_updateat_index.down.sql
channels/db/migrations/postgres/000154_drop_translation_updateat_index.up.sql
channels/db/migrations/postgres/000155_create_translation_channel_updateat_index.down.sql
channels/db/migrations/postgres/000155_create_translation_channel_updateat_index.up.sql
channels/db/migrations/postgres/000156_add_schemeid_to_roles.down.sql
channels/db/migrations/postgres/000156_add_schemeid_to_roles.up.sql
channels/db/migrations/postgres/000157_backfill_roles_schemeid.down.sql
channels/db/migrations/postgres/000157_backfill_roles_schemeid.up.sql
channels/db/migrations/postgres/000158_add_roles_schemeid_index.down.sql
channels/db/migrations/postgres/000158_add_roles_schemeid_index.up.sql
channels/db/migrations/postgres/000159_deduplicate_policy_names.down.sql
channels/db/migrations/postgres/000159_deduplicate_policy_names.up.sql
channels/db/migrations/postgres/000160_add_user_tracking_to_properties.down.sql
channels/db/migrations/postgres/000160_add_user_tracking_to_properties.up.sql
channels/db/migrations/postgres/000161_add_object_type_to_property_fields.down.sql
channels/db/migrations/postgres/000161_add_object_type_to_property_fields.up.sql
channels/db/migrations/postgres/000162_drop_property_fields_old_unique_index.down.sql
channels/db/migrations/postgres/000162_drop_property_fields_old_unique_index.up.sql
channels/db/migrations/postgres/000163_create_property_fields_legacy_index.down.sql
channels/db/migrations/postgres/000163_create_property_fields_legacy_index.up.sql
channels/db/migrations/postgres/000164_create_property_fields_typed_index.down.sql
channels/db/migrations/postgres/000164_create_property_fields_typed_index.up.sql
channels/db/migrations/postgres/000165_add_protected_and_permissions_to_property_fields.down.sql
channels/db/migrations/postgres/000165_add_protected_and_permissions_to_property_fields.up.sql
channels/db/migrations/postgres/000166_create_views.down.sql
channels/db/migrations/postgres/000166_create_views.up.sql
channels/db/migrations/postgres/000167_create_views_channel_id_delete_at_index.down.sql
channels/db/migrations/postgres/000167_create_views_channel_id_delete_at_index.up.sql
channels/db/migrations/postgres/000168_add_linked_field_id_to_property_fields.down.sql
channels/db/migrations/postgres/000168_add_linked_field_id_to_property_fields.up.sql
channels/db/migrations/postgres/000169_create_linked_field_id_index.down.sql
channels/db/migrations/postgres/000169_create_linked_field_id_index.up.sql
channels/db/migrations/postgres/000170_add_property_groups_version.down.sql
channels/db/migrations/postgres/000170_add_property_groups_version.up.sql
channels/db/migrations/postgres/000171_drop_property_fields_protected_index.down.sql
channels/db/migrations/postgres/000171_drop_property_fields_protected_index.up.sql
channels/db/migrations/postgres/000172_add_recaps_viewed_at.down.sql
channels/db/migrations/postgres/000172_add_recaps_viewed_at.up.sql
channels/db/migrations/postgres/000173_create_recaps_user_id_viewed_at_index.down.sql
channels/db/migrations/postgres/000173_create_recaps_user_id_viewed_at_index.up.sql
channels/db/migrations/postgres/000174_set_posts_statistics_targets.down.sql
channels/db/migrations/postgres/000174_set_posts_statistics_targets.up.sql
channels/db/migrations/postgres/000175_add_board_channel_types.down.sql
channels/db/migrations/postgres/000175_add_board_channel_types.up.sql
channels/db/migrations/postgres/000176_migrate_cpa_to_access_control.down.sql
channels/db/migrations/postgres/000176_migrate_cpa_to_access_control.up.sql
channels/db/migrations/postgres/000177_filter_attribute_view_by_object_type.down.sql
channels/db/migrations/postgres/000177_filter_attribute_view_by_object_type.up.sql
channels/db/migrations/postgres/000178_add_discoverable_to_channels.down.sql
channels/db/migrations/postgres/000178_add_discoverable_to_channels.up.sql
channels/db/migrations/postgres/000179_add_channels_discoverable_index.down.sql
channels/db/migrations/postgres/000179_add_channels_discoverable_index.up.sql
channels/db/migrations/postgres/000180_create_channel_join_requests.down.sql
channels/db/migrations/postgres/000180_create_channel_join_requests.up.sql
channels/db/migrations/postgres/000181_create_channel_join_requests_pending_unique_index.down.sql
channels/db/migrations/postgres/000181_create_channel_join_requests_pending_unique_index.up.sql
channels/db/migrations/postgres/000182_create_channel_join_requests_channel_status_index.down.sql
channels/db/migrations/postgres/000182_create_channel_join_requests_channel_status_index.up.sql
channels/db/migrations/postgres/000183_create_channel_join_requests_user_status_index.down.sql
channels/db/migrations/postgres/000183_create_channel_join_requests_user_status_index.up.sql
channels/db/migrations/postgres/000184_add_admin_to_permission_level.down.sql
channels/db/migrations/postgres/000184_add_admin_to_permission_level.up.sql
channels/db/migrations/postgres/000185_create_channel_guards.down.sql
channels/db/migrations/postgres/000185_create_channel_guards.up.sql
channels/db/migrations/postgres/000186_create_channel_guards_plugin_id_index.down.sql
channels/db/migrations/postgres/000186_create_channel_guards_plugin_id_index.up.sql
channels/db/migrations/postgres/000187_add_expiresat_to_user_access_tokens.down.sql
channels/db/migrations/postgres/000187_add_expiresat_to_user_access_tokens.up.sql
channels/db/migrations/postgres/000188_add_expiresat_index_to_user_access_tokens.down.sql
channels/db/migrations/postgres/000188_add_expiresat_index_to_user_access_tokens.up.sql
channels/db/migrations/postgres/000190_channel_bookmarks_board_target_id.down.sql
channels/db/migrations/postgres/000190_channel_bookmarks_board_target_id.up.sql
channels/db/migrations/postgres/000191_channel_bookmarks_target_id_index.down.sql
channels/db/migrations/postgres/000191_channel_bookmarks_target_id_index.up.sql
channels/db/migrations/postgres/000192_add_voip_device_id_to_sessions.down.sql
channels/db/migrations/postgres/000192_add_voip_device_id_to_sessions.up.sql
channels/db/migrations/postgres/000193_add_property_groups_schema_version.down.sql
channels/db/migrations/postgres/000193_add_property_groups_schema_version.up.sql
channels/db/migrations/postgres/000194_add_type_id_index_to_access_control_policies.down.sql
channels/db/migrations/postgres/000194_add_type_id_index_to_access_control_policies.up.sql
channels/db/migrations/postgres/000195_threadmemberships_cleanup_v2.down.sql
channels/db/migrations/postgres/000195_threadmemberships_cleanup_v2.up.sql
channels/db/migrations/postgres/000196_add_lastused_to_incoming_webhooks.down.sql
channels/db/migrations/postgres/000196_add_lastused_to_incoming_webhooks.up.sql
channels/db/migrations/postgres/000197_add_rank_to_property_field_type.down.sql
channels/db/migrations/postgres/000197_add_rank_to_property_field_type.up.sql
channels/db/migrations/postgres/000198_convert_classification_fields_to_rank.down.sql
channels/db/migrations/postgres/000198_convert_classification_fields_to_rank.up.sql
channels/db/migrations/postgres/000199_rename_classification_linked_fields.down.sql
channels/db/migrations/postgres/000199_rename_classification_linked_fields.up.sql
channels/db/migrations/postgres/000200_add_rank_to_attribute_view.down.sql
channels/db/migrations/postgres/000200_add_rank_to_attribute_view.up.sql
channels/db/migrations/postgres/000201_create_property_fields_groupid_updateat_id_index.down.sql
channels/db/migrations/postgres/000201_create_property_fields_groupid_updateat_id_index.up.sql
channels/db/migrations/postgres/000202_create_property_values_groupid_updateat_id_index.down.sql
channels/db/migrations/postgres/000202_create_property_values_groupid_updateat_id_index.up.sql
channels/db/migrations/postgres/000203_add_lastnotifiedat_to_user_access_tokens.down.sql
channels/db/migrations/postgres/000203_add_lastnotifiedat_to_user_access_tokens.up.sql