CREATE TABLE `lsp` (  `lsp_id` int(11) NOT NULL,  `device_id` int(11) NOT NULL,  `lsp_mib` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,  `lsp_index` varchar(64) CHARACTER SET utf8 NOT NULL,  `lsp_name` varchar(64) CHARACTER SET utf8 NOT NULL,  `lsp_state` enum('unknown','up','down','notInService','backupActive') COLLATE utf8_unicode_ci DEFAULT 'unknown',  `lsp_proto` varchar(32) CHARACTER SET utf8 NOT NULL,  `lsp_uptime` int(11) UNSIGNED NOT NULL,  `lsp_total_uptime` int(11) UNSIGNED NOT NULL,  `lsp_primary_uptime` int(11) UNSIGNED NOT NULL,  `lsp_polled` int(11) UNSIGNED NOT NULL,  `lsp_octets` bigint(20) NOT NULL,  `lsp_octets_rate` bigint(20) NOT NULL,  `lsp_packets` bigint(20) NOT NULL,  `lsp_packets_rate` bigint(20) NOT NULL,  `lsp_bandwidth` bigint(20) NOT NULL DEFAULT '0',  `lsp_transitions` int(11) NOT NULL,  `lsp_path_changes` int(11) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `lsp`  ADD PRIMARY KEY (`lsp_id`),  ADD UNIQUE KEY `index_unique` (`device_id`,`lsp_mib`,`lsp_index`),  ADD KEY `device_id` (`device_id`);
