mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 18:50:12 +01:00
sql schema fix
Change-Id: I48a2780f386b18a0a92eeddfe1586bdb2fd711ca Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
754a0ca632
commit
1d488ec4f0
@ -91,6 +91,7 @@ create table if not exists `attachment` (
|
|||||||
|
|
||||||
create index `attachment_idx` on `attachment`(`piler_id`);
|
create index `attachment_idx` on `attachment`(`piler_id`);
|
||||||
create index `attachment_idx2` on `attachment`(`sig`, `size`, `ptr`);
|
create index `attachment_idx2` on `attachment`(`sig`, `size`, `ptr`);
|
||||||
|
create index `attachment_idx3` on `attachment`(`ptr`);
|
||||||
|
|
||||||
drop view if exists `v_attachment`;
|
drop view if exists `v_attachment`;
|
||||||
create view `v_attachment` AS select `id` as `i`, `piler_id`, `attachment_id`, `ptr`, (select count(*) from `attachment` where `ptr`=`i`) as `refcount` from `attachment`;
|
create view `v_attachment` AS select `id` as `i`, `piler_id`, `attachment_id`, `ptr`, (select count(*) from `attachment` where `ptr`=`i`) as `refcount` from `attachment`;
|
||||||
|
@ -64,7 +64,6 @@ create view `v_messages` AS select `metadata`.`id` AS `id`,`metadata`.`piler_id`
|
|||||||
-- 2016.10.07
|
-- 2016.10.07
|
||||||
|
|
||||||
drop index `attachment_idx2` on `attachment`;
|
drop index `attachment_idx2` on `attachment`;
|
||||||
drop index `attachment_idx3` on `attachment`;
|
|
||||||
create index `attachment_idx2` on `attachment`(`sig`, `size`, `ptr`);
|
create index `attachment_idx2` on `attachment`(`sig`, `size`, `ptr`);
|
||||||
|
|
||||||
create table if not exists `private` (
|
create table if not exists `private` (
|
||||||
|
Loading…
Reference in New Issue
Block a user