added a note feature to index

This commit is contained in:
SJ 2012-09-02 23:21:41 +02:00
parent a67d799382
commit 2bee3f317b
3 changed files with 15 additions and 6 deletions

View File

@ -103,9 +103,10 @@ create view `v_attachment` AS select `id` as `i`, `piler_id`, `attachment_id`, `
drop table if exists `tag`; drop table if exists `tag`;
create table if not exists `tag` ( create table if not exists `tag` (
`id` bigint not null unique, `id` bigint not null,
`uid` int not null, `uid` int not null,
`tag` char(255) default null `tag` char(255) default null,
unique(`id`, `uid`)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
@ -246,10 +247,12 @@ create table if not exists `folder` (
) Engine=InnoDB; ) Engine=InnoDB;
create table if not exists `notes` ( create table if not exists `note` (
`id` bigint unsigned not null, `id` bigint unsigned not null,
`uid` int not null,
`note` text default null, `note` text default null,
key `notes_idx` (`id`) unique(`id`, `uid`),
key (`id`)
) ENGINE=InnoDB; ) ENGINE=InnoDB;

View File

@ -7,9 +7,12 @@ create table if not exists `folder` (
primary key (`id`) primary key (`id`)
) Engine=InnoDB; ) Engine=InnoDB;
create table if not exists `notes` (
create table if not exists `note` (
`id` bigint unsigned not null, `id` bigint unsigned not null,
`uid` int not null,
`note` text default null, `note` text default null,
key `notes_idx` (`id`) unique(`id`, `uid`),
key (`id`)
) ENGINE=InnoDB; ) ENGINE=InnoDB;

View File

@ -23,6 +23,7 @@ define('ICON_TAG', '/view/theme/default/images/tag_blue.png');
define('ICON_GREEN_OK', '/view/theme/default/images/green_ok.png'); define('ICON_GREEN_OK', '/view/theme/default/images/green_ok.png');
define('ICON_RED_X', '/view/theme/default/images/red_x.png'); define('ICON_RED_X', '/view/theme/default/images/red_x.png');
define('ICON_DOWNLOAD', '/view/theme/default/images/download_icon.jpg'); 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('MAX_CGI_FROM_SUBJ_LEN', 45);
define('PAGE_LEN', 20); define('PAGE_LEN', 20);
@ -89,6 +90,7 @@ define('TABLE_ATTACHMENT', 'attachment');
define('TABLE_SEARCH', 'search'); define('TABLE_SEARCH', 'search');
define('TABLE_EMAIL_LIST', 'email_groups'); define('TABLE_EMAIL_LIST', 'email_groups');
define('TABLE_TAG', 'tag'); define('TABLE_TAG', 'tag');
define('TABLE_NOTE', '`note`');
define('TABLE_USER_SETTINGS', 'user_settings'); define('TABLE_USER_SETTINGS', 'user_settings');
define('TABLE_REMOTE', 'remote'); define('TABLE_REMOTE', 'remote');
define('TABLE_DOMAIN', 'domain'); define('TABLE_DOMAIN', 'domain');
@ -104,6 +106,7 @@ define('SPHINX_DATABASE', 'sphinx');
define('SPHINX_HOSTNAME', '127.0.0.1:9306'); define('SPHINX_HOSTNAME', '127.0.0.1:9306');
define('SPHINX_MAIN_INDEX', 'main1'); define('SPHINX_MAIN_INDEX', 'main1');
define('SPHINX_TAG_INDEX', 'tag1'); define('SPHINX_TAG_INDEX', 'tag1');
define('SPHINX_NOTE_INDEX', 'note1');
define('LDAP_IMPORT_CONFIG_FILE', '/usr/local/etc/ldap-import.cfg'); define('LDAP_IMPORT_CONFIG_FILE', '/usr/local/etc/ldap-import.cfg');