Permalink
Browse files

Added 2 new fields:

1. editany - flag to allow any user to edit any entry
2. defaultsort - set the default sort field for list view
  • Loading branch information...
ikawhero
ikawhero committed Mar 27, 2006
1 parent b395a1e commit bc1ab282260979587336ddb90a74c96a58f6ed66
Showing with 17 additions and 3 deletions.
  1. +5 −0 mod/data/db/mysql.php
  2. +3 −1 mod/data/db/mysql.sql
  3. +5 −0 mod/data/db/postgres7.php
  4. +4 −2 mod/data/db/postgres7.sql
View
@@ -39,6 +39,11 @@ function data_upgrade($oldversion) {
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates def', 'data', 'name')");
}
if ($oldversion < 2006032700) {
table_column("data", "", "defaultsort", "integer", "10");
table_column("data", "", "editany", "tinyint", "4");
}
return true;
}
View
@@ -36,6 +36,8 @@ CREATE TABLE prefix_data (
scale int(10) NOT NULL default '0',
assessed int(10) unsigned NOT NULL default '0',
assesspublic int(4) unsigned NOT NULL default '0',
defaultsort int(10) unsigned NOT NULL default '0',
editany tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM COMMENT='Defines settings for each Database activity';
@@ -112,4 +114,4 @@ 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 def', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'templates def', 'data', 'name');
@@ -40,6 +40,11 @@ function data_upgrade($oldversion) {
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name')");
}
if ($oldversion < 2006032700) {
table_column("data", "", "defaultsort", "integer", "10");
table_column("data", "", "editany", "tinyint", "4");
}
return true;
}
@@ -21,7 +21,9 @@ CREATE TABLE prefix_data (
approval int NOT NULL default '0',
scale integer NOT NULL default '0',
assessed integer NOT NULL default '0',
assesspublic integer NOT NULL default '0'
assesspublic integer NOT NULL default '0',
defaultsort integer NOT NULL default '0',
editany integer NOT NULL default '0'
);
@@ -92,4 +94,4 @@ 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 def', 'data', 'name');
INSERT INTO prefix_log_display VALUES ('data', 'templates def', 'data', 'name');

0 comments on commit bc1ab28

Please sign in to comment.