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
7d6643c0
Commit
7d6643c0
authored
6 years ago
by
Justus Dieckmann
Browse files
Options
Downloads
Patches
Plain Diff
Add delayforallworkflows column to workflow table
parent
9c51280b
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
-0
1 addition, 0 deletions
db/install.xml
db/upgrade.php
+12
-4
12 additions, 4 deletions
db/upgrade.php
with
13 additions
and
4 deletions
db/install.xml
+
1
−
0
View file @
7d6643c0
...
@@ -108,6 +108,7 @@
...
@@ -108,6 +108,7 @@
<FIELD
NAME=
"displaytitle"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"false"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"displaytitle"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"false"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"rollbackdelay"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"rollbackdelay"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"finishdelay"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"finishdelay"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
/>
<FIELD
NAME=
"delayforallworkflows"
TYPE=
"int"
LENGTH=
"1"
NOTNULL=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
/>
</FIELDS>
</FIELDS>
<KEYS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
This diff is collapsed.
Click to expand it.
db/upgrade.php
+
12
−
4
View file @
7d6643c0
...
@@ -331,8 +331,16 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
...
@@ -331,8 +331,16 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
$duration
=
get_config
(
null
,
'lifecycle_duration'
);
$duration
=
get_config
(
null
,
'lifecycle_duration'
);
// Define field
finish
delay to be added to tool_lifecycle_workflow.
// Define field
rollback
delay to be added to tool_lifecycle_workflow.
$table
=
new
xmldb_table
(
'tool_lifecycle_workflow'
);
$table
=
new
xmldb_table
(
'tool_lifecycle_workflow'
);
$field
=
new
xmldb_field
(
'rollbackdelay'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
0
,
'displaytitle'
);
// Conditionally launch add field rollbackdelay.
if
(
!
$dbman
->
field_exists
(
$table
,
$field
))
{
$dbman
->
add_field
(
$table
,
$field
);
}
// Define field finishdelay to be added to tool_lifecycle_workflow.
$field
=
new
xmldb_field
(
'finishdelay'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
0
,
'rollbackdelay'
);
$field
=
new
xmldb_field
(
'finishdelay'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
0
,
'rollbackdelay'
);
// Conditionally launch add field finishdelay.
// Conditionally launch add field finishdelay.
...
@@ -340,10 +348,10 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
...
@@ -340,10 +348,10 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
$dbman
->
add_field
(
$table
,
$field
);
$dbman
->
add_field
(
$table
,
$field
);
}
}
// Define field
rollbackdelay
to be added to tool_lifecycle_workflow.
// Define field
delayforallworkflows
to be added to tool_lifecycle_workflow.
$field
=
new
xmldb_field
(
'
rollbackdelay
'
,
XMLDB_TYPE_INTEGER
,
'1
0
'
,
null
,
XMLDB_NOTNULL
,
null
,
0
,
'
displaytitle
'
);
$field
=
new
xmldb_field
(
'
delayforallworkflows
'
,
XMLDB_TYPE_INTEGER
,
'1'
,
null
,
XMLDB_NOTNULL
,
null
,
0
,
'
finishdelay
'
);
// Conditionally launch add field
rollbackdelay
.
// Conditionally launch add field
delayforallworkflows
.
if
(
!
$dbman
->
field_exists
(
$table
,
$field
))
{
if
(
!
$dbman
->
field_exists
(
$table
,
$field
))
{
$dbman
->
add_field
(
$table
,
$field
);
$dbman
->
add_field
(
$table
,
$field
);
}
}
...
...
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