Link shares to the user, not the collective

The user is required when searching because of folders (sadly), so the
share is connected to the user.
This commit is contained in:
eikek
2021-10-23 23:29:36 +02:00
parent 9009ebcb39
commit 2ac0b84e52
17 changed files with 268 additions and 110 deletions

View File

@ -1,6 +1,6 @@
CREATE TABLE "item_share" (
"id" varchar(254) not null primary key,
"cid" varchar(254) not null,
"user_id" varchar(254) not null,
"name" varchar(254),
"query" varchar(2000) not null,
"enabled" boolean not null,
@ -9,5 +9,5 @@ CREATE TABLE "item_share" (
"publish_until" timestamp not null,
"views" int not null,
"last_access" timestamp,
foreign key ("cid") references "collective"("cid") on delete cascade
foreign key ("user_id") references "user_"("uid") on delete cascade
)

View File

@ -1,6 +1,6 @@
CREATE TABLE `item_share` (
`id` varchar(254) not null primary key,
`cid` varchar(254) not null,
`user_id` varchar(254) not null,
`name` varchar(254),
`query` varchar(2000) not null,
`enabled` boolean not null,
@ -9,5 +9,5 @@ CREATE TABLE `item_share` (
`publish_until` timestamp not null,
`views` int not null,
`last_access` timestamp,
foreign key (`cid`) references `collective`(`cid`) on delete cascade
foreign key (`user_id`) references `user_`(`uid`) on delete cascade
)

View File

@ -1,6 +1,6 @@
CREATE TABLE "item_share" (
"id" varchar(254) not null primary key,
"cid" varchar(254) not null,
"user_id" varchar(254) not null,
"name" varchar(254),
"query" varchar(2000) not null,
"enabled" boolean not null,
@ -9,5 +9,5 @@ CREATE TABLE "item_share" (
"publish_until" timestamp not null,
"views" int not null,
"last_access" timestamp,
foreign key ("cid") references "collective"("cid") on delete cascade
foreign key ("user_id") references "user_"("uid") on delete cascade
)