Create project_deletion_schedules table
This is step 1 of Move deletion schedule related columns from the... (&15268 - closed).
Create a table with the following columns:
CREATE TABLE project_deletion_schedules (
project_id bigint NOT NULL,
user_id bigint NOT NULL,
marked_for_deletion_at timestamp without time zone NOT NULL
);
Also, copy over the already present index and add foreign keys for project_id and user_id.
Implementation guide
- Create the above table in a migration. See sample migration.
- Check the structure.sql file and create the indexes already present for the
projects.marked_for_deletion_by_user_idandprojects.marked_for_deletion_atcolumns for this table.marked_for_deletion_by_user_idis named touser_idfor this table. - Add
project_idanduser_idas foreign keys by following https://docs.gitlab.com/ee/development/migration_style_guide.html#creating-a-new-table-when-we-have-two-foreign-keys.
Edited by Abdul Wadood