-- https://www.phpmyadmin.net/
--
-- Tempo de geração: 17-Jan-2022 às 13:47
-- Versão do servidor: 5.7.36
-- versão do PHP: 7.3.33

START TRANSACTION;



--
-- Banco de dados: `mgatv524_uniq`
--

-- --------------------------------------------------------

--
-- Estrutura da tabela `action`
--

CREATE TABLE `action` (
  `actionId` int(11) NOT NULL,
  `ownerId` int(11) NOT NULL,
  `triggerType` varchar(50) DEFAULT NULL,
  `triggerCode` varchar(50) DEFAULT NULL,
  `actionType` varchar(50) DEFAULT NULL,
  `source` varchar(50) DEFAULT NULL,
  `sourceId` int(11) DEFAULT NULL,
  `target` varchar(50) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `widgetId` int(11) DEFAULT NULL,
  `layoutCode` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `auditlog`
--

CREATE TABLE `auditlog` (
  `logId` int(11) NOT NULL,
  `logDate` int(11) NOT NULL,
  `userId` int(11) NOT NULL,
  `message` varchar(255) NOT NULL,
  `entity` varchar(50) NOT NULL,
  `entityId` int(11) NOT NULL,
  `objectAfter` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `auditlog`
--

INSERT INTO `auditlog` (`logId`, `logDate`, `userId`, `message`, `entity`, `entityId`, `objectAfter`) VALUES
(1, 1642424444, 0, 'Added', 'Media', 1, '{\"mediaId\":1,\"name\":\"Logo\",\"mediaType\":\"image\",\"fileName\":\"xibo_logo_square.png\",\"folderId\":null}'),
(2, 1642424444, 0, 'Added', 'Media', 2, '{\"mediaId\":2,\"name\":\"Default Layout Background\",\"mediaType\":\"image\",\"fileName\":\"default layout3 background.jpg\",\"folderId\":null}'),
(3, 1642424444, 0, 'Added', 'Widget', 1, '{\"widgetId\":1,\"type\":\"image\",\"layoutId\":\"1\",\"campaignId\":\"1\"}'),
(4, 1642424444, 0, 'Saved', 'Playlist', 1, '{\"campaignId\":[\"1\"],\"layoutId\":[\"1\"]}'),
(5, 1642424444, 0, 'Added', 'Widget', 2, '{\"widgetId\":2,\"type\":\"text\",\"layoutId\":\"1\",\"campaignId\":\"1\"}'),
(6, 1642424444, 0, 'Saved', 'Playlist', 2, '{\"campaignId\":[\"1\"],\"layoutId\":[\"1\"]}'),
(7, 1642424444, 0, 'Added', 'Widget', 3, '{\"widgetId\":3,\"type\":\"spacer\",\"layoutId\":\"1\",\"campaignId\":\"1\"}'),
(8, 1642424444, 0, 'Added', 'Widget', 4, '{\"widgetId\":4,\"type\":\"text\",\"layoutId\":\"1\",\"campaignId\":\"1\"}'),
(9, 1642424444, 0, 'Saved', 'Playlist', 3, '{\"campaignId\":[\"1\"],\"layoutId\":[\"1\"]}'),
(10, 1642424444, 0, 'Added', 'Widget', 5, '{\"widgetId\":5,\"type\":\"clock\",\"layoutId\":\"1\",\"campaignId\":\"1\"}'),
(11, 1642424444, 0, 'Saved', 'Playlist', 4, '{\"campaignId\":[\"1\"],\"layoutId\":[\"1\"]}'),
(12, 1642424444, 0, 'Added', 'Media', 3, '{\"mediaId\":3,\"name\":\"jquery.min.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\",\"folderId\":null}'),
(13, 1642424444, 0, 'Added', 'Media', 4, '{\"mediaId\":4,\"name\":\"xibo-layout-scaler.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\",\"folderId\":null}'),
(14, 1642424444, 0, 'Added', 'Media', 5, '{\"mediaId\":5,\"name\":\"xibo-interactive-control.min.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\",\"folderId\":null}'),
(15, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(16, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(17, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(18, 1642424444, 0, 'Added', 'Media', 6, '{\"mediaId\":6,\"name\":\"moment.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\",\"folderId\":null}'),
(19, 1642424444, 0, 'Added', 'Media', 7, '{\"mediaId\":7,\"name\":\"xibo-text-render.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-text-render.js\",\"folderId\":null}'),
(20, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(21, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(22, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(23, 1642424444, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(24, 1642424444, 0, 'Added', 'Media', 8, '{\"mediaId\":8,\"name\":\"Chart.min.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/Chart.min.js\",\"folderId\":null}'),
(25, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(26, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(27, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(28, 1642424444, 0, 'Added', 'Media', 9, '{\"mediaId\":9,\"name\":\"jquery-cycle-2.1.6.min.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery-cycle-2.1.6.min.js\",\"folderId\":null}'),
(29, 1642424444, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(30, 1642424444, 0, 'Added', 'Media', 10, '{\"mediaId\":10,\"name\":\"flipclock.min.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/flipclock.min.js\",\"folderId\":null}'),
(31, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(32, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(33, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(34, 1642424444, 0, 'Added', 'Media', 11, '{\"mediaId\":11,\"name\":\"xibo-countdown-render.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-countdown-render.js\",\"folderId\":null}'),
(35, 1642424444, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(36, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(37, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(38, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(39, 1642424444, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(40, 1642424444, 0, 'Added', 'Media', 12, '{\"mediaId\":12,\"name\":\"jquery.marquee.min.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.marquee.min.js\",\"folderId\":null}'),
(41, 1642424444, 0, 'Updated', 'Media', 9, '{\"fileName\":\"jquery-cycle-2.1.6.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery-cycle-2.1.6.min.js\"}'),
(42, 1642424444, 0, 'Updated', 'Media', 7, '{\"fileName\":\"xibo-text-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-text-render.js\"}'),
(43, 1642424444, 0, 'Added', 'Media', 13, '{\"mediaId\":13,\"name\":\"xibo-image-render.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-image-render.js\",\"folderId\":null}'),
(44, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(45, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(46, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(47, 1642424444, 0, 'Updated', 'Media', 9, '{\"fileName\":\"jquery-cycle-2.1.6.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery-cycle-2.1.6.min.js\"}'),
(48, 1642424444, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(49, 1642424444, 0, 'Added', 'Media', 14, '{\"mediaId\":14,\"name\":\"xibo-dataset-render.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-dataset-render.js\",\"folderId\":null}'),
(50, 1642424444, 0, 'Updated', 'Media', 13, '{\"fileName\":\"xibo-image-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-image-render.js\"}'),
(51, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(52, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(53, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(54, 1642424444, 0, 'Updated', 'Media', 13, '{\"fileName\":\"xibo-image-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-image-render.js\"}'),
(55, 1642424444, 0, 'Added', 'Media', 15, '{\"mediaId\":15,\"name\":\"Aileron Heavy Regular\",\"mediaType\":\"font\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/fonts\\/Aileron-Heavy.otf\",\"folderId\":null}'),
(56, 1642424444, 0, 'Added', 'Media', 16, '{\"mediaId\":16,\"name\":\"Aileron Regular\",\"mediaType\":\"font\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/fonts\\/Aileron-Regular.otf\",\"folderId\":null}'),
(57, 1642424444, 0, 'Added', 'Media', 17, '{\"mediaId\":17,\"name\":\"Dancing Script Regular\",\"mediaType\":\"font\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/fonts\\/DancingScript-Regular.ttf\",\"folderId\":null}'),
(58, 1642424444, 0, 'Added', 'Media', 18, '{\"mediaId\":18,\"name\":\"Railway Regular\",\"mediaType\":\"font\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/fonts\\/Railway.ttf\",\"folderId\":null}'),
(59, 1642424444, 0, 'Added', 'Media', 19, '{\"mediaId\":19,\"name\":\"Linear Regular\",\"mediaType\":\"font\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/fonts\\/linear-by-braydon-fuller.otf\",\"folderId\":null}'),
(60, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(61, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(62, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(63, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(64, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(65, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(66, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(67, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(68, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(69, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(70, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(71, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(72, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(73, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(74, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(75, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(76, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(77, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(78, 1642424444, 0, 'Updated', 'Media', 7, '{\"fileName\":\"xibo-text-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-text-render.js\"}'),
(79, 1642424444, 0, 'Updated', 'Media', 12, '{\"fileName\":\"jquery.marquee.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.marquee.min.js\"}'),
(80, 1642424444, 0, 'Updated', 'Media', 9, '{\"fileName\":\"jquery-cycle-2.1.6.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery-cycle-2.1.6.min.js\"}'),
(81, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(82, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(83, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(84, 1642424444, 0, 'Added', 'Media', 20, '{\"mediaId\":20,\"name\":\"pdf.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/pdfjs\\/pdf.js\",\"folderId\":null}'),
(85, 1642424444, 0, 'Added', 'Media', 21, '{\"mediaId\":21,\"name\":\"pdf.worker.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/pdfjs\\/pdf.worker.js\",\"folderId\":null}'),
(86, 1642424444, 0, 'Added', 'Media', 22, '{\"mediaId\":22,\"name\":\"compatibility.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/pdfjs\\/compatibility.js\",\"folderId\":null}'),
(87, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(88, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(89, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(90, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(91, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(92, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(93, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(94, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(95, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(96, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(97, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(98, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(99, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(100, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(101, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(102, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(103, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(104, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(105, 1642424444, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(106, 1642424444, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(107, 1642424444, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(108, 1642424444, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(109, 1642424444, 0, 'Updated', 'Media', 12, '{\"fileName\":\"jquery.marquee.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.marquee.min.js\"}'),
(110, 1642424444, 0, 'Updated', 'Media', 9, '{\"fileName\":\"jquery-cycle-2.1.6.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery-cycle-2.1.6.min.js\"}'),
(111, 1642424444, 0, 'Updated', 'Media', 7, '{\"fileName\":\"xibo-text-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-text-render.js\"}'),
(112, 1642424444, 0, 'Updated', 'Media', 13, '{\"fileName\":\"xibo-image-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-image-render.js\"}'),
(113, 1642424445, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(114, 1642424445, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(115, 1642424445, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(116, 1642424445, 0, 'Updated', 'Media', 6, '{\"fileName\":\"moment.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/moment.js\"}'),
(117, 1642424445, 0, 'Updated', 'Media', 12, '{\"fileName\":\"jquery.marquee.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.marquee.min.js\"}'),
(118, 1642424445, 0, 'Updated', 'Media', 9, '{\"fileName\":\"jquery-cycle-2.1.6.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery-cycle-2.1.6.min.js\"}'),
(119, 1642424445, 0, 'Updated', 'Media', 7, '{\"fileName\":\"xibo-text-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-text-render.js\"}'),
(120, 1642424445, 0, 'Updated', 'Media', 13, '{\"fileName\":\"xibo-image-render.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-image-render.js\"}'),
(121, 1642424445, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(122, 1642424445, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(123, 1642424445, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(124, 1642424445, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(125, 1642424445, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(126, 1642424445, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(127, 1642424445, 0, 'Updated', 'Media', 3, '{\"fileName\":\"jquery.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/vendor\\/jquery.min.js\"}'),
(128, 1642424445, 0, 'Updated', 'Media', 4, '{\"fileName\":\"xibo-layout-scaler.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-layout-scaler.js\"}'),
(129, 1642424445, 0, 'Updated', 'Media', 5, '{\"fileName\":\"xibo-interactive-control.min.js > \\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-interactive-control.min.js\"}'),
(130, 1642424445, 0, 'Added', 'Media', 23, '{\"mediaId\":23,\"name\":\"xibo-webpage-render.js\",\"mediaType\":\"module\",\"fileName\":\"\\/home\\/mgatv524\\/public_html\\/uniq\\/modules\\/xibo-webpage-render.js\",\"folderId\":null}'),
(131, 1642424459, 1, 'Login Granted', 'User', 1, '{\"IPAddress\":\"187.183.231.134\",\"UserAgent\":[\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/97.0.4692.71 Safari\\/537.36\"]}'),
(132, 1642438000, 1, 'Login Granted', 'User', 1, '{\"IPAddress\":\"187.183.231.134\",\"UserAgent\":[\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/97.0.4692.71 Safari\\/537.36\"]}');

-- --------------------------------------------------------

--
-- Estrutura da tabela `bandwidth`
--

CREATE TABLE `bandwidth` (
  `displayId` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `month` int(11) NOT NULL,
  `size` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `bandwidthtype`
--

CREATE TABLE `bandwidthtype` (
  `bandwidthTypeId` int(11) NOT NULL,
  `name` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `bandwidthtype`
--

INSERT INTO `bandwidthtype` (`bandwidthTypeId`, `name`) VALUES
(1, 'Register'),
(2, 'Required Files'),
(3, 'Schedule'),
(4, 'Get File'),
(5, 'Get Resource'),
(6, 'Media Inventory'),
(7, 'Notify Status'),
(8, 'Submit Stats'),
(9, 'Submit Log'),
(10, 'Blacklist'),
(11, 'Screen Shot');

-- --------------------------------------------------------

--
-- Estrutura da tabela `blacklist`
--

CREATE TABLE `blacklist` (
  `blacklistId` int(11) NOT NULL,
  `mediaId` int(11) NOT NULL,
  `displayId` int(11) NOT NULL,
  `userId` int(11) DEFAULT NULL,
  `reportingDisplayId` int(11) DEFAULT NULL,
  `reason` text,
  `isIgnored` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `campaign`
--

CREATE TABLE `campaign` (
  `campaignId` int(11) NOT NULL,
  `campaign` varchar(254) NOT NULL,
  `isLayoutSpecific` tinyint(4) NOT NULL,
  `userId` int(11) NOT NULL,
  `folderId` int(11) NOT NULL DEFAULT '1',
  `permissionsFolderId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `campaign`
--

INSERT INTO `campaign` (`campaignId`, `campaign`, `isLayoutSpecific`, `userId`, `folderId`, `permissionsFolderId`) VALUES
(1, 'Default Layout', 1, 1, 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `command`
--

CREATE TABLE `command` (
  `commandId` int(11) NOT NULL,
  `command` varchar(254) NOT NULL,
  `code` varchar(50) NOT NULL,
  `description` varchar(1000) DEFAULT NULL,
  `userId` int(11) NOT NULL,
  `availableOn` varchar(50) DEFAULT NULL,
  `commandString` varchar(1000) DEFAULT NULL,
  `validationString` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `dataset`
--

CREATE TABLE `dataset` (
  `dataSetId` int(11) NOT NULL,
  `dataSet` varchar(50) NOT NULL,
  `description` varchar(254) DEFAULT NULL,
  `userId` int(11) NOT NULL,
  `lastDataEdit` int(11) NOT NULL DEFAULT '0',
  `code` varchar(50) DEFAULT NULL,
  `isLookup` tinyint(4) NOT NULL,
  `isRemote` tinyint(4) NOT NULL DEFAULT '0',
  `method` enum('GET','POST') DEFAULT NULL,
  `uri` varchar(250) DEFAULT NULL,
  `postData` text,
  `authentication` varchar(10) DEFAULT NULL,
  `username` varchar(250) DEFAULT NULL,
  `password` varchar(250) DEFAULT NULL,
  `customHeaders` text,
  `userAgent` text,
  `refreshRate` int(11) NOT NULL DEFAULT '86400',
  `clearRate` int(11) NOT NULL DEFAULT '0',
  `runsAfter` int(11) DEFAULT NULL,
  `dataRoot` varchar(250) DEFAULT NULL,
  `lastSync` int(11) NOT NULL DEFAULT '0',
  `summarize` varchar(10) DEFAULT NULL,
  `summarizeField` varchar(250) DEFAULT NULL,
  `lastClear` int(11) NOT NULL DEFAULT '0',
  `ignoreFirstRow` tinyint(4) DEFAULT NULL,
  `sourceId` tinyint(4) DEFAULT NULL,
  `rowLimit` int(11) DEFAULT NULL,
  `limitPolicy` varchar(50) DEFAULT NULL,
  `folderId` int(11) NOT NULL DEFAULT '1',
  `permissionsFolderId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `datasetcolumn`
--

CREATE TABLE `datasetcolumn` (
  `dataSetColumnId` int(11) NOT NULL,
  `dataSetId` int(11) NOT NULL,
  `heading` varchar(50) NOT NULL,
  `dataTypeId` int(11) NOT NULL,
  `dataSetColumnTypeId` int(11) NOT NULL,
  `listContent` varchar(1000) DEFAULT NULL,
  `columnOrder` smallint(6) NOT NULL,
  `formula` varchar(1000) DEFAULT NULL,
  `remoteField` varchar(250) DEFAULT NULL,
  `showFilter` tinyint(4) NOT NULL DEFAULT '1',
  `showSort` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `datasetcolumntype`
--

CREATE TABLE `datasetcolumntype` (
  `dataSetColumnTypeId` int(11) NOT NULL,
  `dataSetColumnType` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `datasetcolumntype`
--

INSERT INTO `datasetcolumntype` (`dataSetColumnTypeId`, `dataSetColumnType`) VALUES
(1, 'Value'),
(2, 'Formula'),
(3, 'Remote');

-- --------------------------------------------------------

--
-- Estrutura da tabela `datasetrss`
--

CREATE TABLE `datasetrss` (
  `id` int(11) NOT NULL,
  `dataSetId` int(11) NOT NULL,
  `psk` varchar(254) NOT NULL,
  `title` varchar(254) NOT NULL,
  `author` varchar(254) NOT NULL,
  `titleColumnId` int(11) DEFAULT NULL,
  `summaryColumnId` int(11) DEFAULT NULL,
  `contentColumnId` int(11) DEFAULT NULL,
  `publishedDateColumnId` int(11) DEFAULT NULL,
  `sort` text,
  `filter` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `datatype`
--

CREATE TABLE `datatype` (
  `dataTypeId` int(11) NOT NULL,
  `dataType` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `datatype`
--

INSERT INTO `datatype` (`dataTypeId`, `dataType`) VALUES
(1, 'String'),
(2, 'Number'),
(3, 'Date'),
(4, 'External Image'),
(5, 'Library Image'),
(6, 'HTML');

-- --------------------------------------------------------

--
-- Estrutura da tabela `daypart`
--

CREATE TABLE `daypart` (
  `dayPartId` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(50) DEFAULT NULL,
  `isRetired` tinyint(4) NOT NULL DEFAULT '0',
  `userId` int(11) NOT NULL,
  `startTime` varchar(8) NOT NULL DEFAULT '00:00:00',
  `endTime` varchar(8) NOT NULL DEFAULT '00:00:00',
  `exceptions` text,
  `isAlways` tinyint(4) NOT NULL DEFAULT '0',
  `isCustom` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `daypart`
--

INSERT INTO `daypart` (`dayPartId`, `name`, `description`, `isRetired`, `userId`, `startTime`, `endTime`, `exceptions`, `isAlways`, `isCustom`) VALUES
(1, 'Custom', 'User specifies the from/to date', 0, 1, '', '', '', 0, 1),
(2, 'Always', 'Event runs always', 0, 1, '', '', '', 1, 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `display`
--

CREATE TABLE `display` (
  `displayId` int(11) NOT NULL,
  `display` varchar(50) NOT NULL,
  `auditingUntil` int(11) NOT NULL DEFAULT '0',
  `defaultLayoutId` int(11) NOT NULL,
  `license` varchar(40) DEFAULT NULL,
  `licensed` tinyint(4) NOT NULL DEFAULT '0',
  `loggedIn` tinyint(4) NOT NULL DEFAULT '0',
  `lastaccessed` int(11) DEFAULT NULL,
  `inc_schedule` tinyint(4) NOT NULL DEFAULT '0',
  `email_alert` int(11) DEFAULT '0',
  `alert_timeout` int(11) DEFAULT '0',
  `clientAddress` varchar(50) DEFAULT NULL,
  `mediaInventoryStatus` tinyint(4) NOT NULL DEFAULT '0',
  `macAddress` varchar(254) DEFAULT NULL,
  `lastChanged` int(11) DEFAULT NULL,
  `numberOfMacAddressChanges` int(11) DEFAULT '0',
  `lastWakeOnLanCommandSent` int(11) DEFAULT NULL,
  `wakeOnLan` tinyint(4) NOT NULL DEFAULT '0',
  `wakeOnLanTime` varchar(5) DEFAULT NULL,
  `broadCastAddress` varchar(100) DEFAULT NULL,
  `secureOn` varchar(17) DEFAULT NULL,
  `cidr` varchar(6) DEFAULT NULL,
  `geoLocation` point DEFAULT NULL,
  `client_type` varchar(20) DEFAULT NULL,
  `client_version` varchar(15) DEFAULT NULL,
  `client_code` smallint(6) DEFAULT NULL,
  `displayProfileId` int(11) DEFAULT NULL,
  `screenShotRequested` tinyint(4) NOT NULL DEFAULT '0',
  `storageAvailableSpace` bigint(20) DEFAULT NULL,
  `storageTotalSpace` bigint(20) DEFAULT NULL,
  `xmrChannel` varchar(254) DEFAULT NULL,
  `xmrPubKey` text,
  `lastCommandSuccess` tinyint(4) NOT NULL DEFAULT '2',
  `deviceName` varchar(254) DEFAULT NULL,
  `timeZone` varchar(254) DEFAULT NULL,
  `overrideConfig` text,
  `newCmsAddress` varchar(1000) DEFAULT NULL,
  `newCmsKey` varchar(40) DEFAULT NULL,
  `orientation` varchar(10) DEFAULT NULL,
  `resolution` varchar(10) DEFAULT NULL,
  `commercialLicence` tinyint(4) DEFAULT NULL,
  `teamViewerSerial` varchar(255) DEFAULT NULL,
  `webkeySerial` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `displayevent`
--

CREATE TABLE `displayevent` (
  `displayEventId` int(11) NOT NULL,
  `eventDate` int(11) NOT NULL,
  `displayId` int(11) NOT NULL,
  `start` int(11) NOT NULL,
  `end` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `displaygroup`
--

CREATE TABLE `displaygroup` (
  `displayGroupId` int(11) NOT NULL,
  `displayGroup` varchar(50) NOT NULL,
  `description` varchar(254) DEFAULT NULL,
  `isDisplaySpecific` tinyint(4) NOT NULL DEFAULT '0',
  `isDynamic` tinyint(4) NOT NULL DEFAULT '0',
  `dynamicCriteria` varchar(254) DEFAULT NULL,
  `userId` int(11) NOT NULL,
  `dynamicCriteriaTags` varchar(254) DEFAULT NULL,
  `bandwidthLimit` int(11) NOT NULL DEFAULT '0',
  `createdDt` datetime DEFAULT NULL,
  `modifiedDt` datetime DEFAULT NULL,
  `folderId` int(11) NOT NULL DEFAULT '1',
  `permissionsFolderId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `displayprofile`
--

CREATE TABLE `displayprofile` (
  `displayProfileId` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `type` varchar(15) NOT NULL,
  `config` text,
  `isDefault` tinyint(4) NOT NULL DEFAULT '0',
  `userId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `displayprofile`
--

INSERT INTO `displayprofile` (`displayProfileId`, `name`, `type`, `config`, `isDefault`, `userId`) VALUES
(1, 'Windows', 'windows', '[]', 1, 1),
(2, 'Android', 'android', '[]', 1, 1),
(3, 'webOS', 'lg', '[]', 1, 1),
(4, 'Tizen', 'sssp', '[]', 1, 1),
(5, 'Linux', 'linux', '[]', 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `folder`
--

CREATE TABLE `folder` (
  `folderId` int(11) NOT NULL,
  `folderName` varchar(255) NOT NULL,
  `parentId` int(11) DEFAULT NULL,
  `isRoot` int(11) NOT NULL DEFAULT '0',
  `children` text,
  `permissionsFolderId` int(11) DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `folder`
--

INSERT INTO `folder` (`folderId`, `folderName`, `parentId`, `isRoot`, `children`, `permissionsFolderId`) VALUES
(1, '/', NULL, 1, NULL, NULL);

-- --------------------------------------------------------

--
-- Estrutura da tabela `group`
--

CREATE TABLE `group` (
  `groupId` int(11) NOT NULL,
  `group` varchar(50) NOT NULL,
  `isUserSpecific` tinyint(4) NOT NULL DEFAULT '0',
  `isEveryone` tinyint(4) NOT NULL DEFAULT '0',
  `libraryQuota` int(11) DEFAULT NULL,
  `isSystemNotification` tinyint(4) NOT NULL DEFAULT '0',
  `isDisplayNotification` tinyint(4) NOT NULL DEFAULT '0',
  `features` longtext,
  `description` varchar(500) DEFAULT NULL,
  `isShownForAddUser` tinyint(4) NOT NULL DEFAULT '0',
  `defaultHomepageId` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `group`
--

INSERT INTO `group` (`groupId`, `group`, `isUserSpecific`, `isEveryone`, `libraryQuota`, `isSystemNotification`, `isDisplayNotification`, `features`, `description`, `isShownForAddUser`, `defaultHomepageId`) VALUES
(1, 'Users', 0, 0, NULL, 0, 0, '[\"icondashboard.view\",\"icondashboard.add\",\"icondashboard.modify\",\"layout.view\",\"layout.add\",\"layout.modify\",\"library.view\",\"library.add\",\"library.modify\",\"mediamanager.view\",\"mediamanager.add\",\"mediamanager.modify\",\"playlist.view\",\"playlist.add\",\"playlist.modify\",\"preview.view\",\"preview.add\",\"preview.modify\",\"region.view\",\"region.add\",\"region.modify\",\"schedule.view\",\"schedule.add\",\"schedule.modify\",\"statusdashboard.view\",\"statusdashboard.add\",\"statusdashboard.modify\",\"users.view\",\"users.add\",\"users.modify\",\"schedule.now\",\"user.sharing\"]', NULL, 0, NULL),
(2, 'Everyone', 0, 1, NULL, 0, 0, NULL, NULL, 0, NULL),
(3, 'admin', 1, 0, 0, 1, 0, '[\"schedule.now\"]', NULL, 0, ''),
(4, 'System Notifications', 0, 0, NULL, 1, 0, '[\"schedule.now\"]', NULL, 0, NULL),
(5, 'Content Manager', 0, 0, NULL, 0, 0, '[\"folder.view\",\"folder.add\",\"folder.modify\",\"library.view\",\"library.add\",\"library.modify\",\"dataset.view\",\"dataset.add\",\"dataset.modify\",\"dataset.data\",\"playlist.view\",\"playlist.add\",\"playlist.modify\",\"layout.view\",\"layout.add\",\"layout.modify\",\"layout.export\",\"template.view\",\"template.add\",\"template.modify\",\"resolution.view\",\"resolution.add\",\"resolution.modify\",\"campaign.view\",\"campaign.add\",\"campaign.modify\",\"tag.view\",\"tag.tagging\",\"user.profile\"]', 'Management of all features related to Content Creation only.', 1, 'icondashboard.view'),
(6, 'Playlist Manager', 0, 0, NULL, 0, 0, '[\"user.profile\",\"dashboard.playlist\"]', 'Management of specific Playlists to edit / replace Media only.', 1, 'playlistdashboard.view'),
(7, 'Schedule Manager', 0, 0, NULL, 0, 0, '[\"folder.view\",\"schedule.view\",\"schedule.agenda\",\"schedule.add\",\"schedule.modify\",\"schedule.now\",\"daypart.view\",\"daypart.add\",\"daypart.modify\",\"user.profile\"]', 'Management of all features for the purpose of Event Scheduling only.', 1, 'icondashboard.view'),
(8, 'Display Manager', 0, 0, NULL, 0, 1, '[\"report.view\",\"displays.reporting\",\"proof-of-play\",\"folder.view\",\"folder.add\",\"folder.modify\",\"tag.tagging\",\"schedule.view\",\"schedule.agenda\",\"displays.view\",\"displays.add\",\"displays.modify\",\"displaygroup.view\",\"displaygroup.add\",\"displaygroup.modify\",\"displayprofile.view\",\"displayprofile.add\",\"displayprofile.modify\",\"playersoftware.view\",\"command.view\",\"user.profile\",\"notification.centre\",\"notification.add\",\"notification.modify\",\"dashboard.status\",\"log.view\"]', 'Management of all features for the purpose of Display Administration only.', 1, 'statusdashboard.view');

-- --------------------------------------------------------

--
-- Estrutura da tabela `help`
--

CREATE TABLE `help` (
  `helpId` int(11) NOT NULL,
  `topic` varchar(254) NOT NULL,
  `category` varchar(254) NOT NULL DEFAULT 'General',
  `link` varchar(254) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `help`
--

INSERT INTO `help` (`helpId`, `topic`, `category`, `link`) VALUES
(1, 'Layout', 'General', 'layouts.html'),
(2, 'Content', 'General', 'media.html'),
(4, 'Schedule', 'General', 'scheduling.html'),
(5, 'Group', 'General', 'users_groups.html'),
(6, 'Admin', 'General', 'cms_settings.html'),
(7, 'Report', 'General', 'troubleshooting.html'),
(8, 'Dashboard', 'General', 'tour.html'),
(9, 'User', 'General', 'users.html'),
(10, 'Display', 'General', 'displays.html'),
(11, 'DisplayGroup', 'General', 'displays_groups.html'),
(12, 'Layout', 'Add', 'layouts.html#Add_Layout'),
(13, 'Layout', 'Background', 'layouts_designer.html#Background'),
(14, 'Content', 'Assign', 'layouts_playlists.html#Assigning_Content'),
(15, 'Layout', 'RegionOptions', 'layouts_regions.html'),
(16, 'Content', 'AddtoLibrary', 'media_library.html'),
(17, 'Display', 'Edit', 'displays.html#Display_Edit'),
(18, 'Display', 'Delete', 'displays.html#Display_Delete'),
(19, 'Displays', 'Groups', 'displays_groups.html#Group_Members'),
(20, 'UserGroup', 'Add', 'users_groups.html#Adding_Group'),
(21, 'User', 'Add', 'users_administration.html#Add_User'),
(22, 'User', 'Delete', 'users_administration.html#Delete_User'),
(23, 'Content', 'Config', 'cms_settings.html#Content'),
(24, 'LayoutMedia', 'Permissions', 'users_permissions.html'),
(25, 'Region', 'Permissions', 'users_permissions.html'),
(26, 'Library', 'Assign', 'layouts_playlists.html#Add_From_Library'),
(27, 'Media', 'Delete', 'media_library.html#Delete'),
(28, 'DisplayGroup', 'Add', 'displays_groups.html#Add_Group'),
(29, 'DisplayGroup', 'Edit', 'displays_groups.html#Edit_Group'),
(30, 'DisplayGroup', 'Delete', 'displays_groups.html#Delete_Group'),
(31, 'DisplayGroup', 'Members', 'displays_groups.html#Group_Members'),
(32, 'DisplayGroup', 'Permissions', 'users_permissions.html'),
(34, 'Schedule', 'ScheduleNow', 'scheduling_now.html'),
(35, 'Layout', 'Delete', 'layouts.html#Delete_Layout'),
(36, 'Layout', 'Copy', 'layouts.html#Copy_Layout'),
(37, 'Schedule', 'Edit', 'scheduling_events.html#Edit'),
(38, 'Schedule', 'Add', 'scheduling_events.html#Add'),
(39, 'Layout', 'Permissions', 'users_permissions.html'),
(40, 'Display', 'MediaInventory', 'displays.html#Media_Inventory'),
(41, 'User', 'ChangePassword', 'users.html#Change_Password'),
(42, 'Schedule', 'Delete', 'scheduling_events.html'),
(43, 'Layout', 'Edit', 'layouts_designer.html#Edit_Layout'),
(44, 'Media', 'Permissions', 'users_permissions.html'),
(45, 'Display', 'DefaultLayout', 'displays.html#DefaultLayout'),
(46, 'UserGroup', 'Edit', 'users_groups.html#Edit_Group'),
(47, 'UserGroup', 'Members', 'users_groups.html#Group_Member'),
(48, 'User', 'PageSecurity', 'users_permissions.html#Page_Security'),
(49, 'User', 'MenuSecurity', 'users_permissions.html#Menu_Security'),
(50, 'UserGroup', 'Delete', 'users_groups.html#Delete_Group'),
(51, 'User', 'Edit', 'users_administration.html#Edit_User'),
(52, 'User', 'Applications', 'users_administration.html#Users_MyApplications'),
(53, 'User', 'SetHomepage', 'users_administration.html#Media_Dashboard'),
(54, 'DataSet', 'General', 'media_datasets.html'),
(55, 'DataSet', 'Add', 'media_datasets.html#Create_Dataset'),
(56, 'DataSet', 'Edit', 'media_datasets.html#Edit_Dataset'),
(57, 'DataSet', 'Delete', 'media_datasets.html#Delete_Dataset'),
(58, 'DataSet', 'AddColumn', 'media_datasets.html#Dataset_Column'),
(59, 'DataSet', 'EditColumn', 'media_datasets.html#Dataset_Column'),
(60, 'DataSet', 'DeleteColumn', 'media_datasets.html#Dataset_Column'),
(61, 'DataSet', 'Data', 'media_datasets.html#Dataset_Row'),
(62, 'DataSet', 'Permissions', 'users_permissions.html'),
(63, 'Fault', 'General', 'troubleshooting.html#Report_Fault'),
(65, 'Stats', 'General', 'displays_metrics.html'),
(66, 'Resolution', 'General', 'layouts_resolutions.html'),
(67, 'Template', 'General', 'layouts_templates.html'),
(68, 'Services', 'Register', '#Registered_Applications'),
(69, 'OAuth', 'General', 'api_oauth.html'),
(70, 'Services', 'Log', 'api_oauth.html#oAuthLog'),
(71, 'Module', 'Edit', 'media_modules.html'),
(72, 'Module', 'General', 'media_modules.html'),
(73, 'Campaign', 'General', 'layouts_campaigns.html'),
(74, 'License', 'General', 'licence_information.html'),
(75, 'DataSet', 'ViewColumns', 'media_datasets.html#Dataset_Column'),
(76, 'Campaign', 'Permissions', 'users_permissions.html'),
(77, 'Transition', 'Edit', 'layouts_transitions.html'),
(78, 'User', 'SetPassword', 'users_administration.html#Set_Password'),
(79, 'DataSet', 'ImportCSV', 'media_datasets.htmlmedia_datasets.html#Import_CSV'),
(80, 'DisplayGroup', 'FileAssociations', 'displays_fileassociations.html'),
(81, 'Statusdashboard', 'General', 'tour_status_dashboard.html'),
(82, 'Displayprofile', 'General', 'displays_settings.html'),
(83, 'DisplayProfile', 'Edit', 'displays_settings.html#edit'),
(84, 'DisplayProfile', 'Delete', 'displays_settings.html#delete');

-- --------------------------------------------------------

--
-- Estrutura da tabela `layout`
--

CREATE TABLE `layout` (
  `layoutId` int(11) NOT NULL,
  `layout` varchar(254) NOT NULL,
  `userId` int(11) NOT NULL,
  `createdDt` datetime DEFAULT NULL,
  `modifiedDt` datetime DEFAULT NULL,
  `description` varchar(254) DEFAULT NULL,
  `retired` tinyint(4) NOT NULL DEFAULT '0',
  `duration` int(11) NOT NULL,
  `backgroundImageId` int(11) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0',
  `width` decimal(10,0) NOT NULL,
  `height` decimal(10,0) NOT NULL,
  `backgroundColor` varchar(25) DEFAULT NULL,
  `backgroundzIndex` int(11) NOT NULL DEFAULT '1',
  `schemaVersion` tinyint(4) NOT NULL DEFAULT '2',
  `statusMessage` text,
  `parentId` int(11) DEFAULT NULL,
  `publishedStatusId` int(11) NOT NULL DEFAULT '1',
  `enableStat` int(11) DEFAULT NULL,
  `publishedDate` datetime DEFAULT NULL,
  `autoApplyTransitions` tinyint(4) NOT NULL DEFAULT '0',
  `code` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `layout`
--

INSERT INTO `layout` (`layoutId`, `layout`, `userId`, `createdDt`, `modifiedDt`, `description`, `retired`, `duration`, `backgroundImageId`, `status`, `width`, `height`, `backgroundColor`, `backgroundzIndex`, `schemaVersion`, `statusMessage`, `parentId`, `publishedStatusId`, `enableStat`, `publishedDate`, `autoApplyTransitions`, `code`) VALUES
(1, 'Default Layout', 1, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 'Default Layout assigned to Players to show in the event scheduled content cannot be shown.', 0, 0, 2, 3, 1920, 1080, '#03031a', 0, 3, NULL, NULL, 1, 0, NULL, 0, NULL);

-- --------------------------------------------------------

--
-- Estrutura da tabela `layouthistory`
--

CREATE TABLE `layouthistory` (
  `layoutHistoryId` int(11) NOT NULL,
  `campaignId` int(11) NOT NULL,
  `layoutId` int(11) NOT NULL,
  `publishedDate` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `layouthistory`
--

INSERT INTO `layouthistory` (`layoutHistoryId`, `campaignId`, `layoutId`, `publishedDate`) VALUES
(1, 1, 1, '2022-01-17 10:00:44');

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkcampaignlayout`
--

CREATE TABLE `lkcampaignlayout` (
  `lkCampaignLayoutId` int(11) NOT NULL,
  `campaignId` int(11) NOT NULL,
  `layoutId` int(11) NOT NULL,
  `displayOrder` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `lkcampaignlayout`
--

INSERT INTO `lkcampaignlayout` (`lkCampaignLayoutId`, `campaignId`, `layoutId`, `displayOrder`) VALUES
(1, 1, 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkcommanddisplayprofile`
--

CREATE TABLE `lkcommanddisplayprofile` (
  `commandId` int(11) NOT NULL,
  `displayProfileId` int(11) NOT NULL,
  `commandString` varchar(1000) NOT NULL,
  `validationString` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkdgdg`
--

CREATE TABLE `lkdgdg` (
  `parentId` int(11) NOT NULL,
  `childId` int(11) NOT NULL,
  `depth` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkdisplaydg`
--

CREATE TABLE `lkdisplaydg` (
  `LkDisplayDGID` int(11) NOT NULL,
  `displayGroupId` int(11) NOT NULL,
  `displayId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lklayoutdisplaygroup`
--

CREATE TABLE `lklayoutdisplaygroup` (
  `id` int(11) NOT NULL,
  `displayGroupId` int(11) NOT NULL,
  `layoutId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkmediadisplaygroup`
--

CREATE TABLE `lkmediadisplaygroup` (
  `id` int(11) NOT NULL,
  `displayGroupId` int(11) NOT NULL,
  `mediaId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lknotificationdg`
--

CREATE TABLE `lknotificationdg` (
  `lkNotificationDgId` int(11) NOT NULL,
  `notificationId` int(11) NOT NULL,
  `displayGroupId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lknotificationgroup`
--

CREATE TABLE `lknotificationgroup` (
  `lkNotificationGroupId` int(11) NOT NULL,
  `notificationId` int(11) NOT NULL,
  `groupId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lknotificationuser`
--

CREATE TABLE `lknotificationuser` (
  `lkNotificationUserId` int(11) NOT NULL,
  `notificationId` int(11) NOT NULL,
  `userId` int(11) NOT NULL,
  `read` tinyint(4) NOT NULL,
  `readDt` int(11) NOT NULL,
  `emailDt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkplaylistplaylist`
--

CREATE TABLE `lkplaylistplaylist` (
  `parentId` int(11) NOT NULL,
  `childId` int(11) NOT NULL,
  `depth` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `lkplaylistplaylist`
--

INSERT INTO `lkplaylistplaylist` (`parentId`, `childId`, `depth`) VALUES
(1, 1, 0),
(2, 2, 0),
(3, 3, 0),
(4, 4, 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkscheduledisplaygroup`
--

CREATE TABLE `lkscheduledisplaygroup` (
  `eventId` int(11) NOT NULL,
  `displayGroupId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lktagcampaign`
--

CREATE TABLE `lktagcampaign` (
  `lkTagCampaignId` int(11) NOT NULL,
  `tagId` int(11) NOT NULL,
  `campaignId` int(11) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lktagdisplaygroup`
--

CREATE TABLE `lktagdisplaygroup` (
  `lkTagDisplayGroupId` int(11) NOT NULL,
  `tagId` int(11) NOT NULL,
  `displayGroupId` int(11) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lktaglayout`
--

CREATE TABLE `lktaglayout` (
  `lkTagLayoutId` int(11) NOT NULL,
  `tagId` int(11) NOT NULL,
  `layoutId` int(11) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `lktaglayout`
--

INSERT INTO `lktaglayout` (`lkTagLayoutId`, `tagId`, `layoutId`, `value`) VALUES
(1, 4, 1, NULL);

-- --------------------------------------------------------

--
-- Estrutura da tabela `lktagmedia`
--

CREATE TABLE `lktagmedia` (
  `lkTagMediaId` int(11) NOT NULL,
  `tagId` int(11) NOT NULL,
  `mediaId` int(11) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `lktagmedia`
--

INSERT INTO `lktagmedia` (`lkTagMediaId`, `tagId`, `mediaId`, `value`) VALUES
(1, 4, 1, NULL),
(2, 4, 2, NULL);

-- --------------------------------------------------------

--
-- Estrutura da tabela `lktagplaylist`
--

CREATE TABLE `lktagplaylist` (
  `lkTagPlaylistId` int(11) NOT NULL,
  `tagId` int(11) NOT NULL,
  `playlistId` int(11) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkusergroup`
--

CREATE TABLE `lkusergroup` (
  `lkUserGroupID` int(11) NOT NULL,
  `groupId` int(11) NOT NULL,
  `userId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `lkusergroup`
--

INSERT INTO `lkusergroup` (`lkUserGroupID`, `groupId`, `userId`) VALUES
(1, 3, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkwidgetaudio`
--

CREATE TABLE `lkwidgetaudio` (
  `widgetId` int(11) NOT NULL,
  `mediaId` int(11) NOT NULL,
  `volume` tinyint(4) NOT NULL,
  `loop` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `lkwidgetmedia`
--

CREATE TABLE `lkwidgetmedia` (
  `widgetId` int(11) NOT NULL,
  `mediaId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `lkwidgetmedia`
--

INSERT INTO `lkwidgetmedia` (`widgetId`, `mediaId`) VALUES
(1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `log`
--

CREATE TABLE `log` (
  `logId` int(11) NOT NULL,
  `runNo` varchar(10) NOT NULL,
  `logDate` datetime DEFAULT NULL,
  `channel` varchar(20) NOT NULL,
  `type` varchar(254) NOT NULL,
  `page` varchar(50) NOT NULL,
  `function` varchar(50) DEFAULT NULL,
  `message` longtext NOT NULL,
  `userId` int(11) NOT NULL DEFAULT '0',
  `displayId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `log`
--

INSERT INTO `log` (`logId`, `runNo`, `logDate`, `channel`, `type`, `page`, `function`, `message`, `userId`, `displayId`) VALUES
(1, '27ddd2f', '2022-01-17 10:01:17', 'WEB', 'ERROR', '/uniq/web/user/pref', 'GET', 'User Option not found', 0, 0),
(2, 'e53ab06', '2022-01-17 13:46:50', 'WEB', 'ERROR', '/uniq/web/user/pref', 'GET', 'User Option not found', 0, 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `media`
--

CREATE TABLE `media` (
  `mediaId` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `type` varchar(15) NOT NULL,
  `duration` int(11) NOT NULL,
  `originalFileName` varchar(254) DEFAULT NULL,
  `storedAs` varchar(254) DEFAULT NULL,
  `md5` varchar(32) DEFAULT NULL,
  `fileSize` bigint(20) DEFAULT NULL,
  `userId` int(11) NOT NULL,
  `retired` tinyint(4) NOT NULL DEFAULT '0',
  `isEdited` tinyint(4) NOT NULL DEFAULT '0',
  `editedMediaId` int(11) DEFAULT NULL,
  `moduleSystemFile` tinyint(4) NOT NULL DEFAULT '0',
  `valid` tinyint(4) NOT NULL DEFAULT '1',
  `expires` int(11) DEFAULT NULL,
  `released` tinyint(4) NOT NULL DEFAULT '1',
  `apiRef` varchar(254) DEFAULT NULL,
  `createdDt` datetime DEFAULT NULL,
  `modifiedDt` datetime DEFAULT NULL,
  `enableStat` varchar(255) DEFAULT NULL,
  `folderId` int(11) NOT NULL DEFAULT '1',
  `permissionsFolderId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `media`
--

INSERT INTO `media` (`mediaId`, `name`, `type`, `duration`, `originalFileName`, `storedAs`, `md5`, `fileSize`, `userId`, `retired`, `isEdited`, `editedMediaId`, `moduleSystemFile`, `valid`, `expires`, `released`, `apiRef`, `createdDt`, `modifiedDt`, `enableStat`, `folderId`, `permissionsFolderId`) VALUES
(1, 'Logo', 'image', 10, 'xibo_logo_square.png', '1.png', '1b14e03ce0f249780372d8c833ee29f4', 19214, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 'Inherit', 1, 1),
(2, 'Default Layout Background', 'image', 10, 'default layout3 background.jpg', '2.jpg', '1723376616232e8d354f4362c9670fa0', 119781, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 'Inherit', 1, 1),
(3, 'jquery.min.js', 'module', 0, 'jquery.min.js', 'jquery.min.js', '12b69d0ae6c6f0c42942ae6da2896e84', 89475, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(4, 'xibo-layout-scaler.js', 'module', 0, 'xibo-layout-scaler.js', 'xibo-layout-scaler.js', '1bbb2f953d881eae7c8b878d2575e867', 5204, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(5, 'xibo-interactive-control.min.js', 'module', 0, 'xibo-interactive-control.min.js', 'xibo-interactive-control.min.js', 'd2e448d751d8180c0ed4f70d583227f8', 5270, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(6, 'moment.js', 'module', 0, 'moment.js', 'moment.js', '67bb26c11dba6c366834e65f5933aff2', 160251, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(7, 'xibo-text-render.js', 'module', 0, 'xibo-text-render.js', 'xibo-text-render.js', 'e18507777e250a7f1ef733462a4cda06', 13849, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(8, 'Chart.min.js', 'module', 0, 'Chart.min.js', 'Chart.min.js', 'f6c8efa65711e0cbbc99ba72997ecd0e', 159638, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(9, 'jquery-cycle-2.1.6.min.js', 'module', 0, 'jquery-cycle-2.1.6.min.js', 'jquery-cycle-2.1.6.min.js', '212480cf1292db459557814e2d7a571d', 28876, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(10, 'flipclock.min.js', 'module', 0, 'flipclock.min.js', 'flipclock.min.js', 'b9d7742384bdf912c51b6a1b5d674f7a', 21107, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(11, 'xibo-countdown-render.js', 'module', 0, 'xibo-countdown-render.js', 'xibo-countdown-render.js', '9b001984b29274f0c347330311345e3d', 5846, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(12, 'jquery.marquee.min.js', 'module', 0, 'jquery.marquee.min.js', 'jquery.marquee.min.js', '15f24e1fda583562dbfeabf2ee6a3d26', 11795, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(13, 'xibo-image-render.js', 'module', 0, 'xibo-image-render.js', 'xibo-image-render.js', '6152d3e99b2c61bb3db365d108337483', 2988, 1, 0, 0, 0, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:45', NULL, 1, 1),
(14, 'xibo-dataset-render.js', 'module', 0, 'xibo-dataset-render.js', 'xibo-dataset-render.js', 'e04ad2bff2a293cc7c7e162a9ef1a4c8', 1687, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(15, 'Aileron Heavy Regular', 'font', 0, 'Aileron-Heavy.otf', '15.otf', '621ba5aaf66e52f3def0cf69807104b9', 30060, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(16, 'Aileron Regular', 'font', 0, 'Aileron-Regular.otf', '16.otf', 'd321fa78bb7190a8ca7e14213ef63203', 27644, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(17, 'Dancing Script Regular', 'font', 0, 'DancingScript-Regular.ttf', '17.ttf', '86aadd0451f9e7dafa957e1e61dd2ed7', 116580, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(18, 'Railway Regular', 'font', 0, 'Railway.ttf', '18.ttf', '58963d3a57da7a70ac36d331416746c5', 45884, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(19, 'Linear Regular', 'font', 0, 'linear-by-braydon-fuller.otf', '19.otf', 'afb33470c582079834acd8b9f979ce1a', 19684, 1, 0, 0, NULL, 0, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(20, 'pdf.js', 'module', 0, 'pdf.js', 'pdf.js', 'dec9b89b936438760291e401c09f52aa', 333388, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(21, 'pdf.worker.js', 'module', 0, 'pdf.worker.js', 'pdf.worker.js', '926affd0ae3d3b69e6071b26875638c8', 1337459, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(22, 'compatibility.js', 'module', 0, 'compatibility.js', 'compatibility.js', '758c582a7fd2f30ec9dd8f91803a9882', 18126, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:44', '2022-01-17 10:00:44', NULL, 1, 1),
(23, 'xibo-webpage-render.js', 'module', 0, 'xibo-webpage-render.js', 'xibo-webpage-render.js', 'd59f5fc84ef7747f27baddc07fe81487', 4832, 1, 0, 0, NULL, 1, 1, 0, 1, NULL, '2022-01-17 10:00:45', '2022-01-17 10:00:45', NULL, 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `module`
--

CREATE TABLE `module` (
  `moduleId` int(11) NOT NULL,
  `module` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL,
  `enabled` tinyint(4) NOT NULL DEFAULT '0',
  `regionSpecific` tinyint(4) NOT NULL DEFAULT '1',
  `description` varchar(254) DEFAULT NULL,
  `schemaVersion` int(11) NOT NULL DEFAULT '1',
  `validExtensions` varchar(254) DEFAULT NULL,
  `previewEnabled` tinyint(4) NOT NULL DEFAULT '1',
  `assignable` tinyint(4) NOT NULL DEFAULT '1',
  `render_as` varchar(10) DEFAULT NULL,
  `settings` text,
  `viewPath` varchar(254) NOT NULL DEFAULT '../modules',
  `class` varchar(254) NOT NULL,
  `defaultDuration` int(11) NOT NULL,
  `installName` varchar(254) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `module`
--

INSERT INTO `module` (`moduleId`, `module`, `name`, `enabled`, `regionSpecific`, `description`, `schemaVersion`, `validExtensions`, `previewEnabled`, `assignable`, `render_as`, `settings`, `viewPath`, `class`, `defaultDuration`, `installName`) VALUES
(1, 'Image', 'Image', 1, 0, 'Upload Image files to assign to Layouts', 1, 'jpg,jpeg,png,bmp,gif', 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\Image', 10, NULL),
(2, 'Video', 'Video', 1, 0, 'Upload Video files to assign to Layouts', 1, 'wmv,avi,mpg,mpeg,webm,mp4,m4v', 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\Video', 0, NULL),
(4, 'PowerPoint', 'PowerPoint', 1, 0, 'Upload a PowerPoint file to assign to Layouts', 1, 'ppt,pps,pptx', 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\PowerPoint', 10, NULL),
(5, 'Webpage', 'Webpage', 1, 1, 'Embed a Webpage', 1, NULL, 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\WebPage', 60, NULL),
(6, 'Ticker', 'Ticker', 1, 1, 'Display dynamic feed content', 1, NULL, 1, 1, NULL, '[]', '../modules', 'Xibo\\Widget\\Ticker', 5, NULL),
(7, 'Text', 'Text', 1, 1, 'Add Text directly to a Layout', 1, NULL, 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\Text', 5, NULL),
(8, 'Embedded', 'Embedded', 1, 1, 'Embed HTML and JavaScript', 1, NULL, 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\Embedded', 60, NULL),
(11, 'datasetview', 'DataSet View', 1, 1, 'Organise and display DataSet data in a tabular format', 1, NULL, 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\DataSetView', 60, NULL),
(12, 'shellcommand', 'Shell Command', 1, 1, 'Instruct a Display to execute a command using the operating system shell', 1, NULL, 1, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\ShellCommand', 3, NULL),
(13, 'localvideo', 'Local Video', 1, 1, 'Display Video that only exists on the Display by providing a local file path or URL', 1, NULL, 0, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\LocalVideo', 60, NULL),
(14, 'genericfile', 'Generic File', 1, 0, 'A generic file to be stored in the library', 1, ',js,html,htm', 0, 0, NULL, NULL, '../modules', 'Xibo\\Widget\\GenericFile', 10, NULL),
(15, 'clock', 'Clock', 1, 1, 'Assign a type of Clock or a Countdown', 1, NULL, 1, 1, 'html', '[]', '../modules', 'Xibo\\Widget\\Clock', 5, NULL),
(16, 'font', 'Font', 1, 0, 'A font to use in other Modules', 1, 'ttf,otf,eot,svg,woff', 0, 0, NULL, NULL, '../modules', 'Xibo\\Widget\\Font', 10, NULL),
(17, 'audio', 'Audio', 1, 0, 'Upload Audio files to assign to Layouts', 1, 'mp3,wav', 0, 1, NULL, NULL, '../modules', 'Xibo\\Widget\\Audio', 0, NULL),
(18, 'pdf', 'PDF', 1, 0, 'Upload PDF files to assign to Layouts', 1, 'pdf', 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\Pdf', 60, NULL),
(19, 'notificationview', 'Notification', 1, 1, 'Display messages created in the Notification Drawer of the CMS', 1, NULL, 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\NotificationView', 10, NULL),
(20, 'subplaylist', 'Sub-Playlist', 1, 1, 'Embed a Sub-Playlist', 1, NULL, 1, 1, 'native', NULL, '../modules', 'Xibo\\Widget\\SubPlaylist', 10, NULL),
(21, 'datasetticker', 'DataSet Ticker', 1, 1, 'Ticker with a DataSet providing the items', 1, NULL, 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\DataSetTicker', 10, NULL),
(22, 'playersoftware', 'Player Software', 1, 0, 'A module for managing Player Versions', 1, 'apk,ipk,wgt', 0, 0, NULL, NULL, '../modules', 'Xibo\\Widget\\PlayerSoftware', 10, NULL),
(23, 'htmlpackage', 'HTML Package', 1, 0, 'Upload a complete package to distribute to Players', 1, 'htz', 0, 1, 'native', NULL, '../modules', 'Xibo\\Widget\\HtmlPackage', 60, NULL),
(24, 'videoin', 'Video In', 1, 1, 'Display input from an external source', 1, NULL, 0, 1, 'native', NULL, '../modules', 'Xibo\\Widget\\VideoIn', 60, NULL),
(25, 'hls', 'HLS', 1, 1, 'Display live streamed content', 1, NULL, 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\Hls', 60, NULL),
(26, 'calendar', 'Calendar', 1, 1, 'Display events from an iCAL feed', 1, NULL, 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\Calendar', 60, NULL),
(27, 'chart', 'Chart', 1, 1, 'Display information held in a DataSet as a type of Chart', 1, NULL, 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\Chart', 240, NULL),
(28, 'savedreport', 'Saved Reports', 1, 0, 'A saved report to be stored in the library', 1, 'json', 0, 0, NULL, NULL, '../modules', 'Xibo\\Widget\\SavedReport', 10, 'savedreport'),
(29, 'spacer', 'Spacer', 1, 1, 'Make a Region empty for a specified duration', 1, NULL, 0, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\Spacer', 60, 'spacer'),
(30, 'countdown', 'Countdown', 1, 1, 'Countdown Module', 1, NULL, 1, 1, 'html', NULL, '../modules', 'Xibo\\Widget\\Countdown', 60, 'countdown');

-- --------------------------------------------------------

--
-- Estrutura da tabela `notification`
--

CREATE TABLE `notification` (
  `notificationId` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `body` longtext NOT NULL,
  `createDt` int(11) NOT NULL,
  `releaseDt` int(11) NOT NULL,
  `isEmail` tinyint(4) NOT NULL,
  `isInterrupt` tinyint(4) NOT NULL,
  `isSystem` tinyint(4) NOT NULL,
  `userId` int(11) NOT NULL,
  `filename` varchar(1000) DEFAULT NULL,
  `nonusers` varchar(1000) DEFAULT NULL,
  `originalFileName` varchar(254) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `oauth_clients`
--

CREATE TABLE `oauth_clients` (
  `id` varchar(254) NOT NULL,
  `secret` varchar(254) NOT NULL,
  `name` varchar(254) NOT NULL,
  `userId` int(11) NOT NULL,
  `authCode` tinyint(4) NOT NULL,
  `clientCredentials` tinyint(4) NOT NULL,
  `isConfidential` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `oauth_client_redirect_uris`
--

CREATE TABLE `oauth_client_redirect_uris` (
  `id` int(11) NOT NULL,
  `client_id` varchar(254) NOT NULL,
  `redirect_uri` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `oauth_client_scopes`
--

CREATE TABLE `oauth_client_scopes` (
  `id` int(11) NOT NULL,
  `clientId` varchar(254) NOT NULL,
  `scopeId` varchar(254) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `oauth_scopes`
--

CREATE TABLE `oauth_scopes` (
  `id` varchar(254) NOT NULL,
  `description` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `oauth_scopes`
--

INSERT INTO `oauth_scopes` (`id`, `description`) VALUES
('all', 'All'),
('mcaas', 'Media Conversion as a Service');

-- --------------------------------------------------------

--
-- Estrutura da tabela `oauth_scope_routes`
--

CREATE TABLE `oauth_scope_routes` (
  `id` int(11) NOT NULL,
  `scopeId` varchar(254) NOT NULL,
  `route` varchar(1000) NOT NULL,
  `method` varchar(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `oauth_scope_routes`
--

INSERT INTO `oauth_scope_routes` (`id`, `scopeId`, `route`, `method`) VALUES
(1, 'mcaas', '/', 'GET'),
(2, 'mcaas', '/library/download/{id}[/{type}]', 'GET'),
(3, 'mcaas', '/library/mcaas/{id}', 'POST');

-- --------------------------------------------------------

--
-- Estrutura da tabela `permission`
--

CREATE TABLE `permission` (
  `permissionId` int(11) NOT NULL,
  `entityId` int(11) NOT NULL,
  `groupId` int(11) NOT NULL,
  `objectId` int(11) NOT NULL,
  `view` tinyint(4) NOT NULL,
  `edit` tinyint(4) NOT NULL,
  `delete` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `permission`
--

INSERT INTO `permission` (`permissionId`, `entityId`, `groupId`, `objectId`, `view`, `edit`, `delete`) VALUES
(12, 11, 2, 1, 1, 0, 0),
(13, 11, 2, 2, 1, 0, 0),
(18, 3, 2, 15, 1, 0, 0),
(19, 3, 2, 16, 1, 0, 0),
(20, 3, 2, 17, 1, 0, 0),
(21, 3, 2, 18, 1, 0, 0),
(22, 3, 2, 19, 1, 0, 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `permissionentity`
--

CREATE TABLE `permissionentity` (
  `entityId` int(11) NOT NULL,
  `entity` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `permissionentity`
--

INSERT INTO `permissionentity` (`entityId`, `entity`) VALUES
(4, 'Xibo\\Entity\\Campaign'),
(12, 'Xibo\\Entity\\Command'),
(9, 'Xibo\\Entity\\DataSet'),
(11, 'Xibo\\Entity\\DayPart'),
(2, 'Xibo\\Entity\\DisplayGroup'),
(13, 'Xibo\\Entity\\Folder'),
(3, 'Xibo\\Entity\\Media'),
(10, 'Xibo\\Entity\\Notification'),
(8, 'Xibo\\Entity\\Playlist'),
(7, 'Xibo\\Entity\\Region'),
(5, 'Xibo\\Entity\\Widget');

-- --------------------------------------------------------

--
-- Estrutura da tabela `phinxlog`
--

CREATE TABLE `phinxlog` (
  `version` bigint(20) NOT NULL,
  `migration_name` varchar(100) DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `phinxlog`
--

INSERT INTO `phinxlog` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES
(20180130073838, 'InstallMigration', '2022-01-17 12:59:58', '2022-01-17 12:59:59', 0),
(20180131113100, 'OldUpgradeStep85Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131113853, 'OldUpgradeStep86Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131113941, 'OldUpgradeStep87Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131113948, 'OldUpgradeStep88Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131113952, 'OldUpgradeStep92Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131113957, 'OldUpgradeStep120Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114002, 'OldUpgradeStep121Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114007, 'OldUpgradeStep122Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114013, 'OldUpgradeStep123Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114017, 'OldUpgradeStep124Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114021, 'OldUpgradeStep125Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114025, 'OldUpgradeStep126Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114030, 'OldUpgradeStep127Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114050, 'OldUpgradeStep128Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114058, 'OldUpgradeStep129Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114103, 'OldUpgradeStep130Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114107, 'OldUpgradeStep131Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114110, 'OldUpgradeStep132Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114114, 'OldUpgradeStep133Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114118, 'OldUpgradeStep134Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131114123, 'OldUpgradeStep135Migration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131122645, 'OneRegionPerPlaylistMigration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131123038, 'PlaylistTagsMigration', '2022-01-17 12:59:59', '2022-01-17 12:59:59', 0),
(20180131123248, 'WidgetFromToDtMigration', '2022-01-17 12:59:59', '2022-01-17 13:00:00', 0),
(20180212143336, 'DaypartSystemEntriesAsRecords', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180213173846, 'MailFromNameSettingMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180219141257, 'DisplayGroupClosureIndexToNonUnique', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180223180534, 'DataSetColumnFilterAndSortOptionsMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180302182421, 'WidgetCreatedAndModifiedDtMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180313085749, 'MediaTableEditedIdIndexMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180320154652, 'PlaylistAddDynamicFilterMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180327153325, 'RemoveUserLoggedInMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180514114415, 'FixCaseOnHelpTextFieldMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180515123835, 'LayoutPublishDraftMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180529065816, 'DataSetTruncateFixMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180529073531, 'DisplayAsVncLinkMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180621134013, 'AddWidgetSyncTaskMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180621134250, 'EventLayoutPermissionSettingMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180906115552, 'AddForeignKeysToTagsMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180906115606, 'AddForeignKeysToPermissionsMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180906115712, 'AddForeignKeysToWidgetMediaMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:00', 0),
(20180906131643, 'ForgottenPasswordReminderMigration', '2022-01-17 13:00:00', '2022-01-17 13:00:01', 0),
(20180906131716, 'DataSetRssMigration', '2022-01-17 13:00:01', '2022-01-17 13:00:01', 0),
(20181011160130, 'SimpleSettingsMigration', '2022-01-17 13:00:01', '2022-01-17 13:00:01', 0),
(20181113173310, 'RemoveFinanceModuleMigration', '2022-01-17 13:00:01', '2022-01-17 13:00:01', 0),
(20181113180337, 'SplitTickerModuleMigration', '2022-01-17 13:00:01', '2022-01-17 13:00:01', 0),
(20181126113231, 'Release1812Migration', '2022-01-17 13:00:01', '2022-01-17 13:00:01', 0),
(20181210092443, 'RemoveImageUriModuleMigration', '2022-01-17 13:00:02', '2022-01-17 13:00:02', 0),
(20181212114400, 'CreatePlayerVersionsTableMigration', '2022-01-17 13:00:02', '2022-01-17 13:00:02', 0),
(20181217135044, 'EventSyncMigration', '2022-01-17 13:00:02', '2022-01-17 13:00:03', 0),
(20190121092556, 'PlayerUpgradeAndOverrideConfigMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190125170130, 'PlayerSoftwareVersionFieldMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190129103831, 'AddLinuxDisplayProfileMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190212112534, 'AddProofOfPlayStatsDurationAndCountMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190212115432, 'AddDefaultTransitionDurationSettingMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190213160914, 'AddGlobalStatSettingMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190213162212, 'AddHorizontalMenuSettingMigration', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190214102508, 'AddLayoutEnableStat', '2022-01-17 13:00:03', '2022-01-17 13:00:03', 0),
(20190214102516, 'AddMediaEnableStat', '2022-01-17 13:00:03', '2022-01-17 13:00:04', 0),
(20190220165703, 'AddScheduleRecurrenceMonthlyRepeatsOnMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190227101705, 'MakeDisplayLicenseColumnUniqueMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190228120603, 'AddDynamicCriteriaTagsMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190301115046, 'AdjustGenericfileValidExtensionsMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190315134628, 'AddBandwidthLimitColumnToDisplaygroupMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190322162052, 'AddPublishedDateColumnMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190326163016, 'CreateLayoutHistoryTableMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190328111718, 'AddCampaignStatMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190401150256, 'AddScheduleNowPageMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190509101525, 'CreateReportScheduleTableMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190509102648, 'CreateSavedReportTableMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190509113001, 'AddReportPageMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:04', 0),
(20190510140126, 'TwoFactorAuthMigration', '2022-01-17 13:00:04', '2022-01-17 13:00:05', 0),
(20190514134430, 'NullableTextFieldsMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190515094133, 'AddHtmlDatatypeMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190515105624, 'InstallAdditionalStandardModulesMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190517080033, 'AddForeignKeysToLktagTablesMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190521092700, 'AddReportScheduleTaskMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190521092930, 'AddPreviousRunDateReportScheduleMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190521102635, 'PlaylistDurationUpdateAtTimestamp', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190603083836, 'ChangeStatTableStartEndColumnMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:05', 0),
(20190610150331, 'TagsWithValuesMigration', '2022-01-17 13:00:05', '2022-01-17 13:00:06', 0),
(20190611145607, 'RemoveOldVersionTableMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190612140955, 'DisplayTableDatabaseSchemaAdjustmentsMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190620112611, 'MoveTidyStatsToStatsArchiveTaskMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190620142655, 'AddPlaylistEnableStatMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190626091331, 'WidgetHistoryMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190626110359, 'CreateStatTableMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190628083649, 'AddStatsMigrationTaskMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190710213414, 'AddIsActiveReportScheduleMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190717101342, 'NullableCommandValidationStringMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190719074601, 'MissingDefaultValueMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190725115532, 'AddScheduleReminderTaskMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190801102042, 'DisplayProfileCommandLinkFixMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190801141737, 'DatasetAddCustomHeadersColumnMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190801142302, 'AddDoohUserTypeMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:06', 0),
(20190802145636, 'CreateScheduleReminderTableMigration', '2022-01-17 13:00:06', '2022-01-17 13:00:07', 0),
(20190806144729, 'AddShowContentFromMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190823081448, 'AddImageProcessingTaskMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190828123735, 'AddDefaultSettingResizeLimitResizeThresholdMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190903083314, 'AddGlobalSettingForCascadePermissionsMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190905084201, 'AddSettingForDefaultTransitionTypeMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190905084642, 'AddSettingForAutoLayoutPublishMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190910132520, 'DisplayMoveCmsMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190917093141, 'InterruptLayoutMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190918090608, 'AddDefaultSettingQuickChartMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190919154513, 'AddNotificationAttachmentFilenameNonUsersMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190926135518, 'AddSettingForTransitionAutoApplyToLayoutMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20190926140809, 'InstallSavedReportsAndSpacerModulesMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191001092651, 'AddNotificationOriginalFilenameMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191022101141, 'AddCommandEntityToPermissionEntityMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191024152519, 'AddScheduleExclusionsTableMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191122114104, 'FixDuplicateModuleFilesMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191126103120, 'GeoScheduleMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191126141140, 'RemoteDataSetCsvSourceMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20191205180116, 'AddPlaylistDashboardPageUserMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20200107082625, 'DisplayAddResolutionMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20200115115935, 'AddReportScheduleMessageMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20200122143630, 'AddReleasedRequiredFileMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20200122191232, 'AddCommercialLicenceColumnMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:07', 0),
(20200129104944, 'AddEngagementsStatsMigration', '2022-01-17 13:00:07', '2022-01-17 13:00:08', 0),
(20200130165443, 'CountdownModuleAddMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200311110512, 'AddIsDrawerColumnMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200311110535, 'CreateActionTableMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200319093235, 'ChangeInterruptLayoutMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200401121544, 'AddSystemUserSettingMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200407143200, 'AddCodeColumnToLayoutMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200422101006, 'AddDataSetRowLimitMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200427085958, 'AddReportScheduleStartEndMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200530103029, 'DisplayRemoteLinksMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200604103141, 'CommandImprovementsMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200612141755, 'OauthUpgradeMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:08', 0),
(20200720092246, 'AddSavedReportSchemaVersionMigration', '2022-01-17 13:00:08', '2022-01-17 13:00:09', 0),
(20200916134817, 'RemoveOldScreenshotsMigration', '2022-01-17 13:00:09', '2022-01-17 13:00:09', 0),
(20200917140227, 'DisplayGroupCreatedModifiedDates', '2022-01-17 13:00:09', '2022-01-17 13:00:09', 0),
(20201007080829, 'AddFoldersMigration', '2022-01-17 13:00:09', '2022-01-17 13:00:09', 0),
(20201007093511, 'FeaturesMigration', '2022-01-17 13:00:09', '2022-01-17 13:00:10', 0),
(20201025153753, 'RemoveOldPermissionSettingsMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0),
(20210105105646, 'AddMcaasScopeAndRouteMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0),
(20210113134628, 'EnableUserSharingFeatureOnUsersGroupMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0),
(20210201150259, 'UserOnboardingMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0),
(20210305131937, 'FixDuplicateTagsMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0),
(20210407111756, 'RemoveReportNameColumnFromSavedReportMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0),
(20210601104441, 'AddUserAgentToDataSetMigration', '2022-01-17 13:00:10', '2022-01-17 13:00:10', 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `player_software`
--

CREATE TABLE `player_software` (
  `versionId` int(11) NOT NULL,
  `player_type` varchar(20) DEFAULT NULL,
  `player_version` varchar(15) DEFAULT NULL,
  `player_code` smallint(6) DEFAULT NULL,
  `mediaId` int(11) NOT NULL,
  `playerShowVersion` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `playlist`
--

CREATE TABLE `playlist` (
  `playlistId` int(11) NOT NULL,
  `name` varchar(254) NOT NULL,
  `ownerId` int(11) NOT NULL,
  `regionId` int(11) DEFAULT NULL,
  `createdDt` datetime DEFAULT NULL,
  `modifiedDt` datetime DEFAULT NULL,
  `duration` int(11) NOT NULL DEFAULT '0',
  `requiresDurationUpdate` int(11) NOT NULL DEFAULT '0',
  `isDynamic` tinyint(4) NOT NULL DEFAULT '0',
  `filterMediaName` varchar(255) DEFAULT NULL,
  `filterMediaTags` varchar(255) DEFAULT NULL,
  `enableStat` varchar(255) DEFAULT NULL,
  `folderId` int(11) NOT NULL DEFAULT '1',
  `permissionsFolderId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `playlist`
--

INSERT INTO `playlist` (`playlistId`, `name`, `ownerId`, `regionId`, `createdDt`, `modifiedDt`, `duration`, `requiresDurationUpdate`, `isDynamic`, `filterMediaName`, `filterMediaTags`, `enableStat`, `folderId`, `permissionsFolderId`) VALUES
(1, 'Logo', 1, 1, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 0, 1, 0, NULL, NULL, NULL, 1, 1),
(2, 'Header', 1, 2, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 0, 1, 0, NULL, NULL, NULL, 1, 1),
(3, 'Explainer', 1, 3, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 0, 1, 0, NULL, NULL, NULL, 1, 1),
(4, 'Time', 1, 4, '2022-01-17 10:00:44', '2022-01-17 10:00:44', 0, 1, 0, NULL, NULL, NULL, 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `region`
--

CREATE TABLE `region` (
  `regionId` int(11) NOT NULL,
  `layoutId` int(11) NOT NULL,
  `ownerId` int(11) NOT NULL,
  `name` varchar(254) DEFAULT NULL,
  `width` decimal(10,0) NOT NULL,
  `height` decimal(10,0) NOT NULL,
  `top` decimal(10,0) NOT NULL,
  `left` decimal(10,0) NOT NULL,
  `zIndex` smallint(6) NOT NULL,
  `duration` int(11) NOT NULL DEFAULT '0',
  `isDrawer` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `region`
--

INSERT INTO `region` (`regionId`, `layoutId`, `ownerId`, `name`, `width`, `height`, `top`, `left`, `zIndex`, `duration`, `isDrawer`) VALUES
(1, 1, 1, 'Logo', 267, 157, 16, 24, 0, 0, 0),
(2, 1, 1, 'Header', 1109, 216, 290, 413, 0, 0, 0),
(3, 1, 1, 'Explainer', 1626, 145, 618, 147, 0, 0, 0),
(4, 1, 1, 'Time', 126, 58, 971, 1741, 0, 0, 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `regionoption`
--

CREATE TABLE `regionoption` (
  `regionId` int(11) NOT NULL,
  `option` varchar(50) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `reportschedule`
--

CREATE TABLE `reportschedule` (
  `reportScheduleId` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `reportName` varchar(255) NOT NULL,
  `filterCriteria` text,
  `schedule` varchar(255) NOT NULL,
  `lastSavedReportId` int(11) NOT NULL DEFAULT '0',
  `lastRunDt` int(11) NOT NULL DEFAULT '0',
  `previousRunDt` int(11) NOT NULL DEFAULT '0',
  `userId` int(11) NOT NULL,
  `isActive` int(11) NOT NULL DEFAULT '1',
  `fromDt` int(11) NOT NULL DEFAULT '0',
  `toDt` int(11) NOT NULL DEFAULT '0',
  `createdDt` int(11) NOT NULL,
  `message` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `requiredfile`
--

CREATE TABLE `requiredfile` (
  `rfId` int(11) NOT NULL,
  `displayId` int(11) NOT NULL,
  `type` varchar(1) NOT NULL,
  `itemId` int(11) DEFAULT NULL,
  `bytesRequested` bigint(20) NOT NULL,
  `complete` tinyint(4) NOT NULL DEFAULT '0',
  `path` varchar(255) DEFAULT NULL,
  `size` bigint(20) NOT NULL DEFAULT '0',
  `released` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `resolution`
--

CREATE TABLE `resolution` (
  `resolutionId` int(11) NOT NULL,
  `resolution` varchar(254) NOT NULL,
  `width` smallint(6) NOT NULL,
  `height` smallint(6) NOT NULL,
  `intended_width` smallint(6) NOT NULL,
  `intended_height` smallint(6) NOT NULL,
  `version` tinyint(4) NOT NULL DEFAULT '1',
  `enabled` tinyint(4) NOT NULL DEFAULT '1',
  `userId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `resolution`
--

INSERT INTO `resolution` (`resolutionId`, `resolution`, `width`, `height`, `intended_width`, `intended_height`, `version`, `enabled`, `userId`) VALUES
(1, '1080p HD Landscape', 800, 450, 1920, 1080, 2, 1, 1),
(2, '720p HD Landscape', 800, 450, 1280, 720, 2, 1, 1),
(3, '1080p HD Portrait', 450, 800, 1080, 1920, 2, 1, 1),
(4, '720p HD Portrait', 450, 800, 720, 1280, 2, 1, 1),
(5, '4k cinema', 800, 450, 4096, 2304, 2, 1, 1),
(6, 'Common PC Monitor 4:3', 800, 600, 1024, 768, 2, 1, 1),
(7, '4k UHD Landscape', 450, 800, 3840, 2160, 2, 1, 1),
(8, '4k UHD Portrait', 800, 450, 2160, 3840, 2, 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `saved_report`
--

CREATE TABLE `saved_report` (
  `savedReportId` int(11) NOT NULL,
  `saveAs` varchar(255) NOT NULL,
  `mediaId` int(11) NOT NULL,
  `reportScheduleId` int(11) NOT NULL,
  `generatedOn` int(11) NOT NULL,
  `userId` int(11) NOT NULL,
  `schemaVersion` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `schedule`
--

CREATE TABLE `schedule` (
  `eventId` int(11) NOT NULL,
  `eventTypeId` int(11) NOT NULL,
  `campaignId` int(11) DEFAULT NULL,
  `commandId` int(11) DEFAULT NULL,
  `dayPartId` int(11) NOT NULL DEFAULT '0',
  `userId` int(11) NOT NULL,
  `fromDt` bigint(20) DEFAULT NULL,
  `toDt` bigint(20) DEFAULT NULL,
  `is_priority` tinyint(4) NOT NULL,
  `displayOrder` int(11) NOT NULL DEFAULT '0',
  `lastRecurrenceWatermark` bigint(20) DEFAULT NULL,
  `syncTimezone` tinyint(4) NOT NULL DEFAULT '0',
  `recurrence_type` enum('Minute','Hour','Day','Week','Month','Year') DEFAULT NULL,
  `recurrence_detail` int(11) DEFAULT NULL,
  `recurrence_range` bigint(20) DEFAULT NULL,
  `recurrenceRepeatsOn` varchar(14) DEFAULT NULL,
  `syncEvent` int(11) NOT NULL DEFAULT '0',
  `recurrenceMonthlyRepeatsOn` tinyint(4) NOT NULL DEFAULT '0',
  `shareOfVoice` smallint(6) DEFAULT NULL,
  `isGeoAware` tinyint(4) NOT NULL DEFAULT '0',
  `geoLocation` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `scheduleexclusions`
--

CREATE TABLE `scheduleexclusions` (
  `scheduleExclusionId` int(11) NOT NULL,
  `eventId` int(11) NOT NULL,
  `fromDt` int(11) NOT NULL,
  `toDt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `schedulereminder`
--

CREATE TABLE `schedulereminder` (
  `scheduleReminderId` int(11) NOT NULL,
  `eventId` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `option` int(11) NOT NULL,
  `reminderDt` int(11) NOT NULL,
  `lastReminderDt` int(11) NOT NULL,
  `isEmail` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `session`
--

CREATE TABLE `session` (
  `session_id` varchar(160) NOT NULL,
  `session_data` longtext NOT NULL,
  `session_expiration` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `lastAccessed` datetime DEFAULT NULL,
  `userId` int(11) DEFAULT NULL,
  `isExpired` tinyint(4) NOT NULL DEFAULT '1',
  `userAgent` varchar(255) DEFAULT NULL,
  `remoteAddr` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `session`
--

INSERT INTO `session` (`session_id`, `session_data`, `session_expiration`, `lastAccessed`, `userId`, `isExpired`, `userAgent`, `remoteAddr`) VALUES
('6fd3b246e3491f215599292b6211a47c', 'init|s:1:\"1\";slimFlash|a:0:{}csrfToken|s:40:\"34eed6398b0d75b11b002ab1203d3ae020b99882\";userid|i:1;', 1642439451, '2022-01-17 13:46:51', 1, 0, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36', '187.183.231.134');

-- --------------------------------------------------------

--
-- Estrutura da tabela `setting`
--

CREATE TABLE `setting` (
  `settingId` int(11) NOT NULL,
  `setting` varchar(50) NOT NULL,
  `value` varchar(1000) NOT NULL,
  `userSee` tinyint(4) NOT NULL DEFAULT '1',
  `userChange` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `setting`
--

INSERT INTO `setting` (`settingId`, `setting`, `value`, `userSee`, `userChange`) VALUES
(3, 'defaultUsertype', 'User', 1, 1),
(7, 'userModule', 'module_user_general.php', 0, 0),
(11, 'defaultTimezone', 'America/Fortaleza', 1, 1),
(18, 'mail_to', 'mail@yoursite.com', 1, 1),
(19, 'mail_from', 'mail@yoursite.com', 1, 1),
(30, 'audit', 'Error', 1, 1),
(33, 'LIBRARY_LOCATION', 'media/', 1, 1),
(34, 'SERVER_KEY', 'abcd1234', 1, 1),
(35, 'HELP_BASE', 'http://www.xibo.org.uk/manual/en/', 1, 1),
(36, 'PHONE_HOME', 'Off', 1, 1),
(37, 'PHONE_HOME_KEY', '0031abd911678d5a63d5bab6849f36dd', 0, 0),
(38, 'PHONE_HOME_URL', 'http://www.xibo.org.uk/stats/track.php', 0, 0),
(39, 'PHONE_HOME_DATE', '0', 0, 0),
(40, 'SERVER_MODE', 'Production', 1, 1),
(41, 'MAINTENANCE_ENABLED', 'Off', 1, 1),
(42, 'MAINTENANCE_EMAIL_ALERTS', '1', 1, 1),
(43, 'MAINTENANCE_KEY', 'changeme', 1, 1),
(44, 'MAINTENANCE_LOG_MAXAGE', '30', 1, 1),
(45, 'MAINTENANCE_STAT_MAXAGE', '30', 1, 1),
(46, 'MAINTENANCE_ALERT_TOUT', '12', 1, 1),
(47, 'SHOW_DISPLAY_AS_VNCLINK', '', 1, 1),
(48, 'SHOW_DISPLAY_AS_VNC_TGT', '_top', 1, 1),
(49, 'MAINTENANCE_ALWAYS_ALERT', '0', 1, 1),
(50, 'SCHEDULE_LOOKAHEAD', '1', 1, 0),
(51, 'REQUIRED_FILES_LOOKAHEAD', '172800', 1, 1),
(52, 'REGION_OPTIONS_COLOURING', 'Media Colouring', 1, 1),
(53, 'LAYOUT_COPY_MEDIA_CHECKB', '0', 1, 1),
(54, 'MAX_LICENSED_DISPLAYS', '0', 0, 0),
(55, 'LIBRARY_MEDIA_UPDATEINALL_CHECKB', '1', 1, 1),
(56, 'USER_PASSWORD_POLICY', '', 1, 1),
(57, 'USER_PASSWORD_ERROR', '', 1, 1),
(58, 'MODULE_CONFIG_LOCKED_CHECKB', '0', 0, 0),
(59, 'LIBRARY_SIZE_LIMIT_KB', '0', 1, 0),
(60, 'MONTHLY_XMDS_TRANSFER_LIMIT_KB', '0', 1, 0),
(61, 'DEFAULT_LANGUAGE', 'en_GB', 1, 1),
(62, 'TRANSITION_CONFIG_LOCKED_CHECKB', '0', 1, 0),
(63, 'GLOBAL_THEME_NAME', 'default', 1, 1),
(64, 'DEFAULT_LAT', '51.504', 1, 1),
(65, 'DEFAULT_LONG', '-0.104', 1, 1),
(66, 'SCHEDULE_WITH_VIEW_PERMISSION', '0', 1, 1),
(67, 'SETTING_IMPORT_ENABLED', '1', 1, 1),
(68, 'SETTING_LIBRARY_TIDY_ENABLED', '1', 1, 1),
(69, 'SENDFILE_MODE', 'Off', 1, 1),
(70, 'EMBEDDED_STATUS_WIDGET', '', 1, 0),
(71, 'PROXY_HOST', '', 1, 1),
(72, 'PROXY_PORT', '0', 1, 1),
(73, 'PROXY_AUTH', '', 1, 1),
(74, 'DATE_FORMAT', 'Y-m-d H:i', 1, 1),
(75, 'DETECT_LANGUAGE', '1', 1, 1),
(76, 'DEFAULTS_IMPORTED', '1', 0, 0),
(77, 'FORCE_HTTPS', '0', 1, 1),
(78, 'ISSUE_STS', '0', 1, 1),
(79, 'STS_TTL', '600', 1, 1),
(81, 'CALENDAR_TYPE', 'Gregorian', 1, 1),
(82, 'DASHBOARD_LATEST_NEWS_ENABLED', '1', 1, 1),
(83, 'LIBRARY_MEDIA_DELETEOLDVER_CHECKB', '1', 1, 1),
(84, 'PROXY_EXCEPTIONS', '', 1, 1),
(85, 'INSTANCE_SUSPENDED', '0', 0, 0),
(87, 'XMR_ADDRESS', 'tcp://localhost:5555', 1, 1),
(88, 'XMR_PUB_ADDRESS', '', 1, 1),
(89, 'CDN_URL', '', 0, 0),
(90, 'ELEVATE_LOG_UNTIL', '1463396415', 1, 1),
(91, 'RESTING_LOG_LEVEL', 'Error', 1, 1),
(92, 'TASK_CONFIG_LOCKED_CHECKB', '0', 0, 0),
(93, 'WHITELIST_LOAD_BALANCERS', '', 1, 1),
(94, 'DEFAULT_LAYOUT', '1', 1, 1),
(95, 'DISPLAY_PROFILE_STATS_DEFAULT', '0', 1, 1),
(96, 'DISPLAY_PROFILE_CURRENT_LAYOUT_STATUS_ENABLED', '1', 1, 1),
(97, 'DISPLAY_PROFILE_SCREENSHOT_INTERVAL_ENABLED', '1', 1, 1),
(98, 'DISPLAY_PROFILE_SCREENSHOT_SIZE_DEFAULT', '200', 1, 1),
(99, 'LATEST_NEWS_URL', 'http://xibo.org.uk/feed', 0, 0),
(100, 'DISPLAY_LOCK_NAME_TO_DEVICENAME', '0', 1, 1),
(101, 'mail_from_name', '', 1, 1),
(102, 'SCHEDULE_SHOW_LAYOUT_NAME', '0', 1, 1),
(103, 'DEFAULT_USERGROUP', '1', 1, 1),
(104, 'PASSWORD_REMINDER_ENABLED', 'Off', 1, 1),
(105, 'DISPLAY_AUTO_AUTH', '0', 0, 0),
(106, 'EVENT_SYNC', '0', 0, 0),
(107, 'DEFAULT_TRANSITION_DURATION', '1000', 1, 1),
(108, 'LAYOUT_STATS_ENABLED_DEFAULT', '0', 1, 1),
(109, 'DISPLAY_PROFILE_AGGREGATION_LEVEL_DEFAULT', 'Individual', 1, 1),
(110, 'MEDIA_STATS_ENABLED_DEFAULT', 'Inherit', 1, 1),
(111, 'WIDGET_STATS_ENABLED_DEFAULT', 'Inherit', 1, 1),
(112, 'NAVIGATION_MENU_POSITION', 'vertical', 1, 1),
(113, 'TWOFACTOR_ISSUER', '', 1, 1),
(114, 'PLAYLIST_STATS_ENABLED_DEFAULT', 'Inherit', 1, 1),
(115, 'DEFAULT_RESIZE_LIMIT', '6000', 1, 1),
(116, 'DEFAULT_RESIZE_THRESHOLD', '1920', 1, 1),
(118, 'DEFAULT_TRANSITION_IN', 'fadeIn', 1, 1),
(119, 'DEFAULT_TRANSITION_OUT', 'fadeOut', 1, 1),
(120, 'DEFAULT_LAYOUT_AUTO_PUBLISH_CHECKB', '0', 1, 1),
(121, 'QUICK_CHART_URL', 'https://quickchart.io', 1, 1),
(122, 'DEFAULT_TRANSITION_AUTO_APPLY', '0', 1, 1),
(123, 'SYSTEM_USER', '1', 1, 1),
(124, 'DATASET_HARD_ROW_LIMIT', '10000', 1, 1),
(125, 'DISPLAY_SCREENSHOT_TTL', '0', 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `stat`
--

CREATE TABLE `stat` (
  `statId` int(11) NOT NULL,
  `type` varchar(20) NOT NULL,
  `statDate` int(11) NOT NULL,
  `scheduleId` int(11) NOT NULL,
  `displayId` int(11) NOT NULL,
  `campaignId` int(11) DEFAULT NULL,
  `layoutId` int(11) DEFAULT NULL,
  `mediaId` int(11) DEFAULT NULL,
  `widgetId` int(11) DEFAULT NULL,
  `start` int(11) NOT NULL,
  `end` int(11) NOT NULL,
  `tag` varchar(254) DEFAULT NULL,
  `duration` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `engagements` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `status`
--

CREATE TABLE `status` (
  `id` int(11) NOT NULL,
  `status` varchar(254) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `status`
--

INSERT INTO `status` (`id`, `status`) VALUES
(1, 'Published'),
(2, 'Draft'),
(3, 'Pending Approval');

-- --------------------------------------------------------

--
-- Estrutura da tabela `stat_archive`
--

CREATE TABLE `stat_archive` (
  `statId` int(11) NOT NULL,
  `type` varchar(20) NOT NULL,
  `statDate` datetime DEFAULT NULL,
  `scheduleId` int(11) NOT NULL,
  `displayId` int(11) NOT NULL,
  `layoutId` int(11) DEFAULT NULL,
  `mediaId` int(11) DEFAULT NULL,
  `widgetId` int(11) DEFAULT NULL,
  `start` datetime DEFAULT NULL,
  `end` datetime DEFAULT NULL,
  `tag` varchar(254) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `tag`
--

CREATE TABLE `tag` (
  `tagId` int(11) NOT NULL,
  `tag` varchar(50) NOT NULL,
  `isSystem` int(11) NOT NULL DEFAULT '0',
  `options` text,
  `isRequired` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `tag`
--

INSERT INTO `tag` (`tagId`, `tag`, `isSystem`, `options`, `isRequired`) VALUES
(1, 'template', 1, NULL, 0),
(2, 'background', 1, NULL, 0),
(3, 'thumbnail', 1, NULL, 0),
(4, 'imported', 1, NULL, 0);

-- --------------------------------------------------------

--
-- Estrutura da tabela `task`
--

CREATE TABLE `task` (
  `taskId` int(11) NOT NULL,
  `name` varchar(254) NOT NULL,
  `class` varchar(254) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '2',
  `pid` int(11) DEFAULT NULL,
  `options` text,
  `schedule` varchar(254) NOT NULL,
  `lastRunDt` int(11) NOT NULL DEFAULT '0',
  `lastRunStartDt` int(11) DEFAULT NULL,
  `lastRunMessage` varchar(255) DEFAULT NULL,
  `lastRunStatus` tinyint(4) NOT NULL DEFAULT '0',
  `lastRunDuration` smallint(6) NOT NULL DEFAULT '0',
  `lastRunExitCode` smallint(6) NOT NULL DEFAULT '0',
  `isActive` tinyint(4) NOT NULL,
  `runNow` tinyint(4) NOT NULL DEFAULT '0',
  `configFile` varchar(254) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `task`
--

INSERT INTO `task` (`taskId`, `name`, `class`, `status`, `pid`, `options`, `schedule`, `lastRunDt`, `lastRunStartDt`, `lastRunMessage`, `lastRunStatus`, `lastRunDuration`, `lastRunExitCode`, `isActive`, `runNow`, `configFile`) VALUES
(1, 'Daily Maintenance', '\\Xibo\\XTR\\MaintenanceDailyTask', 2, NULL, '[]', '0 0 * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/maintenance-daily.task'),
(2, 'Regular Maintenance', '\\Xibo\\XTR\\MaintenanceRegularTask', 2, NULL, '[]', '*/5 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/maintenance-regular.task'),
(3, 'Email Notifications', '\\Xibo\\XTR\\EmailNotificationsTask', 2, NULL, '[]', '*/5 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/email-notifications.task'),
(4, 'Stats Archive', '\\Xibo\\XTR\\StatsArchiveTask', 2, NULL, '{\"periodSizeInDays\":\"7\",\"maxPeriods\":\"4\",\"archiveStats\":\"On\"}', '0 0 * * Mon', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/stats-archiver.task'),
(5, 'Remove old Notifications', '\\Xibo\\XTR\\NotificationTidyTask', 2, NULL, '{\"maxAgeDays\":\"7\",\"systemOnly\":\"1\",\"readOnly\":\"0\"}', '15 0 * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/notification-tidy.task'),
(6, 'Fetch Remote DataSets', '\\Xibo\\XTR\\RemoteDataSetFetchTask', 2, NULL, '[]', '30 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/remote-dataset.task'),
(7, 'Drop Player Cache', '\\Xibo\\XTR\\DropPlayerCacheTask', 2, NULL, '[]', '0 0 1 1 *', 0, NULL, NULL, 0, 0, 0, 0, 0, '/tasks/drop-player-cache.task'),
(8, 'Sync Dynamic Playlists', '\\Xibo\\XTR\\DynamicPlaylistSyncTask', 2, NULL, '[]', '* * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/dynamic-playlist-sync.task'),
(9, 'Widget Sync', '\\Xibo\\XTR\\WidgetSyncTask', 2, NULL, '{}', '*/3 * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/widget-sync.task'),
(10, 'Report Schedule', '\\Xibo\\XTR\\ReportScheduleTask', 2, NULL, '[]', '*/5 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/report-schedule.task'),
(11, 'Statistics Migration', '\\Xibo\\XTR\\StatsMigrationTask', 2, NULL, '{\"killSwitch\":\"0\",\"numberOfRecords\":\"5000\",\"numberOfLoops\":\"10\",\"pauseBetweenLoops\":\"1\",\"optimiseOnComplete\":\"1\"}', '*/10 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/stats-migration.task'),
(12, 'Schedule Reminder', '\\Xibo\\XTR\\ScheduleReminderTask', 2, NULL, '[]', '*/5 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/schedule-reminder.task'),
(13, 'Image Processing', '\\Xibo\\XTR\\ImageProcessingTask', 2, NULL, '[]', '*/5 * * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/image-processing.task'),
(14, 'Remove Old Screenshots', '\\Xibo\\XTR\\RemoveOldScreenshotsTask', 2, NULL, '[]', '0 0 * * * *', 0, NULL, NULL, 0, 0, 0, 1, 0, '/tasks/remove-old-screenshots.task');

-- --------------------------------------------------------

--
-- Estrutura da tabela `transition`
--

CREATE TABLE `transition` (
  `transitionId` int(11) NOT NULL,
  `transition` varchar(254) NOT NULL,
  `code` varchar(254) NOT NULL,
  `hasDuration` tinyint(4) NOT NULL,
  `hasDirection` tinyint(4) NOT NULL,
  `availableAsIn` tinyint(4) NOT NULL,
  `availableAsOut` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `transition`
--

INSERT INTO `transition` (`transitionId`, `transition`, `code`, `hasDuration`, `hasDirection`, `availableAsIn`, `availableAsOut`) VALUES
(1, 'Fade In', 'fadeIn', 1, 0, 1, 0),
(2, 'Fade Out', 'fadeOut', 1, 0, 0, 1),
(3, 'Fly', 'fly', 1, 1, 1, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `user`
--

CREATE TABLE `user` (
  `userId` int(11) NOT NULL,
  `userTypeId` int(11) NOT NULL,
  `userName` varchar(50) NOT NULL,
  `userPassword` varchar(255) NOT NULL,
  `lastAccessed` datetime DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `homePageId` varchar(255) DEFAULT 'null',
  `retired` tinyint(4) NOT NULL DEFAULT '0',
  `csprng` tinyint(4) NOT NULL DEFAULT '0',
  `newUserWizard` tinyint(4) NOT NULL DEFAULT '0',
  `firstName` varchar(254) DEFAULT NULL,
  `lastName` varchar(254) DEFAULT NULL,
  `phone` varchar(254) DEFAULT NULL,
  `ref1` varchar(254) DEFAULT NULL,
  `ref2` varchar(254) DEFAULT NULL,
  `ref3` varchar(254) DEFAULT NULL,
  `ref4` varchar(254) DEFAULT NULL,
  `ref5` varchar(254) DEFAULT NULL,
  `isPasswordChangeRequired` tinyint(4) NOT NULL DEFAULT '0',
  `twoFactorTypeId` int(11) NOT NULL DEFAULT '0',
  `twoFactorSecret` text,
  `twoFactorRecoveryCodes` text,
  `showContentFrom` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `user`
--

INSERT INTO `user` (`userId`, `userTypeId`, `userName`, `userPassword`, `lastAccessed`, `email`, `homePageId`, `retired`, `csprng`, `newUserWizard`, `firstName`, `lastName`, `phone`, `ref1`, `ref2`, `ref3`, `ref4`, `ref5`, `isPasswordChangeRequired`, `twoFactorTypeId`, `twoFactorSecret`, `twoFactorRecoveryCodes`, `showContentFrom`) VALUES
(1, 1, 'admin', '$2y$10$VtCV2.A1JgiFnkjrRs88s.U0lWolEqCEJODH7rHf.yMtGj2IalzvO', '2022-01-17 13:46:40', NULL, 'statusdashboard.view', 0, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, 1);

-- --------------------------------------------------------

--
-- Estrutura da tabela `useroption`
--

CREATE TABLE `useroption` (
  `userId` int(11) NOT NULL,
  `option` varchar(50) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `useroption`
--

INSERT INTO `useroption` (`userId`, `option`, `value`) VALUES
(1, 'displayGrid', '{\"time\":1642438010879,\"start\":0,\"length\":10,\"order\":[[1,\"asc\"]],\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true},\"columns\":[{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}}]}'),
(1, 'layoutGrid', '{\"time\":1642438004047,\"start\":0,\"length\":10,\"order\":[[1,\"asc\"]],\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true},\"columns\":[{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":false,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}},{\"visible\":true,\"search\":{\"search\":\"\",\"smart\":true,\"regex\":false,\"caseInsensitive\":true}}]}');

-- --------------------------------------------------------

--
-- Estrutura da tabela `usertype`
--

CREATE TABLE `usertype` (
  `userTypeId` int(11) NOT NULL,
  `userType` varchar(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `usertype`
--

INSERT INTO `usertype` (`userTypeId`, `userType`) VALUES
(1, 'Super Admin'),
(2, 'Group Admin'),
(3, 'User'),
(4, 'DOOH');

-- --------------------------------------------------------

--
-- Estrutura da tabela `widget`
--

CREATE TABLE `widget` (
  `widgetId` int(11) NOT NULL,
  `playlistId` int(11) NOT NULL,
  `ownerId` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  `duration` int(11) NOT NULL,
  `displayOrder` int(11) NOT NULL,
  `calculatedDuration` int(11) NOT NULL,
  `useDuration` tinyint(4) NOT NULL DEFAULT '1',
  `fromDt` int(11) NOT NULL,
  `toDt` int(11) NOT NULL,
  `createdDt` int(11) NOT NULL DEFAULT '0',
  `modifiedDt` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `widget`
--

INSERT INTO `widget` (`widgetId`, `playlistId`, `ownerId`, `type`, `duration`, `displayOrder`, `calculatedDuration`, `useDuration`, `fromDt`, `toDt`, `createdDt`, `modifiedDt`) VALUES
(1, 1, 1, 'image', 60, 1, 60, 1, 0, 2147483647, 1642424444, 1642424444),
(2, 2, 1, 'text', 10, 1, 10, 1, 0, 2147483647, 1642424444, 1642424444),
(3, 3, 1, 'spacer', 5, 1, 5, 1, 0, 2147483647, 1642424444, 1642424444),
(4, 3, 1, 'text', 20, 2, 20, 1, 0, 2147483647, 1642424444, 1642424444),
(5, 4, 1, 'clock', 1, 1, 5, 0, 0, 2147483647, 1642424444, 1642424444);

-- --------------------------------------------------------

--
-- Estrutura da tabela `widgethistory`
--

CREATE TABLE `widgethistory` (
  `id` int(11) NOT NULL,
  `layoutHistoryId` int(11) NOT NULL,
  `widgetId` int(11) NOT NULL,
  `mediaId` int(11) DEFAULT NULL,
  `type` varchar(50) NOT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estrutura da tabela `widgetoption`
--

CREATE TABLE `widgetoption` (
  `widgetId` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  `option` varchar(254) NOT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Extraindo dados da tabela `widgetoption`
--

INSERT INTO `widgetoption` (`widgetId`, `type`, `option`, `value`) VALUES
(1, 'attrib', 'align', 'center'),
(1, 'attrib', 'enableStat', 'Inherit'),
(1, 'attrib', 'name', 'Company Logo'),
(1, 'attrib', 'scaleType', 'center'),
(1, 'attrib', 'uri', '1.png'),
(1, 'attrib', 'valign', 'middle'),
(2, 'attrib', 'backgroundColor', NULL),
(2, 'attrib', 'effect', 'none'),
(2, 'attrib', 'enableStat', 'Inherit'),
(2, 'attrib', 'lowerLimit', '0'),
(2, 'attrib', 'marqueeInlineSelector', NULL),
(2, 'attrib', 'name', 'Header Text'),
(2, 'attrib', 'speed', NULL),
(2, 'attrib', 'ta_text_advanced', '0'),
(2, 'attrib', 'upperLimit', '0'),
(2, 'attrib', 'xmds', '1'),
(2, 'cdata', 'javaScript', ''),
(2, 'cdata', 'text', '<p style=\"text-align: center;\"><span style=\"color:#FFFFFF;\"><span style=\"font-size: 48px;\">powered by...</span></span></p>\r\n\r\n<p style=\"text-align: center;\"><strong><span style=\"font-size:96px;\"><span style=\"color:#FFFFFF;\">Xibo Digital Signage</span></span></strong></p>\r\n'),
(3, 'attrib', 'enableStat', 'Inherit'),
(3, 'attrib', 'lowerLimit', '0'),
(3, 'attrib', 'upperLimit', '0'),
(4, 'attrib', 'backgroundColor', NULL),
(4, 'attrib', 'effect', 'fade'),
(4, 'attrib', 'enableStat', 'Inherit'),
(4, 'attrib', 'lowerLimit', '0'),
(4, 'attrib', 'marqueeInlineSelector', NULL),
(4, 'attrib', 'name', 'Explainer Text'),
(4, 'attrib', 'speed', '6000'),
(4, 'attrib', 'ta_text_advanced', '0'),
(4, 'attrib', 'upperLimit', '0'),
(4, 'attrib', 'xmds', '1'),
(4, 'cdata', 'javaScript', ''),
(4, 'cdata', 'text', '<p style=\"text-align: center;\"><span style=\"color:#FFFFFF;\"><span style=\"font-size: 48px;\">This is the Default Layout to assign to displays</span></span></p>\r\n\r\n<p style=\"text-align: center;\"><span style=\"color:#FFFFFF;\"><span style=\"font-size: 48px;\">It will be shown when nothing else is scheduled</span></span></p>\r\n\r\n<p style=\"text-align: center;\"><span style=\"font-size: 48px;\"><span style=\"color:#FFFFFF;\">Edit this Default Layout to personalise or create your own to assign to </span><span style=\"color: #fcfce5;\">your displays!</span></span></p>\r\n\r\n<p>&nbsp;</p>\r\n'),
(5, 'attrib', 'clockFace', 'TwentyFourHourClock'),
(5, 'attrib', 'clockTypeId', '2'),
(5, 'attrib', 'enableStat', 'Inherit'),
(5, 'attrib', 'lowerLimit', '0'),
(5, 'attrib', 'name', NULL),
(5, 'attrib', 'offset', '0'),
(5, 'attrib', 'showSeconds', '1'),
(5, 'attrib', 'ta_text_advanced', '0'),
(5, 'attrib', 'theme', '1'),
(5, 'attrib', 'upperLimit', '0'),
(5, 'cdata', 'format', '<p style=\"text-align: justify;\"><span style=\"color:#FFFFFF;\"><span style=\"font-size: 48px;\">[HH:mm]</span></span></p>\r\n');

--
-- Índices para tabelas despejadas
--

--
-- Índices para tabela `action`
--
ALTER TABLE `action`
  ADD PRIMARY KEY (`actionId`),
  ADD KEY `ownerId` (`ownerId`);

--
-- Índices para tabela `auditlog`
--
ALTER TABLE `auditlog`
  ADD PRIMARY KEY (`logId`);

--
-- Índices para tabela `bandwidth`
--
ALTER TABLE `bandwidth`
  ADD PRIMARY KEY (`displayId`,`type`,`month`),
  ADD KEY `type` (`type`);

--
-- Índices para tabela `bandwidthtype`
--
ALTER TABLE `bandwidthtype`
  ADD PRIMARY KEY (`bandwidthTypeId`);

--
-- Índices para tabela `blacklist`
--
ALTER TABLE `blacklist`
  ADD PRIMARY KEY (`blacklistId`),
  ADD KEY `mediaId` (`mediaId`),
  ADD KEY `displayId` (`displayId`);

--
-- Índices para tabela `campaign`
--
ALTER TABLE `campaign`
  ADD PRIMARY KEY (`campaignId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `folderId` (`folderId`);

--
-- Índices para tabela `command`
--
ALTER TABLE `command`
  ADD PRIMARY KEY (`commandId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `dataset`
--
ALTER TABLE `dataset`
  ADD PRIMARY KEY (`dataSetId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `folderId` (`folderId`);

--
-- Índices para tabela `datasetcolumn`
--
ALTER TABLE `datasetcolumn`
  ADD PRIMARY KEY (`dataSetColumnId`),
  ADD KEY `dataSetId` (`dataSetId`),
  ADD KEY `dataTypeId` (`dataTypeId`),
  ADD KEY `dataSetColumnTypeId` (`dataSetColumnTypeId`);

--
-- Índices para tabela `datasetcolumntype`
--
ALTER TABLE `datasetcolumntype`
  ADD PRIMARY KEY (`dataSetColumnTypeId`);

--
-- Índices para tabela `datasetrss`
--
ALTER TABLE `datasetrss`
  ADD PRIMARY KEY (`id`),
  ADD KEY `dataSetId` (`dataSetId`);

--
-- Índices para tabela `datatype`
--
ALTER TABLE `datatype`
  ADD PRIMARY KEY (`dataTypeId`);

--
-- Índices para tabela `daypart`
--
ALTER TABLE `daypart`
  ADD PRIMARY KEY (`dayPartId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `display`
--
ALTER TABLE `display`
  ADD PRIMARY KEY (`displayId`),
  ADD UNIQUE KEY `license` (`license`),
  ADD KEY `defaultLayoutId` (`defaultLayoutId`),
  ADD KEY `displayProfileId` (`displayProfileId`);

--
-- Índices para tabela `displayevent`
--
ALTER TABLE `displayevent`
  ADD PRIMARY KEY (`displayEventId`),
  ADD KEY `eventDate` (`eventDate`),
  ADD KEY `displayId` (`displayId`,`end`);

--
-- Índices para tabela `displaygroup`
--
ALTER TABLE `displaygroup`
  ADD PRIMARY KEY (`displayGroupId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `folderId` (`folderId`);

--
-- Índices para tabela `displayprofile`
--
ALTER TABLE `displayprofile`
  ADD PRIMARY KEY (`displayProfileId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `folder`
--
ALTER TABLE `folder`
  ADD PRIMARY KEY (`folderId`);

--
-- Índices para tabela `group`
--
ALTER TABLE `group`
  ADD PRIMARY KEY (`groupId`);

--
-- Índices para tabela `help`
--
ALTER TABLE `help`
  ADD PRIMARY KEY (`helpId`);

--
-- Índices para tabela `layout`
--
ALTER TABLE `layout`
  ADD PRIMARY KEY (`layoutId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `backgroundImageId` (`backgroundImageId`),
  ADD KEY `publishedStatusId` (`publishedStatusId`);

--
-- Índices para tabela `layouthistory`
--
ALTER TABLE `layouthistory`
  ADD PRIMARY KEY (`layoutHistoryId`),
  ADD KEY `campaignId` (`campaignId`);

--
-- Índices para tabela `lkcampaignlayout`
--
ALTER TABLE `lkcampaignlayout`
  ADD PRIMARY KEY (`lkCampaignLayoutId`),
  ADD UNIQUE KEY `campaignId` (`campaignId`,`layoutId`,`displayOrder`),
  ADD KEY `layoutId` (`layoutId`);

--
-- Índices para tabela `lkcommanddisplayprofile`
--
ALTER TABLE `lkcommanddisplayprofile`
  ADD PRIMARY KEY (`commandId`,`displayProfileId`),
  ADD KEY `displayProfileId` (`displayProfileId`);

--
-- Índices para tabela `lkdgdg`
--
ALTER TABLE `lkdgdg`
  ADD KEY `parentId` (`parentId`,`childId`,`depth`),
  ADD KEY `childId` (`childId`,`parentId`,`depth`);

--
-- Índices para tabela `lkdisplaydg`
--
ALTER TABLE `lkdisplaydg`
  ADD PRIMARY KEY (`LkDisplayDGID`),
  ADD UNIQUE KEY `displayGroupId` (`displayGroupId`,`displayId`),
  ADD KEY `displayId` (`displayId`);

--
-- Índices para tabela `lklayoutdisplaygroup`
--
ALTER TABLE `lklayoutdisplaygroup`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `displayGroupId` (`displayGroupId`,`layoutId`),
  ADD KEY `layoutId` (`layoutId`);

--
-- Índices para tabela `lkmediadisplaygroup`
--
ALTER TABLE `lkmediadisplaygroup`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `displayGroupId` (`displayGroupId`,`mediaId`),
  ADD KEY `mediaId` (`mediaId`);

--
-- Índices para tabela `lknotificationdg`
--
ALTER TABLE `lknotificationdg`
  ADD PRIMARY KEY (`lkNotificationDgId`),
  ADD UNIQUE KEY `notificationId` (`notificationId`,`displayGroupId`);

--
-- Índices para tabela `lknotificationgroup`
--
ALTER TABLE `lknotificationgroup`
  ADD PRIMARY KEY (`lkNotificationGroupId`),
  ADD UNIQUE KEY `notificationId` (`notificationId`,`groupId`),
  ADD KEY `groupId` (`groupId`);

--
-- Índices para tabela `lknotificationuser`
--
ALTER TABLE `lknotificationuser`
  ADD PRIMARY KEY (`lkNotificationUserId`),
  ADD UNIQUE KEY `notificationId` (`notificationId`,`userId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `lkplaylistplaylist`
--
ALTER TABLE `lkplaylistplaylist`
  ADD PRIMARY KEY (`parentId`,`childId`,`depth`),
  ADD UNIQUE KEY `childId` (`childId`,`parentId`,`depth`);

--
-- Índices para tabela `lkscheduledisplaygroup`
--
ALTER TABLE `lkscheduledisplaygroup`
  ADD PRIMARY KEY (`eventId`,`displayGroupId`),
  ADD KEY `displayGroupId` (`displayGroupId`);

--
-- Índices para tabela `lktagcampaign`
--
ALTER TABLE `lktagcampaign`
  ADD PRIMARY KEY (`lkTagCampaignId`),
  ADD UNIQUE KEY `tagId` (`tagId`,`campaignId`),
  ADD KEY `campaignId` (`campaignId`);

--
-- Índices para tabela `lktagdisplaygroup`
--
ALTER TABLE `lktagdisplaygroup`
  ADD PRIMARY KEY (`lkTagDisplayGroupId`),
  ADD UNIQUE KEY `tagId` (`tagId`,`displayGroupId`),
  ADD KEY `displayGroupId` (`displayGroupId`);

--
-- Índices para tabela `lktaglayout`
--
ALTER TABLE `lktaglayout`
  ADD PRIMARY KEY (`lkTagLayoutId`),
  ADD UNIQUE KEY `tagId` (`tagId`,`layoutId`),
  ADD KEY `layoutId` (`layoutId`);

--
-- Índices para tabela `lktagmedia`
--
ALTER TABLE `lktagmedia`
  ADD PRIMARY KEY (`lkTagMediaId`),
  ADD UNIQUE KEY `tagId` (`tagId`,`mediaId`),
  ADD KEY `mediaId` (`mediaId`);

--
-- Índices para tabela `lktagplaylist`
--
ALTER TABLE `lktagplaylist`
  ADD PRIMARY KEY (`lkTagPlaylistId`),
  ADD UNIQUE KEY `tagId` (`tagId`,`playlistId`),
  ADD KEY `lktagplaylist_ibfk_2` (`playlistId`);

--
-- Índices para tabela `lkusergroup`
--
ALTER TABLE `lkusergroup`
  ADD PRIMARY KEY (`lkUserGroupID`),
  ADD UNIQUE KEY `groupId` (`groupId`,`userId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `lkwidgetaudio`
--
ALTER TABLE `lkwidgetaudio`
  ADD PRIMARY KEY (`widgetId`,`mediaId`),
  ADD KEY `mediaId` (`mediaId`);

--
-- Índices para tabela `lkwidgetmedia`
--
ALTER TABLE `lkwidgetmedia`
  ADD PRIMARY KEY (`widgetId`,`mediaId`),
  ADD KEY `mediaId` (`mediaId`);

--
-- Índices para tabela `log`
--
ALTER TABLE `log`
  ADD PRIMARY KEY (`logId`),
  ADD KEY `logDate` (`logDate`);

--
-- Índices para tabela `media`
--
ALTER TABLE `media`
  ADD PRIMARY KEY (`mediaId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `editedMediaId` (`editedMediaId`),
  ADD KEY `folderId` (`folderId`);

--
-- Índices para tabela `module`
--
ALTER TABLE `module`
  ADD PRIMARY KEY (`moduleId`);

--
-- Índices para tabela `notification`
--
ALTER TABLE `notification`
  ADD PRIMARY KEY (`notificationId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `oauth_clients`
--
ALTER TABLE `oauth_clients`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `oauth_client_redirect_uris`
--
ALTER TABLE `oauth_client_redirect_uris`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `oauth_client_scopes`
--
ALTER TABLE `oauth_client_scopes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `clientId` (`clientId`,`scopeId`);

--
-- Índices para tabela `oauth_scopes`
--
ALTER TABLE `oauth_scopes`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `oauth_scope_routes`
--
ALTER TABLE `oauth_scope_routes`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `permission`
--
ALTER TABLE `permission`
  ADD PRIMARY KEY (`permissionId`),
  ADD KEY `permission_ibfk_1` (`groupId`),
  ADD KEY `permission_ibfk_2` (`entityId`),
  ADD KEY `permission_objectId_index` (`objectId`);

--
-- Índices para tabela `permissionentity`
--
ALTER TABLE `permissionentity`
  ADD PRIMARY KEY (`entityId`),
  ADD UNIQUE KEY `entity` (`entity`);

--
-- Índices para tabela `phinxlog`
--
ALTER TABLE `phinxlog`
  ADD PRIMARY KEY (`version`);

--
-- Índices para tabela `player_software`
--
ALTER TABLE `player_software`
  ADD PRIMARY KEY (`versionId`),
  ADD KEY `mediaId` (`mediaId`);

--
-- Índices para tabela `playlist`
--
ALTER TABLE `playlist`
  ADD PRIMARY KEY (`playlistId`),
  ADD KEY `ownerId` (`ownerId`),
  ADD KEY `folderId` (`folderId`);

--
-- Índices para tabela `region`
--
ALTER TABLE `region`
  ADD PRIMARY KEY (`regionId`),
  ADD KEY `ownerId` (`ownerId`);

--
-- Índices para tabela `regionoption`
--
ALTER TABLE `regionoption`
  ADD PRIMARY KEY (`regionId`,`option`);

--
-- Índices para tabela `reportschedule`
--
ALTER TABLE `reportschedule`
  ADD PRIMARY KEY (`reportScheduleId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `requiredfile`
--
ALTER TABLE `requiredfile`
  ADD PRIMARY KEY (`rfId`),
  ADD KEY `displayId` (`displayId`,`type`);

--
-- Índices para tabela `resolution`
--
ALTER TABLE `resolution`
  ADD PRIMARY KEY (`resolutionId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `saved_report`
--
ALTER TABLE `saved_report`
  ADD PRIMARY KEY (`savedReportId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `mediaId` (`mediaId`),
  ADD KEY `reportScheduleId` (`reportScheduleId`);

--
-- Índices para tabela `schedule`
--
ALTER TABLE `schedule`
  ADD PRIMARY KEY (`eventId`),
  ADD KEY `campaignId` (`campaignId`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `scheduleexclusions`
--
ALTER TABLE `scheduleexclusions`
  ADD PRIMARY KEY (`scheduleExclusionId`),
  ADD KEY `eventId` (`eventId`);

--
-- Índices para tabela `schedulereminder`
--
ALTER TABLE `schedulereminder`
  ADD PRIMARY KEY (`scheduleReminderId`),
  ADD KEY `eventId` (`eventId`);

--
-- Índices para tabela `session`
--
ALTER TABLE `session`
  ADD PRIMARY KEY (`session_id`),
  ADD KEY `userId` (`userId`);

--
-- Índices para tabela `setting`
--
ALTER TABLE `setting`
  ADD PRIMARY KEY (`settingId`);

--
-- Índices para tabela `stat`
--
ALTER TABLE `stat`
  ADD PRIMARY KEY (`statId`),
  ADD KEY `statDate` (`statDate`),
  ADD KEY `displayId` (`displayId`,`end`,`type`);

--
-- Índices para tabela `status`
--
ALTER TABLE `status`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `stat_archive`
--
ALTER TABLE `stat_archive`
  ADD PRIMARY KEY (`statId`),
  ADD KEY `statDate` (`statDate`),
  ADD KEY `displayId` (`displayId`,`end`,`type`);

--
-- Índices para tabela `tag`
--
ALTER TABLE `tag`
  ADD PRIMARY KEY (`tagId`);

--
-- Índices para tabela `task`
--
ALTER TABLE `task`
  ADD PRIMARY KEY (`taskId`);

--
-- Índices para tabela `transition`
--
ALTER TABLE `transition`
  ADD PRIMARY KEY (`transitionId`);

--
-- Índices para tabela `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`userId`),
  ADD KEY `userTypeId` (`userTypeId`);

--
-- Índices para tabela `useroption`
--
ALTER TABLE `useroption`
  ADD PRIMARY KEY (`userId`,`option`);

--
-- Índices para tabela `usertype`
--
ALTER TABLE `usertype`
  ADD PRIMARY KEY (`userTypeId`);

--
-- Índices para tabela `widget`
--
ALTER TABLE `widget`
  ADD PRIMARY KEY (`widgetId`),
  ADD KEY `playlistId` (`playlistId`),
  ADD KEY `ownerId` (`ownerId`);

--
-- Índices para tabela `widgethistory`
--
ALTER TABLE `widgethistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `layoutHistoryId` (`layoutHistoryId`);

--
-- Índices para tabela `widgetoption`
--
ALTER TABLE `widgetoption`
  ADD PRIMARY KEY (`widgetId`,`type`,`option`);

--
-- AUTO_INCREMENT de tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `action`
--
ALTER TABLE `action`
  MODIFY `actionId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `auditlog`
--
ALTER TABLE `auditlog`
  MODIFY `logId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=133;

--
-- AUTO_INCREMENT de tabela `bandwidthtype`
--
ALTER TABLE `bandwidthtype`
  MODIFY `bandwidthTypeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT de tabela `blacklist`
--
ALTER TABLE `blacklist`
  MODIFY `blacklistId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `campaign`
--
ALTER TABLE `campaign`
  MODIFY `campaignId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `command`
--
ALTER TABLE `command`
  MODIFY `commandId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `dataset`
--
ALTER TABLE `dataset`
  MODIFY `dataSetId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `datasetcolumn`
--
ALTER TABLE `datasetcolumn`
  MODIFY `dataSetColumnId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `datasetcolumntype`
--
ALTER TABLE `datasetcolumntype`
  MODIFY `dataSetColumnTypeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de tabela `datasetrss`
--
ALTER TABLE `datasetrss`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `datatype`
--
ALTER TABLE `datatype`
  MODIFY `dataTypeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT de tabela `daypart`
--
ALTER TABLE `daypart`
  MODIFY `dayPartId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `display`
--
ALTER TABLE `display`
  MODIFY `displayId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `displayevent`
--
ALTER TABLE `displayevent`
  MODIFY `displayEventId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `displaygroup`
--
ALTER TABLE `displaygroup`
  MODIFY `displayGroupId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `displayprofile`
--
ALTER TABLE `displayprofile`
  MODIFY `displayProfileId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT de tabela `folder`
--
ALTER TABLE `folder`
  MODIFY `folderId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `group`
--
ALTER TABLE `group`
  MODIFY `groupId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de tabela `help`
--
ALTER TABLE `help`
  MODIFY `helpId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;

--
-- AUTO_INCREMENT de tabela `layout`
--
ALTER TABLE `layout`
  MODIFY `layoutId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `layouthistory`
--
ALTER TABLE `layouthistory`
  MODIFY `layoutHistoryId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `lkcampaignlayout`
--
ALTER TABLE `lkcampaignlayout`
  MODIFY `lkCampaignLayoutId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `lkdisplaydg`
--
ALTER TABLE `lkdisplaydg`
  MODIFY `LkDisplayDGID` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lklayoutdisplaygroup`
--
ALTER TABLE `lklayoutdisplaygroup`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lkmediadisplaygroup`
--
ALTER TABLE `lkmediadisplaygroup`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lknotificationdg`
--
ALTER TABLE `lknotificationdg`
  MODIFY `lkNotificationDgId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lknotificationgroup`
--
ALTER TABLE `lknotificationgroup`
  MODIFY `lkNotificationGroupId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lknotificationuser`
--
ALTER TABLE `lknotificationuser`
  MODIFY `lkNotificationUserId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lktagcampaign`
--
ALTER TABLE `lktagcampaign`
  MODIFY `lkTagCampaignId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lktagdisplaygroup`
--
ALTER TABLE `lktagdisplaygroup`
  MODIFY `lkTagDisplayGroupId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lktaglayout`
--
ALTER TABLE `lktaglayout`
  MODIFY `lkTagLayoutId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `lktagmedia`
--
ALTER TABLE `lktagmedia`
  MODIFY `lkTagMediaId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `lktagplaylist`
--
ALTER TABLE `lktagplaylist`
  MODIFY `lkTagPlaylistId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lkusergroup`
--
ALTER TABLE `lkusergroup`
  MODIFY `lkUserGroupID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `log`
--
ALTER TABLE `log`
  MODIFY `logId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `media`
--
ALTER TABLE `media`
  MODIFY `mediaId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT de tabela `module`
--
ALTER TABLE `module`
  MODIFY `moduleId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT de tabela `notification`
--
ALTER TABLE `notification`
  MODIFY `notificationId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `oauth_client_redirect_uris`
--
ALTER TABLE `oauth_client_redirect_uris`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `oauth_client_scopes`
--
ALTER TABLE `oauth_client_scopes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `oauth_scope_routes`
--
ALTER TABLE `oauth_scope_routes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de tabela `permission`
--
ALTER TABLE `permission`
  MODIFY `permissionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT de tabela `permissionentity`
--
ALTER TABLE `permissionentity`
  MODIFY `entityId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT de tabela `player_software`
--
ALTER TABLE `player_software`
  MODIFY `versionId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `playlist`
--
ALTER TABLE `playlist`
  MODIFY `playlistId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de tabela `region`
--
ALTER TABLE `region`
  MODIFY `regionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de tabela `reportschedule`
--
ALTER TABLE `reportschedule`
  MODIFY `reportScheduleId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `requiredfile`
--
ALTER TABLE `requiredfile`
  MODIFY `rfId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `resolution`
--
ALTER TABLE `resolution`
  MODIFY `resolutionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de tabela `saved_report`
--
ALTER TABLE `saved_report`
  MODIFY `savedReportId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `schedule`
--
ALTER TABLE `schedule`
  MODIFY `eventId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `scheduleexclusions`
--
ALTER TABLE `scheduleexclusions`
  MODIFY `scheduleExclusionId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `schedulereminder`
--
ALTER TABLE `schedulereminder`
  MODIFY `scheduleReminderId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `setting`
--
ALTER TABLE `setting`
  MODIFY `settingId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=126;

--
-- AUTO_INCREMENT de tabela `stat`
--
ALTER TABLE `stat`
  MODIFY `statId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `status`
--
ALTER TABLE `status`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de tabela `stat_archive`
--
ALTER TABLE `stat_archive`
  MODIFY `statId` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `tag`
--
ALTER TABLE `tag`
  MODIFY `tagId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de tabela `task`
--
ALTER TABLE `task`
  MODIFY `taskId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT de tabela `transition`
--
ALTER TABLE `transition`
  MODIFY `transitionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de tabela `user`
--
ALTER TABLE `user`
  MODIFY `userId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de tabela `usertype`
--
ALTER TABLE `usertype`
  MODIFY `userTypeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de tabela `widget`
--
ALTER TABLE `widget`
  MODIFY `widgetId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT de tabela `widgethistory`
--
ALTER TABLE `widgethistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Restrições para despejos de tabelas
--

--
-- Limitadores para a tabela `action`
--
ALTER TABLE `action`
  ADD CONSTRAINT `action_ibfk_1` FOREIGN KEY (`ownerId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `bandwidth`
--
ALTER TABLE `bandwidth`
  ADD CONSTRAINT `bandwidth_ibfk_1` FOREIGN KEY (`type`) REFERENCES `bandwidthtype` (`bandwidthTypeId`);

--
-- Limitadores para a tabela `blacklist`
--
ALTER TABLE `blacklist`
  ADD CONSTRAINT `blacklist_ibfk_1` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`),
  ADD CONSTRAINT `blacklist_ibfk_2` FOREIGN KEY (`displayId`) REFERENCES `display` (`displayId`);

--
-- Limitadores para a tabela `campaign`
--
ALTER TABLE `campaign`
  ADD CONSTRAINT `campaign_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `campaign_ibfk_2` FOREIGN KEY (`folderId`) REFERENCES `folder` (`folderId`);

--
-- Limitadores para a tabela `command`
--
ALTER TABLE `command`
  ADD CONSTRAINT `command_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `dataset`
--
ALTER TABLE `dataset`
  ADD CONSTRAINT `dataset_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `dataset_ibfk_2` FOREIGN KEY (`folderId`) REFERENCES `folder` (`folderId`);

--
-- Limitadores para a tabela `datasetcolumn`
--
ALTER TABLE `datasetcolumn`
  ADD CONSTRAINT `datasetcolumn_ibfk_1` FOREIGN KEY (`dataSetId`) REFERENCES `dataset` (`dataSetId`),
  ADD CONSTRAINT `datasetcolumn_ibfk_2` FOREIGN KEY (`dataTypeId`) REFERENCES `datatype` (`dataTypeId`),
  ADD CONSTRAINT `datasetcolumn_ibfk_3` FOREIGN KEY (`dataSetColumnTypeId`) REFERENCES `datasetcolumntype` (`dataSetColumnTypeId`);

--
-- Limitadores para a tabela `datasetrss`
--
ALTER TABLE `datasetrss`
  ADD CONSTRAINT `datasetrss_ibfk_1` FOREIGN KEY (`dataSetId`) REFERENCES `dataset` (`dataSetId`);

--
-- Limitadores para a tabela `daypart`
--
ALTER TABLE `daypart`
  ADD CONSTRAINT `daypart_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `display`
--
ALTER TABLE `display`
  ADD CONSTRAINT `display_ibfk_1` FOREIGN KEY (`displayProfileId`) REFERENCES `displayprofile` (`displayProfileId`);

--
-- Limitadores para a tabela `displaygroup`
--
ALTER TABLE `displaygroup`
  ADD CONSTRAINT `displaygroup_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `displaygroup_ibfk_2` FOREIGN KEY (`folderId`) REFERENCES `folder` (`folderId`);

--
-- Limitadores para a tabela `displayprofile`
--
ALTER TABLE `displayprofile`
  ADD CONSTRAINT `displayprofile_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `layout`
--
ALTER TABLE `layout`
  ADD CONSTRAINT `layout_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `layout_ibfk_2` FOREIGN KEY (`backgroundImageId`) REFERENCES `media` (`mediaId`),
  ADD CONSTRAINT `layout_ibfk_3` FOREIGN KEY (`publishedStatusId`) REFERENCES `status` (`id`);

--
-- Limitadores para a tabela `layouthistory`
--
ALTER TABLE `layouthistory`
  ADD CONSTRAINT `layouthistory_ibfk_1` FOREIGN KEY (`campaignId`) REFERENCES `campaign` (`campaignId`);

--
-- Limitadores para a tabela `lkcampaignlayout`
--
ALTER TABLE `lkcampaignlayout`
  ADD CONSTRAINT `lkcampaignlayout_ibfk_1` FOREIGN KEY (`campaignId`) REFERENCES `campaign` (`campaignId`),
  ADD CONSTRAINT `lkcampaignlayout_ibfk_2` FOREIGN KEY (`layoutId`) REFERENCES `layout` (`layoutId`);

--
-- Limitadores para a tabela `lkcommanddisplayprofile`
--
ALTER TABLE `lkcommanddisplayprofile`
  ADD CONSTRAINT `lkcommanddisplayprofile_ibfk_1` FOREIGN KEY (`commandId`) REFERENCES `command` (`commandId`),
  ADD CONSTRAINT `lkcommanddisplayprofile_ibfk_2` FOREIGN KEY (`displayProfileId`) REFERENCES `displayprofile` (`displayProfileId`);

--
-- Limitadores para a tabela `lkdisplaydg`
--
ALTER TABLE `lkdisplaydg`
  ADD CONSTRAINT `lkdisplaydg_ibfk_1` FOREIGN KEY (`displayGroupId`) REFERENCES `displaygroup` (`displayGroupId`),
  ADD CONSTRAINT `lkdisplaydg_ibfk_2` FOREIGN KEY (`displayId`) REFERENCES `display` (`displayId`);

--
-- Limitadores para a tabela `lklayoutdisplaygroup`
--
ALTER TABLE `lklayoutdisplaygroup`
  ADD CONSTRAINT `lklayoutdisplaygroup_ibfk_1` FOREIGN KEY (`displayGroupId`) REFERENCES `displaygroup` (`displayGroupId`),
  ADD CONSTRAINT `lklayoutdisplaygroup_ibfk_2` FOREIGN KEY (`layoutId`) REFERENCES `layout` (`layoutId`);

--
-- Limitadores para a tabela `lkmediadisplaygroup`
--
ALTER TABLE `lkmediadisplaygroup`
  ADD CONSTRAINT `lkmediadisplaygroup_ibfk_1` FOREIGN KEY (`displayGroupId`) REFERENCES `displaygroup` (`displayGroupId`),
  ADD CONSTRAINT `lkmediadisplaygroup_ibfk_2` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`);

--
-- Limitadores para a tabela `lknotificationdg`
--
ALTER TABLE `lknotificationdg`
  ADD CONSTRAINT `lknotificationdg_ibfk_1` FOREIGN KEY (`notificationId`) REFERENCES `notification` (`notificationId`);

--
-- Limitadores para a tabela `lknotificationgroup`
--
ALTER TABLE `lknotificationgroup`
  ADD CONSTRAINT `lknotificationgroup_ibfk_1` FOREIGN KEY (`notificationId`) REFERENCES `notification` (`notificationId`),
  ADD CONSTRAINT `lknotificationgroup_ibfk_2` FOREIGN KEY (`groupId`) REFERENCES `group` (`groupId`);

--
-- Limitadores para a tabela `lknotificationuser`
--
ALTER TABLE `lknotificationuser`
  ADD CONSTRAINT `lknotificationuser_ibfk_1` FOREIGN KEY (`notificationId`) REFERENCES `notification` (`notificationId`),
  ADD CONSTRAINT `lknotificationuser_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `lkscheduledisplaygroup`
--
ALTER TABLE `lkscheduledisplaygroup`
  ADD CONSTRAINT `lkscheduledisplaygroup_ibfk_1` FOREIGN KEY (`eventId`) REFERENCES `schedule` (`eventId`),
  ADD CONSTRAINT `lkscheduledisplaygroup_ibfk_2` FOREIGN KEY (`displayGroupId`) REFERENCES `displaygroup` (`displayGroupId`);

--
-- Limitadores para a tabela `lktagcampaign`
--
ALTER TABLE `lktagcampaign`
  ADD CONSTRAINT `lktagcampaign_ibfk_1` FOREIGN KEY (`tagId`) REFERENCES `tag` (`tagId`),
  ADD CONSTRAINT `lktagcampaign_ibfk_2` FOREIGN KEY (`campaignId`) REFERENCES `campaign` (`campaignId`);

--
-- Limitadores para a tabela `lktagdisplaygroup`
--
ALTER TABLE `lktagdisplaygroup`
  ADD CONSTRAINT `lktagdisplaygroup_ibfk_1` FOREIGN KEY (`tagId`) REFERENCES `tag` (`tagId`),
  ADD CONSTRAINT `lktagdisplaygroup_ibfk_2` FOREIGN KEY (`displayGroupId`) REFERENCES `displaygroup` (`displayGroupId`);

--
-- Limitadores para a tabela `lktaglayout`
--
ALTER TABLE `lktaglayout`
  ADD CONSTRAINT `lktaglayout_ibfk_1` FOREIGN KEY (`tagId`) REFERENCES `tag` (`tagId`),
  ADD CONSTRAINT `lktaglayout_ibfk_2` FOREIGN KEY (`layoutId`) REFERENCES `layout` (`layoutId`);

--
-- Limitadores para a tabela `lktagmedia`
--
ALTER TABLE `lktagmedia`
  ADD CONSTRAINT `lktagmedia_ibfk_1` FOREIGN KEY (`tagId`) REFERENCES `tag` (`tagId`),
  ADD CONSTRAINT `lktagmedia_ibfk_2` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`);

--
-- Limitadores para a tabela `lktagplaylist`
--
ALTER TABLE `lktagplaylist`
  ADD CONSTRAINT `lktagplaylist_ibfk_1` FOREIGN KEY (`tagId`) REFERENCES `tag` (`tagId`),
  ADD CONSTRAINT `lktagplaylist_ibfk_2` FOREIGN KEY (`playlistId`) REFERENCES `playlist` (`playlistId`);

--
-- Limitadores para a tabela `lkusergroup`
--
ALTER TABLE `lkusergroup`
  ADD CONSTRAINT `lkusergroup_ibfk_1` FOREIGN KEY (`groupId`) REFERENCES `group` (`groupId`),
  ADD CONSTRAINT `lkusergroup_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `lkwidgetaudio`
--
ALTER TABLE `lkwidgetaudio`
  ADD CONSTRAINT `lkwidgetaudio_ibfk_1` FOREIGN KEY (`widgetId`) REFERENCES `widget` (`widgetId`),
  ADD CONSTRAINT `lkwidgetaudio_ibfk_2` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`);

--
-- Limitadores para a tabela `lkwidgetmedia`
--
ALTER TABLE `lkwidgetmedia`
  ADD CONSTRAINT `lkwidgetmedia_ibfk_1` FOREIGN KEY (`widgetId`) REFERENCES `widget` (`widgetId`),
  ADD CONSTRAINT `lkwidgetmedia_ibfk_2` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`);

--
-- Limitadores para a tabela `media`
--
ALTER TABLE `media`
  ADD CONSTRAINT `media_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `media_ibfk_2` FOREIGN KEY (`folderId`) REFERENCES `folder` (`folderId`);

--
-- Limitadores para a tabela `notification`
--
ALTER TABLE `notification`
  ADD CONSTRAINT `notification_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `oauth_clients`
--
ALTER TABLE `oauth_clients`
  ADD CONSTRAINT `oauth_clients_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `permission`
--
ALTER TABLE `permission`
  ADD CONSTRAINT `permission_ibfk_1` FOREIGN KEY (`groupId`) REFERENCES `group` (`groupId`),
  ADD CONSTRAINT `permission_ibfk_2` FOREIGN KEY (`entityId`) REFERENCES `permissionentity` (`entityId`);

--
-- Limitadores para a tabela `player_software`
--
ALTER TABLE `player_software`
  ADD CONSTRAINT `player_software_ibfk_1` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`);

--
-- Limitadores para a tabela `playlist`
--
ALTER TABLE `playlist`
  ADD CONSTRAINT `playlist_ibfk_1` FOREIGN KEY (`ownerId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `playlist_ibfk_2` FOREIGN KEY (`folderId`) REFERENCES `folder` (`folderId`);

--
-- Limitadores para a tabela `region`
--
ALTER TABLE `region`
  ADD CONSTRAINT `region_ibfk_1` FOREIGN KEY (`ownerId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `reportschedule`
--
ALTER TABLE `reportschedule`
  ADD CONSTRAINT `reportschedule_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `requiredfile`
--
ALTER TABLE `requiredfile`
  ADD CONSTRAINT `requiredfile_ibfk_1` FOREIGN KEY (`displayId`) REFERENCES `display` (`displayId`);

--
-- Limitadores para a tabela `resolution`
--
ALTER TABLE `resolution`
  ADD CONSTRAINT `resolution_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `saved_report`
--
ALTER TABLE `saved_report`
  ADD CONSTRAINT `saved_report_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`),
  ADD CONSTRAINT `saved_report_ibfk_2` FOREIGN KEY (`mediaId`) REFERENCES `media` (`mediaId`),
  ADD CONSTRAINT `saved_report_ibfk_3` FOREIGN KEY (`reportScheduleId`) REFERENCES `reportschedule` (`reportScheduleId`);

--
-- Limitadores para a tabela `schedule`
--
ALTER TABLE `schedule`
  ADD CONSTRAINT `schedule_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `scheduleexclusions`
--
ALTER TABLE `scheduleexclusions`
  ADD CONSTRAINT `scheduleexclusions_ibfk_1` FOREIGN KEY (`eventId`) REFERENCES `schedule` (`eventId`);

--
-- Limitadores para a tabela `schedulereminder`
--
ALTER TABLE `schedulereminder`
  ADD CONSTRAINT `schedulereminder_ibfk_1` FOREIGN KEY (`eventId`) REFERENCES `schedule` (`eventId`);

--
-- Limitadores para a tabela `user`
--
ALTER TABLE `user`
  ADD CONSTRAINT `user_ibfk_1` FOREIGN KEY (`userTypeId`) REFERENCES `usertype` (`userTypeId`);

--
-- Limitadores para a tabela `widget`
--
ALTER TABLE `widget`
  ADD CONSTRAINT `widget_ibfk_1` FOREIGN KEY (`playlistId`) REFERENCES `playlist` (`playlistId`),
  ADD CONSTRAINT `widget_ibfk_2` FOREIGN KEY (`ownerId`) REFERENCES `user` (`userId`);

--
-- Limitadores para a tabela `widgethistory`
--
ALTER TABLE `widgethistory`
  ADD CONSTRAINT `widgethistory_ibfk_1` FOREIGN KEY (`layoutHistoryId`) REFERENCES `layouthistory` (`layoutHistoryId`);

--
-- Limitadores para a tabela `widgetoption`
--
ALTER TABLE `widgetoption`
  ADD CONSTRAINT `widgetoption_ibfk_1` FOREIGN KEY (`widgetId`) REFERENCES `widget` (`widgetId`);
COMMIT;

