mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(releases): replay actions (#932)
* feat(releases): replay actions * feat(releases): replay actions component * fix: update filter actions * fix: select filter_id from ras
This commit is contained in:
parent
97333d334f
commit
6898ad8315
16 changed files with 752 additions and 189 deletions
|
@ -254,6 +254,9 @@ CREATE TABLE release_action_status
|
|||
id INTEGER PRIMARY KEY,
|
||||
status TEXT,
|
||||
action TEXT NOT NULL,
|
||||
action_id INTEGER
|
||||
CONSTRAINT release_action_status_action_id_fk
|
||||
REFERENCES action,
|
||||
type TEXT NOT NULL,
|
||||
client TEXT,
|
||||
filter TEXT,
|
||||
|
@ -1084,4 +1087,58 @@ ADD COLUMN topic text;`,
|
|||
|
||||
ALTER TABLE filter
|
||||
ADD COLUMN use_regex_description BOOLEAN DEFAULT FALSE;`,
|
||||
`create table release_action_status_dg_tmp
|
||||
(
|
||||
id INTEGER
|
||||
primary key,
|
||||
status TEXT,
|
||||
action TEXT not null,
|
||||
action_id INTEGER
|
||||
constraint release_action_status_action_id_fk
|
||||
references action,
|
||||
type TEXT not null,
|
||||
rejections TEXT default '{}' not null,
|
||||
timestamp TIMESTAMP default CURRENT_TIMESTAMP,
|
||||
raw TEXT,
|
||||
log TEXT,
|
||||
release_id INTEGER not null
|
||||
constraint release_action_status_release_id_fkey
|
||||
references "release"
|
||||
on delete cascade,
|
||||
client TEXT,
|
||||
filter TEXT,
|
||||
filter_id INTEGER
|
||||
constraint release_action_status_filter_id_fk
|
||||
references filter
|
||||
);
|
||||
|
||||
insert into release_action_status_dg_tmp(id, status, action, type, rejections, timestamp, raw, log, release_id, client,
|
||||
filter, filter_id)
|
||||
select id,
|
||||
status,
|
||||
action,
|
||||
type,
|
||||
rejections,
|
||||
timestamp,
|
||||
raw,
|
||||
log,
|
||||
release_id,
|
||||
client,
|
||||
filter,
|
||||
filter_id
|
||||
from release_action_status;
|
||||
|
||||
drop table release_action_status;
|
||||
|
||||
alter table release_action_status_dg_tmp
|
||||
rename to release_action_status;
|
||||
|
||||
create index release_action_status_filter_id_index
|
||||
on release_action_status (filter_id);
|
||||
|
||||
create index release_action_status_release_id_index
|
||||
on release_action_status (release_id);
|
||||
|
||||
create index release_action_status_status_index
|
||||
on release_action_status (status);`,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue