Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
edfbc14a
Commit
edfbc14a
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
DB: Job má sloupeček "result"
parent
c526db58
No related branches found
No related tags found
3 merge requests
!19
Reforma vyhodnocování práv
,
!18
Dávky okolo feedbacku
,
!17
Výsledkovka pomocí mo.web.table
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
db/db.ddl
+4
-2
4 additions, 2 deletions
db/db.ddl
db/upgrade-20210116.sql
+3
-0
3 additions, 0 deletions
db/upgrade-20210116.sql
mo/db.py
+1
-0
1 addition, 0 deletions
mo/db.py
with
8 additions
and
2 deletions
db/db.ddl
+
4
−
2
View file @
edfbc14a
...
@@ -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
);
);
This diff is collapsed.
Click to expand it.
db/upgrade-20210116.sql
0 → 100644
+
3
−
0
View file @
edfbc14a
SET
ROLE
'mo_osmo'
;
ALTER
TABLE
jobs
ADD
COLUMN
result
text
NOT
NULL
DEFAULT
''
;
This diff is collapsed.
Click to expand it.
mo/db.py
+
1
−
0
View file @
edfbc14a
...
@@ -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
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment