NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function data_upgrade($oldversion) {
|
|
|
|
/// This function does anything necessary to upgrade
|
|
|
|
/// older versions to match current functionality
|
|
|
|
|
|
|
|
global $CFG;
|
|
|
|
|
2006-01-19 09:06:22 +00:00
|
|
|
if ($oldversion < 2006011900) {
|
|
|
|
table_column("data_content", "", "content1", "longtext", "", "", "", "not null");
|
|
|
|
table_column("data_content", "", "content2", "longtext", "", "", "", "not null");
|
|
|
|
table_column("data_content", "", "content3", "longtext", "", "", "", "not null");
|
|
|
|
table_column("data_content", "", "content4", "longtext", "", "", "", "not null");
|
|
|
|
}
|
|
|
|
|
2006-02-03 08:11:36 +00:00
|
|
|
if ($oldversion < 2006011901) {
|
2006-02-06 05:02:38 +00:00
|
|
|
table_column("data", "", "approval", "tinyint", "4");
|
|
|
|
table_column("data_records", "", "approved", "tinyint", "4");
|
2006-02-03 08:11:36 +00:00
|
|
|
}
|
|
|
|
|
2006-02-08 04:35:23 +00:00
|
|
|
if ($oldversion < 2006020801) {
|
|
|
|
table_column("data", "", "scale", "integer", "10", "signed");
|
|
|
|
table_column("data", "", "assessed", "integer", "10");
|
|
|
|
table_column("data", "", "assesspublic", "integer", "4");
|
|
|
|
}
|
2006-02-27 02:06:35 +00:00
|
|
|
|
|
|
|
if ($oldversion < 2006022700) {
|
|
|
|
table_column("data_comments", "", "created", "integer", "10");
|
|
|
|
table_column("data_comments", "", "modified", "integer", "10");
|
|
|
|
}
|
|
|
|
|
2006-03-07 08:11:19 +00:00
|
|
|
if ($oldversion < 2006030700) {
|
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name')");
|
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name')");
|
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name')");
|
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name')");
|
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name')");
|
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name')");
|
2006-03-07 08:47:26 +00:00
|
|
|
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates def', 'data', 'name')");
|
2006-03-07 08:11:19 +00:00
|
|
|
}
|
|
|
|
|
NEW MODULE FROM MOODLE.COM - DATABASE !
Finally, we have an early version good enough for everyone to
start banging on to help us polish it up and find bugs.
Please take a look and file bugs in the bug tracker under "Database module".
We urgently need
- new icons for existing field types
- testing on PostgreSQL install
Coming soon (?):
- Many more field types: calculation, checkbox, relation, date, datetime,
time, email, group, list, user, number, richtext
(Please let us know if you are interested in developing any of these)
- A way to save and restore "presets", which are field/template sets
- Backup/Restore support
- Groups Support
- RSS support
Many thanks to Yu for all the hard work under my whip.
2005-12-02 07:50:26 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|