[Step 1] Create table GroupRepositoryStorageMove
We need to create the table GroupRepositoryStorageMove
, that will store and track all the repository storage moves we made on group repositories.
We can look at the existing ProjectRepositoryStorageMove
and SnippetRepositoryStorageMove
table, to see the necessary fields:
CREATE TABLE public.group_repository_storage_moves (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
group_id bigint NOT NULL,
state smallint DEFAULT 1 NOT NULL,
source_storage_name text NOT NULL,
destination_storage_name text NOT NULL,
CONSTRAINT group_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)),
CONSTRAINT group_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255))
);