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
9dd5b985
Commit
9dd5b985
authored
Nov 27, 2006
by
Martyn Smith
Committed by
Martyn Smith
Nov 27, 2006
Browse files
Database changes
parent
f0fcf61d
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/install.xml
View file @
9dd5b985
...
...
@@ -577,14 +577,11 @@
<FIELD
NAME=
"owner"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"template"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"startdate"
TYPE=
"datetime"
/>
<FIELD
NAME=
"
end
date"
TYPE=
"datetime"
/>
<FIELD
NAME=
"
stop
date"
TYPE=
"datetime"
/>
<FIELD
NAME=
"ctime"
TYPE=
"datetime"
NOTNULL=
"true"
/>
<FIELD
NAME=
"mtime"
TYPE=
"datetime"
NOTNULL=
"true"
/>
<FIELD
NAME=
"atime"
TYPE=
"datetime"
NOTNULL=
"true"
/>
<FIELD
NAME=
"submitted"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"false"
/>
<FIELD
NAME=
"public"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
/>
<FIELD
NAME=
"loggedin"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
/>
<FIELD
NAME=
"friendsonly"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
DEFAULT=
"0"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
@@ -621,10 +618,25 @@
<KEY
NAME=
"viewfk"
TYPE=
"foreign"
FIELDS=
"view"
REFTABLE=
"view"
REFFIELDS=
"id"
/>
</KEYS>
</TABLE>
<TABLE
NAME=
"view_access"
>
<FIELDS>
<FIELD
NAME=
"view"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"accesstype"
TYPE=
"char"
LENGTH=
"16"
NOTNULL=
"true"
ENUM=
"true"
ENUMVALUES=
"'public', 'loggedin', 'friends'"
/>
<FIELD
NAME=
"startdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
<FIELD
NAME=
"stopdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"view,accesstype"
/>
<KEY
NAME=
"viewfk"
TYPE=
"foreign"
FIELDS=
"view"
REFTABLE=
"view"
REFFIELDS=
"id"
/>
</KEYS>
</TABLE>
<TABLE
NAME=
"view_access_community"
>
<FIELDS>
<FIELD
NAME=
"view"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"community"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"tutoronly"
TYPE=
"int"
LENGTH=
"1"
NOTNULL=
"true"
DEFAULT=
"0"
/>
<FIELD
NAME=
"startdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
<FIELD
NAME=
"stopdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"view,community"
/>
...
...
@@ -636,6 +648,8 @@
<FIELDS>
<FIELD
NAME=
"view"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"grp"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"startdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
<FIELD
NAME=
"stopdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"view,grp"
/>
...
...
@@ -647,6 +661,8 @@
<FIELDS>
<FIELD
NAME=
"view"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"usr"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
/>
<FIELD
NAME=
"startdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
<FIELD
NAME=
"stopdate"
TYPE=
"datetime"
NOTNULL=
"false"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"view,usr"
/>
...
...
test/lib/Mahara/RandomData.pm
View file @
9dd5b985
...
...
@@ -319,7 +319,7 @@ sub insert_random_views {
$title
=~
s/[\x80-\xff]//g
;
$description
=~
s/[\x80-\xff]//g
;
$self
->
{
dbh
}
->
do
('
INSERT INTO
'
.
$prefix
.
'
view (title, description, owner, template, startdate,
end
date, ctime, mtime, atime)
$self
->
{
dbh
}
->
do
('
INSERT INTO
'
.
$prefix
.
'
view (title, description, owner, template, startdate,
stop
date, ctime, mtime, atime)
VALUES(?, ?, ?, ?, current_timestamp, current_timestamp, current_timestamp, current_timestamp, current_timestamp)
',
undef
,
$title
,
$description
,
$user_id
,
$template_id
);
my
$view_id
=
$self
->
{
dbh
}
->
last_insert_id
(
undef
,
undef
,
$prefix
.
'
view
',
undef
);
...
...
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