Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
c36e0c6b
Commit
c36e0c6b
authored
Oct 17, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 17, 2006
Browse files
Patch to create user table.
parent
f1b538b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/upgrade.php
View file @
c36e0c6b
...
...
@@ -30,6 +30,26 @@ function xmldb_core_upgrade($oldversion=0) {
$status
=
true
;
if
(
$status
&&
$oldversion
<
2006101700
)
{
// Creating the usr table with basic fields required for authentication
$table
=
new
XMLDBTable
(
'usr'
);
$table
->
addFieldInfo
(
'id'
,
XMLDB_TYPE_INTEGER
,
'10'
,
XMLDB_UNSIGNED
,
XMLDB_NOTNULL
,
XMLDB_SEQUENCE
,
null
,
null
,
null
);
$table
->
addFieldInfo
(
'username'
,
XMLDB_TYPE_CHAR
,
'100'
,
XMLDB_NOTNULL
,
null
,
null
,
null
,
null
);
$table
->
addFieldInfo
(
'password'
,
XMLDB_TYPE_CHAR
,
'40'
,
XMLDB_NOTNULL
,
null
,
null
,
null
,
null
);
$table
->
addFieldInfo
(
'salt'
,
XMLDB_TYPE_CHAR
,
'8'
,
XMLDB_NOTNULL
,
null
,
null
,
null
,
null
);
$table
->
addKeyInfo
(
'primary'
,
XMLDB_KEY_PRIMARY
,
array
(
'id'
));
$table
->
addIndexInfo
(
'usernameuk'
,
XMLDB_KEY_UNIQUE
,
array
(
'LOWER(username)'
));
$status
=
$status
&&
create_table
(
$table
);
}
return
$status
;
}
...
...
Write
Preview
Supports
Markdown
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