Add Snapshots and Snapshot_Events Tables. Add HomeView to Users.
parent
786adc5511
commit
620806a1bf
|
@ -677,6 +677,7 @@ CREATE TABLE `Users` (
|
||||||
`MonitorIds` text,
|
`MonitorIds` text,
|
||||||
`TokenMinExpiry` BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
`TokenMinExpiry` BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`APIEnabled` tinyint(3) UNSIGNED NOT NULL default 1,
|
`APIEnabled` tinyint(3) UNSIGNED NOT NULL default 1,
|
||||||
|
`HomeView` varchar(64) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY (`Id`),
|
PRIMARY KEY (`Id`),
|
||||||
UNIQUE KEY `UC_Username` (`Username`)
|
UNIQUE KEY `UC_Username` (`Username`)
|
||||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||||
|
@ -1046,6 +1047,26 @@ CREATE TABLE Sessions (
|
||||||
PRIMARY KEY(id)
|
PRIMARY KEY(id)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
CREATE TABLE Snapshots (
|
||||||
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`Name` VARCHAR(64),
|
||||||
|
`Description` TEXT,
|
||||||
|
`CreatedBy` int(10),
|
||||||
|
`CreatedOn` datetime default NULL,
|
||||||
|
PRIMARY KEY(Id)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
CREATE TABLE Snapshot_Events (
|
||||||
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`SnapshotId` int(10) unsigned NOT NULL,
|
||||||
|
FOREIGN KEY (`SnapshotId`) REFERENCES `Snapshots` (`Id`) ON DELETE CASCADE,
|
||||||
|
`EventId` bigint unsigned NOT NULL,
|
||||||
|
FOREIGN KEY (`EventId`) REFERENCES `Events` (`Id`) ON DELETE CASCADE,
|
||||||
|
KEY `Snapshot_Events_SnapshotId_idx` (`SnapshotId`),
|
||||||
|
PRIMARY KEY(Id)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
|
||||||
-- We generally don't alter triggers, we drop and re-create them, so let's keep them in a separate file that we can just source in update scripts.
|
-- We generally don't alter triggers, we drop and re-create them, so let's keep them in a separate file that we can just source in update scripts.
|
||||||
source @PKGDATADIR@/db/triggers.sql
|
source @PKGDATADIR@/db/triggers.sql
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue