Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
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
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
9dd2fedf
Commit
9dd2fedf
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-220: add missing sql statements
parent
237f948b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/database/postgresql/alter_8_0_x_to_8_1_0.sql
+80
-2
80 additions, 2 deletions
...in/resources/database/postgresql/alter_8_0_x_to_8_1_0.sql
with
80 additions
and
2 deletions
src/main/resources/database/postgresql/alter_8_0_x_to_8_1_0.sql
+
80
−
2
View file @
9dd2fedf
-- user view
create
view
o_bs_identity_short_v
as
(
select
ident
.
id
as
id_id
,
ident
.
name
as
id_name
,
ident
.
lastlogin
as
id_lastlogin
,
ident
.
status
as
id_status
,
us
.
user_id
as
us_id
,
p_firstname
.
propvalue
as
first_name
,
p_lastname
.
propvalue
as
last_name
,
p_email
.
propvalue
as
email
from
o_bs_identity
as
ident
inner
join
o_user
as
us
on
(
ident
.
fk_user_id
=
us
.
user_id
)
left
join
o_userproperty
as
p_firstname
on
(
us
.
user_id
=
p_firstname
.
fk_user_id
and
p_firstname
.
propName
=
'firstName'
)
left
join
o_userproperty
as
p_lastname
on
(
us
.
user_id
=
p_lastname
.
fk_user_id
and
p_lastname
.
propName
=
'lastName'
)
left
join
o_userproperty
as
p_email
on
(
us
.
user_id
=
p_email
.
fk_user_id
and
p_email
.
propName
=
'email'
)
);
-- assessment tables
-- efficiency statments
create
table
o_as_eff_statement
(
id
int8
not
null
,
version
int4
not
null
,
lastmodified
timestamp
,
creationdate
timestamp
,
passed
boolean
,
score
float4
,
total_nodes
int4
,
attempted_nodes
int4
,
passed_nodes
int4
,
course_title
varchar
(
255
),
course_short_title
varchar
(
128
),
course_repo_key
int8
,
statement_xml
text
,
fk_identity
int8
,
fk_resource_id
int8
,
unique
(
fk_identity
,
fk_resource_id
),
primary
key
(
id
)
);
alter
table
o_as_eff_statement
add
constraint
eff_statement_id_cstr
foreign
key
(
fk_identity
)
references
o_bs_identity
(
id
);
create
index
eff_statement_repo_key_idx
on
o_as_eff_statement
(
course_repo_key
);
-- user to course informations (was property initial and recent launch dates)
create
table
o_as_user_course_infos
(
id
int8
not
null
,
version
int4
not
null
,
creationdate
timestamp
,
lastmodified
timestamp
,
initiallaunchdate
timestamp
,
recentlaunchdate
timestamp
,
visit
int4
,
timespend
int8
,
fk_identity
int8
,
fk_resource_id
int8
,
unique
(
fk_identity
,
fk_resource_id
),
primary
key
(
id
)
);
alter
table
o_as_user_course_infos
add
constraint
user_course_infos_id_cstr
foreign
key
(
fk_identity
)
references
o_bs_identity
(
id
);
alter
table
o_as_user_course_infos
add
constraint
user_course_infos_res_cstr
foreign
key
(
fk_resource_id
)
references
o_olatresource
(
resource_id
);
-- assessment results
-- help view
create
or
replace
view
o_gp_contextresource_2_group_v
as
(
select
cg_bg2resource
.
groupcontextresource_id
as
groupcontextresource_id
,
cg_bgcontext
.
groupcontext_id
as
groupcontext_id
,
cg_bgroup
.
group_id
as
group_id
,
cg_bg2resource
.
oresource_id
as
oresource_id
,
cg_bgcontext
.
grouptype
as
grouptype
,
cg_bgcontext
.
defaultcontext
as
defaultcontext
,
cg_bgroup
.
groupname
as
groupname
,
cg_bgroup
.
fk_ownergroup
as
fk_ownergroup
,
cg_bgroup
.
fk_partipiciantgroup
as
fk_partipiciantgroup
,
cg_bgroup
.
fk_waitinggroup
as
fk_waitinggroup
from
o_gp_bgcontextresource_rel
as
cg_bg2resource
inner
join
o_gp_bgcontext
as
cg_bgcontext
on
(
cg_bg2resource
.
groupcontext_fk
=
cg_bgcontext
.
groupcontext_id
)
inner
join
o_gp_business
as
cg_bgroup
on
(
cg_bg2resource
.
groupcontext_fk
=
cg_bgroup
.
groupcontext_fk
)
);
-- notifications for e-portfolio
create
or
replace
view
o_ep_notifications_struct_v
as
(
select
...
...
@@ -34,7 +112,7 @@ create or replace view o_ep_notifications_art_v as (
inner
join
o_ep_artefact
as
artefact
on
(
artefact_link
.
fk_artefact_id
=
artefact
.
artefact_id
)
left
join
o_ep_struct_el
as
root_struct
on
(
struct
.
fk_struct_root_id
=
root_struct
.
structure_id
)
);
create
or
replace
view
o_ep_notifications_rating_v
as
(
select
urating
.
rating_id
as
rating_id
,
...
...
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