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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
3d53b2c9
Commit
3d53b2c9
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
DB: Upgrade zakládá tabulku jobs
parent
07d3b23c
No related branches found
No related tags found
1 merge request
!9
WIP: Zárodek uživatelské části webu a submitování
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
db/upgrade-20210111.sql
+28
-0
28 additions, 0 deletions
db/upgrade-20210111.sql
with
28 additions
and
0 deletions
db/upgrade-20210111.sql
+
28
−
0
View file @
3d53b2c9
...
@@ -26,3 +26,31 @@ ALTER TABLE papers
...
@@ -26,3 +26,31 @@ ALTER TABLE papers
ALTER
TABLE
solutions
ALTER
TABLE
solutions
RENAME
COLUMN
last_submit
TO
final_submit
,
RENAME
COLUMN
last_submit
TO
final_submit
,
RENAME
COLUMN
last_feedback
TO
final_feedback
;
RENAME
COLUMN
last_feedback
TO
final_feedback
;
CREATE
TYPE
job_type
AS
ENUM
(
'download_submits'
,
'upload_feedback'
);
CREATE
TYPE
job_state
AS
ENUM
(
'ready'
,
'running'
,
'done'
,
-- Hotovo, out_json a out_file jsou platné
'failed'
-- Interní chyba při zpracování, viz log
);
CREATE
TABLE
jobs
(
job_id
serial
PRIMARY
KEY
,
type
job_type
NOT
NULL
,
state
job_state
NOT
NULL
,
user_id
int
NOT
NULL
REFERENCES
users
(
user_id
),
-- komu patří
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
expires_at
timestamp
with
time
zone
DEFAULT
NULL
,
-- kdy bude automaticky smazán
description
text
NOT
NULL
DEFAULT
''
,
in_json
jsonb
DEFAULT
NULL
,
out_json
jsonb
DEFAULT
NULL
,
-- Soubory jsou součástí úlohy a po jejím ukončení budou smazány
in_file
varchar
(
255
)
DEFAULT
NULL
,
out_file
varchar
(
255
)
DEFAULT
NULL
);
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