Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
87b30387
Commit
87b30387
authored
Jan 09, 2018
by
Robert Lyon
Committed by
Gerrit Code Review
Jan 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1734182: Create the 'site_content_version' table"
parents
2c916081
8b3f3a31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
htdocs/lib/db/install.xml
htdocs/lib/db/install.xml
+16
-0
htdocs/lib/db/upgrade.php
htdocs/lib/db/upgrade.php
+21
-0
htdocs/lib/version.php
htdocs/lib/version.php
+1
-1
No files found.
htdocs/lib/db/install.xml
View file @
87b30387
...
...
@@ -1378,5 +1378,21 @@
<INDEX
NAME=
"connectionk"
UNIQUE=
"true"
FIELDS=
"name"
COMMENT=
"the connections can be repeated but the name must be unique for a given type and institution"
/>
</INDEXES>
</TABLE>
<TABLE
NAME=
"site_content_version"
>
<FIELDS>
<FIELD
NAME=
"id"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
SEQUENCE=
"true"
/>
<FIELD
NAME=
"type"
TYPE=
"char"
LENGTH=
"100"
NOTNULL=
"true"
/>
<FIELD
NAME=
"content"
TYPE=
"text"
LENGTH=
"big"
NOTNULL=
"true"
/>
<FIELD
NAME=
"author"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"institution"
TYPE=
"char"
LENGTH=
"255"
NOTNULL=
"true"
/>
<FIELD
NAME=
"version"
TYPE=
"char"
LENGTH=
"15"
NOTNULL=
"true"
/>
<FIELD
NAME=
"ctime"
TYPE=
"datetime"
NOTNULL=
"true"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
<KEY
NAME=
"institutionfk"
TYPE=
"foreign"
FIELDS=
"institution"
REFTABLE=
"institution"
REFFIELDS=
"name"
/>
<KEY
NAME=
"authorfk"
TYPE=
"foreign"
FIELDS=
"author"
REFTABLE=
"usr"
REFFIELDS=
"id"
/>
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
htdocs/lib/db/upgrade.php
View file @
87b30387
...
...
@@ -5588,5 +5588,26 @@ function xmldb_core_upgrade($oldversion=0) {
add_key
(
$table
,
$key
);
}
if
(
$oldversion
<
2018010600
)
{
log_debug
(
'Create "site_content_version" table'
);
$table
=
new
XMLDBTable
(
'site_content_version'
);
create_table
(
$table
);
$table
->
addFieldInfo
(
'id'
,
XMLDB_TYPE_INTEGER
,
10
,
null
,
XMLDB_NOTNULL
,
XMLDB_SEQUENCE
);
$table
->
addFieldInfo
(
'type'
,
XMLDB_TYPE_CHAR
,
100
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'content'
,
XMLDB_TYPE_TEXT
,
'big'
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'author'
,
XMLDB_TYPE_INTEGER
,
10
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'institution'
,
XMLDB_TYPE_CHAR
,
255
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'version'
,
XMLDB_TYPE_CHAR
,
15
,
null
,
XMLDB_NOTNULL
);
$table
->
addFieldInfo
(
'ctime'
,
XMLDB_TYPE_DATETIME
,
null
,
null
,
XMLDB_NOTNULL
);
$table
->
addKeyInfo
(
'primary'
,
XMLDB_KEY_PRIMARY
,
array
(
'id'
));
$table
->
addKeyInfo
(
'institutionfk'
,
XMLDB_KEY_FOREIGN
,
array
(
'institution'
),
'institution'
,
array
(
'name'
));
$table
->
addKeyInfo
(
'authorfk'
,
XMLDB_KEY_FOREIGN
,
array
(
'author'
),
'usr'
,
array
(
'id'
));
create_table
(
$table
);
}
return
$status
;
}
htdocs/lib/version.php
View file @
87b30387
...
...
@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config
->
version
=
2018010
5
00
;
$config
->
version
=
2018010
6
00
;
$config
->
series
=
'18.04'
;
$config
->
release
=
'18.04dev'
;
$config
->
minupgradefrom
=
2015030409
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment