import { MigrationInterface, QueryRunner } from 'typeorm';

export class updProjectLicenseConstraints1708552017565
  implements MigrationInterface
{
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
        alter table project_licenses drop constraint project_licenses_project_id_fkey;
        `);
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
        alter table project_licenses
	    add constraint project_licenses_project_id_fkey
		foreign key (project_id) references projects (id) ON UPDATE CASCADE ;
    `);
  }
}
