Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iena-path-block
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
iena
iena-path-block
Commits
600fe966
Commit
600fe966
authored
4 years ago
by
Myriam Delaruelle
Browse files
Options
Downloads
Patches
Plain Diff
Fix DB upgrade
parent
45b09ff4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/upgrade.php
+40
-0
40 additions, 0 deletions
db/upgrade.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
41 additions
and
1 deletion
db/upgrade.php
0 → 100644
+
40
−
0
View file @
600fe966
<?php
function
xmldb_block_career_upgrade
(
$oldversion
)
{
global
$DB
;
$dbman
=
$DB
->
get_manager
();
if
(
$oldversion
<
2021070101
)
{
// Define table block_career_groups to be created.
$table
=
new
xmldb_table
(
'block_career_groups'
);
// Adding fields to table block_career_groups.
$table
->
add_field
(
'id'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
XMLDB_SEQUENCE
,
null
);
$table
->
add_field
(
'group_id'
,
XMLDB_TYPE_INTEGER
,
'8'
,
null
,
XMLDB_NOTNULL
,
null
,
'0'
);
$table
->
add_field
(
'career'
,
XMLDB_TYPE_INTEGER
,
'8'
,
null
,
XMLDB_NOTNULL
,
null
,
'0'
);
$table
->
add_field
(
'timeadded'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
// Adding keys to table block_career_groups.
$table
->
add_key
(
'primary'
,
XMLDB_KEY_PRIMARY
,
[
'id'
]);
$table
->
add_key
(
'career'
,
XMLDB_KEY_FOREIGN
,
[
'career'
],
'block_career'
,
[
'id'
]);
$table
->
add_key
(
'group_id'
,
XMLDB_KEY_FOREIGN
,
[
'group_id'
],
'groups'
,
[
'id'
]);
// Conditionally launch create table for block_career_groups.
if
(
!
$dbman
->
table_exists
(
$table
))
{
$dbman
->
create_table
(
$table
);
}
// Career savepoint reached.
upgrade_block_savepoint
(
true
,
2021070101
,
'career'
);
}
return
true
;
}
?>
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
600fe966
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
*/
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
20210
624
01
;
$plugin
->
version
=
20210
701
01
;
$plugin
->
requires
=
2014051200
;
$plugin
->
requires
=
2014051200
;
$plugin
->
component
=
'block_career'
;
$plugin
->
component
=
'block_career'
;
$plugin
->
release
=
'v1.1'
;
$plugin
->
release
=
'v1.1'
;
...
...
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