You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
574 B
21 lines
574 B
import { MigrationInterface, QueryRunner, TableUnique } from 'typeorm';
|
|
|
|
export class DropImdbIdConstraint1607928251245 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.dropUniqueConstraint(
|
|
'media',
|
|
'UQ_7ff2d11f6a83cb52386eaebe74b'
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.createUniqueConstraint(
|
|
'media',
|
|
new TableUnique({
|
|
name: 'UQ_7ff2d11f6a83cb52386eaebe74b',
|
|
columnNames: ['imdbId'],
|
|
})
|
|
);
|
|
}
|
|
}
|