diff --git a/util/db-mysql.sql b/util/db-mysql.sql index 08d8b48..69860c2 100644 --- a/util/db-mysql.sql +++ b/util/db-mysql.sql @@ -103,9 +103,10 @@ drop table if exists `tag`; create table if not exists `tag` ( - `id` bigint not null unique, + `id` bigint not null, `uid` int not null, - `tag` char(255) default null + `tag` char(255) default null, + unique(`id`, `uid`) ) ENGINE=InnoDB; @@ -246,10 +247,12 @@ ) Engine=InnoDB; -create table if not exists `notes` ( +create table if not exists `note` ( `id` bigint unsigned not null, + `uid` int not null, `note` text default null, - key `notes_idx` (`id`) + unique(`id`, `uid`), + key (`id`) ) ENGINE=InnoDB; diff --git a/util/db-upgrade-0.20-vs-0.21.sql b/util/db-upgrade-0.20-vs-0.21.sql index 6b20f6f..5e94907 100644 --- a/util/db-upgrade-0.20-vs-0.21.sql +++ b/util/db-upgrade-0.20-vs-0.21.sql @@ -7,9 +7,12 @@ primary key (`id`) ) Engine=InnoDB; -create table if not exists `notes` ( + +create table if not exists `note` ( `id` bigint unsigned not null, + `uid` int not null, `note` text default null, - key `notes_idx` (`id`) + unique(`id`, `uid`), + key (`id`) ) ENGINE=InnoDB; diff --git a/webui/config.php b/webui/config.php index e9967a1..b0aae16 100644 --- a/webui/config.php +++ b/webui/config.php @@ -23,6 +23,7 @@ define('ICON_GREEN_OK', '/view/theme/default/images/green_ok.png'); define('ICON_RED_X', '/view/theme/default/images/red_x.png'); define('ICON_DOWNLOAD', '/view/theme/default/images/download_icon.jpg'); +define('ICON_NOTES', '/view/theme/default/images/notes.png'); define('MAX_CGI_FROM_SUBJ_LEN', 45); define('PAGE_LEN', 20); @@ -89,6 +90,7 @@ define('TABLE_SEARCH', 'search'); define('TABLE_EMAIL_LIST', 'email_groups'); define('TABLE_TAG', 'tag'); +define('TABLE_NOTE', '`note`'); define('TABLE_USER_SETTINGS', 'user_settings'); define('TABLE_REMOTE', 'remote'); define('TABLE_DOMAIN', 'domain'); @@ -104,6 +106,7 @@ define('SPHINX_HOSTNAME', '127.0.0.1:9306'); define('SPHINX_MAIN_INDEX', 'main1'); define('SPHINX_TAG_INDEX', 'tag1'); +define('SPHINX_NOTE_INDEX', 'note1'); define('LDAP_IMPORT_CONFIG_FILE', '/usr/local/etc/ldap-import.cfg');