Commit 2e787ef4 authored by Vladimir Shushlin's avatar Vladimir Shushlin

Change pages deployments size to 8 bytes

It was causing pages deployments 2.4 GB to fail
parent 914ecdff
---
title: Change pages deployments size to bigint
merge_request: 50262
author:
type: fixed
# frozen_string_literal: true
class ChangePagesDeploymentSizeToBigint < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
change_column_type_concurrently :pages_deployments, :size, :bigint
end
def down
undo_change_column_type_concurrently :pages_deployments, :size
end
end
# frozen_string_literal: true
class ChangePagesDeploymentSizeToBigintCleanup < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
cleanup_concurrent_column_type_change :pages_deployments, :size
end
def down
undo_cleanup_concurrent_column_type_change :pages_deployments, :size, :integer, limit: 4
end
end
32330327aa8db01b5bc2c533af5387e77ad3dc0c34eacaac16a793df75634ce6
\ No newline at end of file
938aa97919e5a15143a72f33bebb27e501d5ef7cc53cf4e7debe9dee398b7255
\ No newline at end of file
...@@ -14869,10 +14869,11 @@ CREATE TABLE pages_deployments ( ...@@ -14869,10 +14869,11 @@ CREATE TABLE pages_deployments (
project_id bigint NOT NULL, project_id bigint NOT NULL,
ci_build_id bigint, ci_build_id bigint,
file_store smallint NOT NULL, file_store smallint NOT NULL,
size integer NOT NULL,
file text NOT NULL, file text NOT NULL,
file_count integer NOT NULL, file_count integer NOT NULL,
file_sha256 bytea NOT NULL, file_sha256 bytea NOT NULL,
size bigint,
CONSTRAINT check_5f9132a958 CHECK ((size IS NOT NULL)),
CONSTRAINT check_f0fe8032dd CHECK ((char_length(file) <= 255)) CONSTRAINT check_f0fe8032dd CHECK ((char_length(file) <= 255))
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment