Skip to content
Snippets Groups Projects
Commit edfbc14a authored by Martin Mareš's avatar Martin Mareš
Browse files

DB: Job má sloupeček "result"

parent c526db58
No related branches found
No related tags found
3 merge requests!19Reforma vyhodnocování práv,!18Dávky okolo feedbacku,!17Výsledkovka pomocí mo.web.table
...@@ -262,10 +262,12 @@ CREATE TABLE jobs ( ...@@ -262,10 +262,12 @@ CREATE TABLE jobs (
created_at timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, -- kdy byl založen created_at timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, -- kdy byl založen
finished_at timestamp with time zone DEFAULT NULL, -- kdy doběhl finished_at timestamp with time zone DEFAULT NULL, -- kdy doběhl
expires_at timestamp with time zone DEFAULT NULL, -- kdy bude automaticky smazán expires_at timestamp with time zone DEFAULT NULL, -- kdy bude automaticky smazán
description text NOT NULL DEFAULT '', description text NOT NULL DEFAULT '', -- popis jobu
result text NOT NULL DEFAULT '', -- jednořádková zpráva o výsledku
-- Vstupní parametry a výsledky jobu
in_json jsonb DEFAULT NULL, in_json jsonb DEFAULT NULL,
out_json jsonb DEFAULT NULL, out_json jsonb DEFAULT NULL,
-- Soubory jsou součástí úlohy a po jejím ukončení budou smazány -- Soubory jsou součástí úlohy a po její expiraci budou smazány
in_file varchar(255) DEFAULT NULL, in_file varchar(255) DEFAULT NULL,
out_file varchar(255) DEFAULT NULL out_file varchar(255) DEFAULT NULL
); );
SET ROLE 'mo_osmo';
ALTER TABLE jobs ADD COLUMN result text NOT NULL DEFAULT '';
...@@ -496,6 +496,7 @@ class Job(Base): ...@@ -496,6 +496,7 @@ class Job(Base):
state = Column(Enum(JobState, name='job_state'), nullable=False) state = Column(Enum(JobState, name='job_state'), nullable=False)
user_id = Column(Integer, ForeignKey('users.user_id'), nullable=False) user_id = Column(Integer, ForeignKey('users.user_id'), nullable=False)
description = Column(Text, nullable=False, server_default=text("''::text")) description = Column(Text, nullable=False, server_default=text("''::text"))
result = Column(Text, nullable=False, server_default=text("''::text"))
created_at = Column(DateTime(True), nullable=False, server_default=text("CURRENT_TIMESTAMP")) created_at = Column(DateTime(True), nullable=False, server_default=text("CURRENT_TIMESTAMP"))
finished_at = Column(DateTime(True)) finished_at = Column(DateTime(True))
expires_at = Column(DateTime(True)) expires_at = Column(DateTime(True))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment