Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-tool_lifecycle
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-tool_lifecycle
Commits
ebe90937
Commit
ebe90937
authored
6 years ago
by
Justus Dieckmann
Browse files
Options
Downloads
Patches
Plain Diff
Add db-table for interactionlogs
parent
6ebdc134
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
db/install.xml
+16
-0
16 additions, 0 deletions
db/install.xml
db/upgrade.php
+29
-0
29 additions, 0 deletions
db/upgrade.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
46 additions
and
1 deletion
db/install.xml
+
16
−
0
View file @
ebe90937
...
...
@@ -111,5 +111,21 @@
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
</KEYS>
</TABLE>
<TABLE
NAME=
"tool_lifecycle_action_log"
COMMENT=
"Logs for interactions"
>
<FIELDS>
<FIELD
NAME=
"id"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"true"
/>
<FIELD
NAME=
"processid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"workflowid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"courseid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"stepindex"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"time"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"userid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
<KEY
NAME=
"processid_fk"
TYPE=
"foreign"
FIELDS=
"processid"
REFTABLE=
"tool_lifecycle_process"
REFFIELDS=
"id"
/>
<KEY
NAME=
"workflowid_fk"
TYPE=
"foreign"
FIELDS=
"workflowid"
REFTABLE=
"tool_lifecycle_workflow"
REFFIELDS=
"id"
/>
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
db/upgrade.php
+
29
−
0
View file @
ebe90937
...
...
@@ -327,5 +327,34 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
upgrade_plugin_savepoint
(
true
,
2019053100
,
'tool'
,
'lifecycle'
);
}
if
(
$oldversion
<
2019070200
)
{
// Define table tool_lifecycle_action_log to be created.
$table
=
new
xmldb_table
(
'tool_lifecycle_action_log'
);
// Adding fields to table tool_lifecycle_action_log.
$table
->
add_field
(
'id'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
XMLDB_SEQUENCE
,
null
);
$table
->
add_field
(
'processid'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
$table
->
add_field
(
'workflowid'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
$table
->
add_field
(
'courseid'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
$table
->
add_field
(
'stepindex'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
$table
->
add_field
(
'time'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
$table
->
add_field
(
'userid'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
// Adding keys to table tool_lifecycle_action_log.
$table
->
add_key
(
'primary'
,
XMLDB_KEY_PRIMARY
,
[
'id'
]);
$table
->
add_key
(
'processid_fk'
,
XMLDB_KEY_FOREIGN
,
[
'processid'
],
'tool_lifecycle_process'
,
[
'id'
]);
$table
->
add_key
(
'workflowid_fk'
,
XMLDB_KEY_FOREIGN
,
[
'workflowid'
],
'tool_lifecycle_workflow'
,
[
'id'
]);
// Conditionally launch create table for tool_lifecycle_action_log.
if
(
!
$dbman
->
table_exists
(
$table
))
{
$dbman
->
create_table
(
$table
);
}
// Lifecycle savepoint reached.
upgrade_plugin_savepoint
(
true
,
2019070200
,
'tool'
,
'lifecycle'
);
}
return
true
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
ebe90937
...
...
@@ -24,7 +24,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
;
$plugin
->
maturity
=
MATURITY_ALPHA
;
$plugin
->
version
=
20190
531
00
;
$plugin
->
version
=
20190
702
00
;
$plugin
->
component
=
'tool_lifecycle'
;
$plugin
->
requires
=
2017111300
;
// Require Moodle 3.4 (or above).
$plugin
->
release
=
'v3.6-r1'
;
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