add migrations (package, config, migrations), add exceptions filter for kodi, start VideoFiles module

This commit is contained in:
Jurgis Sakalauskas
2023-01-03 10:58:33 +02:00
parent 2fb78b61c4
commit 9cf70326af
27 changed files with 295 additions and 69 deletions
@@ -0,0 +1,43 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class CreateFilesTable1672729641013 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`create table files
(
id INTEGER
primary key autoincrement,
path VARCHAR(512),
deleted TINYINT,
size INTEGER,
file_name VARCHAR(512),
infos TEXT,
info TEXT,
title_id INTEGER,
season INTEGER default NULL,
duration REAL,
transmission INTEGER default NULL,
lm INTEGER default NULL
);`,
);
await queryRunner.query(
`create unique index path
on files (path);`,
);
await queryRunner.query(
`create index season
on files (season);`,
);
await queryRunner.query(
`create index title_id
on files (title_id);`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE files`);
}
}