update sql schemas to include update column in pconfig table

This commit is contained in:
Mario Vavti 2018-11-19 10:42:18 +01:00
parent f15e32d063
commit ae97649948
2 changed files with 5 additions and 5 deletions

View File

@ -910,7 +910,6 @@ CREATE TABLE IF NOT EXISTS `outq` (
KEY `outq_priority` (`outq_priority`) KEY `outq_priority` (`outq_priority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS pchan ( CREATE TABLE IF NOT EXISTS pchan (
`pchan_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `pchan_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`pchan_guid` char(191) NOT NULL DEFAULT '', `pchan_guid` char(191) NOT NULL DEFAULT '',
@ -922,15 +921,16 @@ CREATE TABLE IF NOT EXISTS pchan (
KEY `pchan_hash` (`pchan_hash`) KEY `pchan_hash` (`pchan_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `pconfig` ( CREATE TABLE IF NOT EXISTS `pconfig` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT 0 , `uid` int(11) NOT NULL DEFAULT 0 ,
`cat` char(191) NOT NULL DEFAULT '', `cat` char(191) NOT NULL DEFAULT '',
`k` char(191) NOT NULL DEFAULT '', `k` char(191) NOT NULL DEFAULT '',
`v` mediumtext NOT NULL, `v` mediumtext NOT NULL,
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `access` (`uid`,`cat`,`k`) UNIQUE KEY `access` (`uid`,`cat`,`k`),
KEY `pconfig_updated` (`updated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `photo` ( CREATE TABLE IF NOT EXISTS `photo` (

View File

@ -891,7 +891,6 @@ create index "outq_async" on outq ("outq_async");
create index "outq_delivered" on outq ("outq_delivered"); create index "outq_delivered" on outq ("outq_delivered");
create index "outq_priority" on outq ("outq_priority"); create index "outq_priority" on outq ("outq_priority");
CREATE TABLE "pchan" ( CREATE TABLE "pchan" (
"pchan_id" serial NOT NULL, "pchan_id" serial NOT NULL,
"pchan_guid" text NOT NULL, "pchan_guid" text NOT NULL,
@ -900,7 +899,6 @@ CREATE TABLE "pchan" (
"pchan_prvkey" text NOT NULL, "pchan_prvkey" text NOT NULL,
PRIMARY KEY ("pchan_id") PRIMARY KEY ("pchan_id")
); );
create index "pchan_guid" on pchan ("pchan_guid"); create index "pchan_guid" on pchan ("pchan_guid");
create index "pchan_hash" on pchan ("pchan_hash"); create index "pchan_hash" on pchan ("pchan_hash");
@ -910,9 +908,11 @@ CREATE TABLE "pconfig" (
"cat" text NOT NULL, "cat" text NOT NULL,
"k" text NOT NULL, "k" text NOT NULL,
"v" text NOT NULL, "v" text NOT NULL,
"updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY ("id"), PRIMARY KEY ("id"),
UNIQUE ("uid","cat","k") UNIQUE ("uid","cat","k")
); );
create index "pconfig_updated_idx" on pconfig ("updated");
CREATE TABLE "photo" ( CREATE TABLE "photo" (
"id" serial NOT NULL, "id" serial NOT NULL,