diff options
Diffstat (limited to 'db/migrate/20230913235822_change_geo_node_statuses_last_event_id_integer_to_big_int.rb')
-rw-r--r-- | db/migrate/20230913235822_change_geo_node_statuses_last_event_id_integer_to_big_int.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20230913235822_change_geo_node_statuses_last_event_id_integer_to_big_int.rb b/db/migrate/20230913235822_change_geo_node_statuses_last_event_id_integer_to_big_int.rb new file mode 100644 index 00000000000..618e6ce6ec9 --- /dev/null +++ b/db/migrate/20230913235822_change_geo_node_statuses_last_event_id_integer_to_big_int.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class ChangeGeoNodeStatusesLastEventIdIntegerToBigInt < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + with_lock_retries do + execute "ALTER TABLE geo_node_statuses ALTER COLUMN last_event_id TYPE bigint;" + end + + execute "ANALYZE geo_node_statuses;" + end + + def down + with_lock_retries do + execute "ALTER TABLE geo_node_statuses ALTER COLUMN last_event_id TYPE integer;" + end + + execute "ANALYZE geo_node_statuses;" + end +end |