Updated logging support. Added version upgrade.

This commit is contained in:
vyshane 2006-03-07 08:11:19 +00:00
parent 0a09100ff7
commit 6977f32079
4 changed files with 37 additions and 2 deletions

View File

@ -29,6 +29,16 @@ function data_upgrade($oldversion) {
table_column("data_comments", "", "modified", "integer", "10");
}
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')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name')");
}
return true;
}

View File

@ -106,3 +106,10 @@ CREATE TABLE prefix_data_ratings (
INSERT INTO prefix_log_display VALUES ('data', 'view', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name');

View File

@ -28,7 +28,18 @@ function data_upgrade($oldversion) {
table_column("data_comments", "", "created", "integer");
table_column("data_comments", "", "modified", "integer");
}
if ($oldversion < 2006030700) {
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'view', 'data', 'name');");
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')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name')");
}
return true;
}

View File

@ -85,4 +85,11 @@ CREATE TABLE prefix_data_ratings (
rating int4 NOT NULL default '0'
);
INSERT INTO prefix_log_display VALUES ('data', 'view', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name');