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

  1. Create the above table in a migration. See sample migration.
  2. Check the structure.sql file and create the indexes already present for the projects.marked_for_deletion_by_user_id and projects.marked_for_deletion_at columns for this table. marked_for_deletion_by_user_id is named to user_id for this table.
  3. Add project_id and user_id as 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