Introduce table to store client settings per collective

This commit is contained in:
eikek
2021-12-23 22:46:13 +01:00
parent 456f39704e
commit 706cfaeb05
7 changed files with 172 additions and 26 deletions

View File

@ -0,0 +1,12 @@
ALTER TABLE "client_settings" RENAME TO "client_settings_user";
CREATE TABLE "client_settings_collective" (
"id" varchar(254) not null primary key,
"client_id" varchar(254) not null,
"cid" varchar(254) not null,
"settings_data" text not null,
"created" timestamp not null,
"updated" timestamp not null,
foreign key ("cid") references "collective"("cid") on delete cascade,
unique ("client_id", "cid")
);

View File

@ -0,0 +1,12 @@
RENAME TABLE `client_settings` TO `client_settings_user`;
CREATE TABLE `client_settings` (
`id` varchar(254) not null primary key,
`cid` varchar(254) not null,
`user_id` varchar(254) not null,
`settings_data` longtext not null,
`created` timestamp not null,
`updated` timestamp not null,
foreign key (`cid`) references `collective`(`cid`) on delete cascade,
unique (`client_id`, `cid`)
);

View File

@ -0,0 +1,12 @@
ALTER TABLE "client_settings" RENAME TO "client_settings_user";
CREATE TABLE "client_settings_collective" (
"id" varchar(254) not null primary key,
"client_id" varchar(254) not null,
"cid" varchar(254) not null,
"settings_data" text not null,
"created" timestamp not null,
"updated" timestamp not null,
foreign key ("cid") references "collective"("cid") on delete cascade,
unique ("client_id", "cid")
);