Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
044cafd8
Commit
044cafd8
authored
9 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
Task #8570: added task_view and resource_claim_view
parent
2dc55b77
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql
+27
-0
27 additions, 0 deletions
...gnment/ResourceAllocationDatabase/sql/create_database.sql
with
27 additions
and
0 deletions
SAS/ResourceAssignment/ResourceAllocationDatabase/sql/create_database.sql
+
27
−
0
View file @
044cafd8
...
...
@@ -207,4 +207,31 @@ CREATE TABLE resource_allocation.config (
ALTER
TABLE
resource_allocation
.
config
OWNER
TO
resourceassignment
;
-- VIEWS ----------------------------------------------
CREATE
OR
REPLACE
VIEW
resource_allocation
.
task_view
AS
SELECT
t
.
id
,
t
.
mom_id
,
t
.
otdb_id
,
t
.
status_id
,
t
.
type_id
,
t
.
specification_id
,
ts
.
name
AS
status
,
tt
.
name
AS
type
,
s
.
starttime
,
s
.
endtime
FROM
resource_allocation
.
task
t
JOIN
resource_allocation
.
task_status
ts
ON
ts
.
id
=
t
.
status_id
JOIN
resource_allocation
.
task_type
tt
ON
tt
.
id
=
t
.
type_id
JOIN
resource_allocation
.
specification
s
ON
s
.
id
=
t
.
specification_id
;
ALTER
TABLE
resource_allocation
.
task_view
OWNER
TO
resourceassignment
;
COMMENT
ON
VIEW
resource_allocation
.
task_view
IS
'plain view on task table including task_status.name task_type.name specification.starttime and specification.endtime'
;
CREATE
OR
REPLACE
VIEW
resource_allocation
.
resource_claim_view
AS
SELECT
rc
.
id
,
rc
.
resource_id
,
rc
.
task_id
,
rc
.
starttime
,
rc
.
endtime
,
rc
.
status_id
,
rc
.
session_id
,
rc
.
claim_size
,
rc
.
username
,
rc
.
user_id
,
rcs
.
name
AS
status
FROM
resource_allocation
.
resource_claim
rc
JOIN
resource_allocation
.
resource_claim_status
rcs
ON
rcs
.
id
=
rc
.
status_id
;
ALTER
TABLE
resource_allocation
.
resource_claim_view
OWNER
TO
resourceassignment
;
COMMENT
ON
VIEW
resource_allocation
.
resource_claim_view
IS
'plain view on resource_claim table, including resource_claim_status.name'
;
COMMIT
;
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