ALTER TABLE past_projects ADD COLUMN category_id integer;
ALTER TABLE past_projects ALTER COLUMN category_id SET STORAGE PLAIN;
ALTER TABLE past_projects ALTER COLUMN category_id SET NOT NULL;
ALTER TABLE past_projects ALTER COLUMN category_id SET DEFAULT 0;

ALTER TABLE past_projects
  ADD CONSTRAINT fk_past_project_category_id FOREIGN KEY (category_id)
      REFERENCES category (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION;

