mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-08 20:37:41 +00:00
migrations; torr search, dl, seed, delete; files scan, delete; configs
This commit is contained in:
@@ -5,36 +5,44 @@ export class CreateFilesTable1672729641013 implements MigrationInterface {
|
||||
await queryRunner.query(
|
||||
`create table files
|
||||
(
|
||||
id INTEGER
|
||||
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
|
||||
path VARCHAR(512),
|
||||
relative_path TEXT,
|
||||
deleted TINYINT,
|
||||
size INTEGER,
|
||||
file_name VARCHAR(512),
|
||||
infos TEXT,
|
||||
info TEXT,
|
||||
title_id INTEGER,
|
||||
season INTEGER default NULL,
|
||||
duration REAL,
|
||||
transmission_id INTEGER default NULL,
|
||||
linkomanija INTEGER default NULL,
|
||||
progress REAL,
|
||||
stream_provider TEXT default 'fs' not null
|
||||
);`,
|
||||
);
|
||||
|
||||
await queryRunner.query(
|
||||
`create unique index path
|
||||
`create unique index files_path
|
||||
on files (path);`,
|
||||
);
|
||||
|
||||
await queryRunner.query(
|
||||
`create index season
|
||||
`create index files_season
|
||||
on files (season);`,
|
||||
);
|
||||
|
||||
await queryRunner.query(
|
||||
`create index title_id
|
||||
`create index files_title_id
|
||||
on files (title_id);`,
|
||||
);
|
||||
|
||||
await queryRunner.query(
|
||||
`create index files_relative_path
|
||||
on files (relative_path);`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user