2012-08-23 10:23:58 +02:00
|
|
|
alter table `sph_index` add column `folder` int default 0;
|
|
|
|
|
2012-09-07 15:08:50 +02:00
|
|
|
drop table if exists `tag`;
|
|
|
|
create table if not exists `tag` (
|
|
|
|
`_id` bigint unsigned auto_increment not null,
|
|
|
|
`id` bigint not null,
|
|
|
|
`uid` int not null,
|
|
|
|
`tag` char(255) default null,
|
|
|
|
unique(`id`, `uid`),
|
|
|
|
key (`_id`)
|
|
|
|
) ENGINE=InnoDB;
|
|
|
|
|
2012-08-23 10:23:58 +02:00
|
|
|
create table if not exists `folder` (
|
|
|
|
`id` int not null auto_increment,
|
|
|
|
`parent_id` int default 0,
|
|
|
|
`name` char(64) not null unique,
|
|
|
|
primary key (`id`)
|
|
|
|
) Engine=InnoDB;
|
|
|
|
|
2012-09-02 23:21:41 +02:00
|
|
|
|
2012-09-07 15:08:50 +02:00
|
|
|
create table if not exists `folder_user` (
|
|
|
|
`id` bigint unsigned not null,
|
|
|
|
`uid` int unsigned not null,
|
|
|
|
key `folder_user_idx` (`id`),
|
|
|
|
key `folder_user_idx2` (`uid`)
|
|
|
|
) ENGINE=InnoDB;
|
|
|
|
|
2012-09-16 16:47:28 +02:00
|
|
|
create table if not exists `folder_extra` (
|
|
|
|
`id` int unsigned not null auto_increment,
|
|
|
|
`uid` int unsigned not null,
|
|
|
|
`name` char(64) not null,
|
2012-09-17 16:49:27 +02:00
|
|
|
unique(uid, name),
|
|
|
|
key (`id`)
|
2012-09-16 16:47:28 +02:00
|
|
|
) ENGINE=InnoDB;
|
|
|
|
|
|
|
|
create table if not exists `folder_message` (
|
|
|
|
folder_id bigint not null,
|
|
|
|
id bigint not null,
|
|
|
|
unique(folder_id, id)
|
|
|
|
) ENGINE=InnoDB;
|
2012-09-07 15:08:50 +02:00
|
|
|
|
2012-09-02 23:21:41 +02:00
|
|
|
create table if not exists `note` (
|
2012-09-07 15:08:50 +02:00
|
|
|
`_id` bigint unsigned auto_increment not null,
|
2012-08-28 22:00:45 +02:00
|
|
|
`id` bigint unsigned not null,
|
2012-09-02 23:21:41 +02:00
|
|
|
`uid` int not null,
|
2012-08-28 22:00:45 +02:00
|
|
|
`note` text default null,
|
2012-09-02 23:21:41 +02:00
|
|
|
unique(`id`, `uid`),
|
2012-09-07 15:08:50 +02:00
|
|
|
key (`_id`)
|
2012-08-28 22:00:45 +02:00
|
|
|
) ENGINE=InnoDB;
|
2012-08-23 10:23:58 +02:00
|
|
|
|
2012-09-07 15:08:50 +02:00
|
|
|
|