discourse/db
Bianca Nenciu 799a45a291
DEV: Migrate notifications#id to bigint (#28444)
The `notifications.id` column is the most probable column to run out of
values. This is because it is an `int` column that has only 2147483647
values and many notifications are generated on a regular basis in an
active community. This commit migrates the column to `bigint`.

These migrations do not use `ALTER TABLE ... COLUMN ... TYPE` in order
to avoid the `ACCESS EXCLUSIVE` lock on the entire table. Instead, they
create a new `bigint` column, copy the values to the new column and
then sets the new column as primary key.

Related columns (see `user_badges`, `shelved_notifications`) will
be migrated in a follow-up commit.
2024-08-26 09:35:12 +08:00
..
fixtures FIX: serialize Flags instead of PostActionType (#28362) 2024-08-14 12:13:46 +10:00
migrate DEV: Migrate notifications#id to bigint (#28444) 2024-08-26 09:35:12 +08:00
post_migrate DEV: Promote historic post_deploy migrations (#28127) 2024-07-30 00:49:21 +08:00
api_test_seeds.rb DEV: Apply syntax_tree formatting to `db/*` 2023-01-09 11:59:41 +00:00