Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle_mod-hvp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
elc
moodle_mod-hvp
Commits
10c158bf
Commit
10c158bf
authored
4 years ago
by
Thomas Marstrander
Browse files
Options
Downloads
Plain Diff
Merge branch 'haietza-issue-367' into release
parents
a8808aca
0870ea2e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/install.xml
+1
-1
1 addition, 1 deletion
db/install.xml
db/upgrade.php
+15
-0
15 additions, 0 deletions
db/upgrade.php
with
16 additions
and
1 deletion
db/install.xml
+
1
−
1
View file @
10c158bf
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
</KEYS>
</KEYS>
<INDEXES>
<INDEXES>
<INDEX
NAME=
"result"
UNIQUE=
"
tru
e"
FIELDS=
"
id,
content_id, user_id"
/>
<INDEX
NAME=
"result
s
"
UNIQUE=
"
fals
e"
FIELDS=
"content_id, user_id"
/>
</INDEXES>
</INDEXES>
</TABLE>
</TABLE>
<TABLE
NAME=
"hvp_content_user_data"
COMMENT=
"Stores user data about the content"
>
<TABLE
NAME=
"hvp_content_user_data"
COMMENT=
"Stores user data about the content"
>
...
...
This diff is collapsed.
Click to expand it.
db/upgrade.php
+
15
−
0
View file @
10c158bf
...
@@ -520,6 +520,20 @@ function hvp_upgrade_2020082800() {
...
@@ -520,6 +520,20 @@ function hvp_upgrade_2020082800() {
}
}
}
}
/**
* Drop old unused unique index, add nonunique index.
*/
function
hvp_upgrade_2020091500
()
{
global
$DB
;
$dbman
=
$DB
->
get_manager
();
$table
=
new
xmldb_table
(
'hvp_xapi_results'
);
$index
=
new
xmldb_index
(
'results'
,
XMLDB_INDEX_NOTUNIQUE
,
[
'content_id'
,
'user_id'
]);
$dbman
->
add_index
(
$table
,
$index
);
$oldindex
=
new
xmldb_index
(
'result'
,
XMLDB_INDEX_UNIQUE
,
[
'id'
,
'content_id'
,
'user_id'
]);
$dbman
->
drop_index
(
$table
,
$oldindex
);
}
function
hvp_upgrade_2020112600
()
{
function
hvp_upgrade_2020112600
()
{
global
$DB
;
global
$DB
;
$dbman
=
$DB
->
get_manager
();
$dbman
=
$DB
->
get_manager
();
...
@@ -575,6 +589,7 @@ function xmldb_hvp_upgrade($oldversion) {
...
@@ -575,6 +589,7 @@ function xmldb_hvp_upgrade($oldversion) {
2020080400
,
2020080400
,
2020080401
,
2020080401
,
2020082800
,
2020082800
,
2020091500
,
2020112600
,
2020112600
,
];
];
...
...
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