-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server-Version:               5.5.62-0+deb8u1-log - (Debian)
-- Server-Betriebssystem:        debian-linux-gnu
-- HeidiSQL Version:             12.17.0.7270
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Exportiere Struktur von Tabelle roledashboard.rollen
CREATE TABLE IF NOT EXISTS `rollen` (
  `rollenID` int(11) NOT NULL AUTO_INCREMENT,
  `bezeichnung` varchar(200) DEFAULT NULL,
  `link` varchar(500) DEFAULT NULL,
  `min_aktiv` int(11) DEFAULT NULL,
  `kpi_link` varchar(300) DEFAULT NULL,
  `performance_kpi_link` varchar(300) DEFAULT NULL,
  `deactivated` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`rollenID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

-- Exportiere Daten aus Tabelle roledashboard.rollen: ~20 rows (ungefähr)
DELETE FROM `rollen`;
INSERT INTO `rollen` (`rollenID`, `bezeichnung`, `link`, `min_aktiv`, `kpi_link`, `performance_kpi_link`, `deactivated`) VALUES
	(1, 'Auftragsabwicklung', 'https://www.notion.so/Auftragsabwicklung-inkl-Leasing-cdd06988567c4ce79172ed377560af34?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_auftragsabwicklung', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_auftragsabwicklung', 0),
	(2, 'Buchhaltung', 'https://www.notion.so/Buchhaltung-inkl-Monatsabschluss-Support-387ef188ddeb48869615a15fd1f69c2c?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_bookkeeping', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_buchhaltung', 0),
	(3, 'Einkauf', 'https://www.notion.so/Einkauf-9dd27afbb2234c8ebb062af92afaf8ee?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_einkauf', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_einkauf', 0),
	(4, 'IT-Unterstützung', 'https://www.notion.so/Entwicklung-intern-auch-Tutorials-be549c03bc834947ad77d91cc93f6e73?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_internalit', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_internalit', 1),
	(5, 'Entwicklung Portal', 'https://www.notion.so/Entwicklung-Portal-39b32762f7b445bdb96fb2bfc8fb5306?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_dev_portal', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_entwicklungportal', 0),
	(6, 'Erstkontakt-Support', 'https://www.notion.so/Erstkontakt-Support-f2a979c087694f688fd2d3401ab7eeae?pvs=4', 1, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_support_erstkontakt_duetickets', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_erstkontaktsupport', 0),
	(7, 'Lager', 'https://www.notion.so/Lager-3180f103aa2349a5a14a2b334603b4ae?pvs=4', 1, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_storage_purchaseorders', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_lager', 0),
	(8, 'Mediaplanung', 'https://www.notion.so/Mediaplanung-1400f7c9bc394dd897a03c9eccf834e6?pvs=4', 1, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_support_mediaplanung_duetickets', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_mediaplanung', 0),
	(9, 'OPOS-Bearbeitung', 'https://www.notion.so/OPOS-Bearbeitung-733acb0061f64008bdf66291a7af35c7?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_opos_debtorcount', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_opos', 0),
	(10, 'Personal-Unterstützung', 'https://www.notion.so/Personal-Unterst-tzung-Krankmeldungen-Urlaubsbearbeitung-etc-cfe4625fb33346c0ab23545bb1413c7c?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_personal', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_personal', 0),
	(11, 'Produktion', 'https://www.notion.so/Produktion-2e3b6c7bd8954fb48f553160b079700f?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_production_redorders', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_produktion', 0),
	(12, 'QM-Support', 'https://www.notion.so/QM-Support-3e684c86cd75445b951e1419eb4e7bf1?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_support_qmtotaltickets', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_qm', 0),
	(13, 'Technik-Support', 'https://www.notion.so/Technik-Support-67c8f31c2c4a49a5bfea7c1706b6da30?pvs=4', 1, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_support_technic', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_techniksupport', 0),
	(14, 'Versandauftrag versenden', 'https://www.notion.so/Versandauftrag-versenden-f8de71a6b52347d98e75f063167318ff?pvs=4', 1, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_orderstosend', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_versandauftragversenden', 0),
	(15, 'Vertrieb-Abschlüsse', 'https://www.notion.so/Vertrieb-Abschl-sse-f150798860ec44d7a71aac25c9409549?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_salespotentials_closed', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_vertriebabschluesse', 0),
	(16, 'Vertrieb-Termingewinnung', 'https://www.notion.so/Vertrieb-Termingewinnung-0cdf98cbeaae4545b7fa6f8a6f724a72?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_sales_appointments', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_vertriebtermingewinnung', 0),
	(17, 'VOE-Monteur', 'https://www.notion.so/VOE-Monteur-d091c0520dc44175aa26d74b11812a2d?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_voe_successful', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_voemonteur', 0),
	(18, 'VOE-Projektmanagement', 'https://www.notion.so/VOE-Projektmanagement-e116d6e091784d06b3c7872ca4d6ce16?pvs=4', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_voe_successful', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_voeprojektmanagement', 0),
	(19, 'Führungsteam', 'https://www.notion.so/F-hrungsteam-19e1feb32dfc806f931fc1413d2e01cd', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_fuehrungsteam', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_fuehrungsteam', 0),
	(20, 'Abrechnung', 'https://www.notion.so/Abrechnung-2cb1feb32dfc80e4bf31d728d4daeecf?source=copy_link', 0, 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=kpi_role_abrechnung', 'http://datawarehouse.simpledsbackend.de/api.php?method=getdata&token=912zh5tgh15123&datarequest=performancekpi_role_abrechnung', 0);

-- Exportiere Struktur von Tabelle roledashboard.rollenzuweisung
CREATE TABLE IF NOT EXISTS `rollenzuweisung` (
  `zuweisungsID` int(11) NOT NULL AUTO_INCREMENT,
  `rollenID` int(11) DEFAULT NULL,
  `personenID` int(11) DEFAULT NULL,
  `zuweisungstyp` enum('F','I','U1','U2','U3','K','V') DEFAULT NULL,
  `aktiv` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`zuweisungsID`)
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=latin1;

-- Exportiere Daten aus Tabelle roledashboard.rollenzuweisung: ~117 rows (ungefähr)
DELETE FROM `rollenzuweisung`;
INSERT INTO `rollenzuweisung` (`zuweisungsID`, `rollenID`, `personenID`, `zuweisungstyp`, `aktiv`) VALUES
	(2, 1, 5, 'I', 0),
	(4, 2, 5, 'I', 0),
	(6, 3, 5, 'I', 0),
	(8, 4, 6, 'I', 0),
	(10, 5, 2, 'I', 0),
	(12, 6, 18, 'U1', 1),
	(16, 7, 19, 'I', 0),
	(20, 8, 6, 'I', 0),
	(23, 9, 5, 'U1', 0),
	(25, 10, 5, 'I', 0),
	(27, 11, 19, 'I', 0),
	(29, 11, 6, 'U2', 0),
	(31, 12, 13, 'I', 0),
	(33, 12, 6, 'U2', 0),
	(35, 13, 6, 'I', 0),
	(38, 14, 19, 'I', 0),
	(42, 15, 3, 'I', 1),
	(44, 16, 8, 'I', 0),
	(47, 17, 19, 'I', 0),
	(49, 17, 6, 'U2', 0),
	(51, 18, 13, 'I', 0),
	(53, 8, 18, 'I', 1),
	(55, 1, 3, 'U2', 0),
	(56, 13, 18, 'I', 1),
	(60, 5, 6, 'V', 0),
	(61, 6, 3, 'V', 0),
	(62, 19, 3, 'V', 0),
	(64, 8, 8, 'V', 0),
	(65, 6, 6, 'V', 0),
	(66, 2, 6, 'V', 0),
	(67, 11, 13, 'V', 0),
	(69, 8, 13, 'V', 0),
	(70, 12, 3, 'V', 1),
	(72, 13, 13, 'V', 0),
	(74, 19, 2, 'V', 0),
	(75, 13, 2, 'V', 0),
	(76, 1, 2, 'V', 0),
	(77, 3, 3, 'U2', 0),
	(78, 10, 2, 'V', 0),
	(79, 5, 1, 'V', 0),
	(80, 7, 18, 'V', 0),
	(81, 14, 5, 'V', 0),
	(82, 1, 20, 'U1', 0),
	(83, 2, 20, 'U1', 0),
	(84, 3, 20, 'U1', 0),
	(85, 9, 20, 'U1', 0),
	(86, 10, 20, 'U1', 0),
	(87, 7, 5, 'V', 0),
	(88, 7, 6, 'V', 0),
	(90, 17, 21, 'I', 0),
	(92, 8, 1, 'V', 0),
	(94, 1, 6, 'V', 0),
	(95, 3, 6, 'V', 0),
	(96, 9, 6, 'V', 0),
	(97, 10, 6, 'V', 0),
	(98, 1, 1, 'V', 0),
	(99, 16, 20, 'V', 0),
	(100, 14, 6, 'V', 0),
	(101, 14, 3, 'V', 0),
	(102, 7, 1, 'V', 0),
	(103, 6, 2, 'V', 0),
	(104, 19, 1, 'V', 0),
	(105, 11, 22, 'I', 1),
	(106, 17, 22, 'I', 0),
	(109, 18, 3, 'V', 1),
	(110, 16, 6, 'V', 0),
	(111, 8, 3, 'V', 0),
	(112, 17, 13, 'V', 0),
	(116, 16, 23, 'U1', 0),
	(118, 7, 22, 'I', 1),
	(119, 14, 22, 'I', 1),
	(120, 15, 22, 'V', 0),
	(121, 8, 2, 'V', 0),
	(122, 13, 23, 'V', 0),
	(123, 6, 24, 'U2', 0),
	(124, 18, 5, 'V', 0),
	(125, 7, 2, 'V', 0),
	(126, 7, 3, 'V', 0),
	(127, 12, 2, 'V', 0),
	(128, 16, 2, 'V', 0),
	(129, 15, 25, 'U1', 0),
	(130, 16, 25, 'U2', 0),
	(132, 14, 2, 'V', 0),
	(133, 9, 2, 'V', 0),
	(134, 14, 8, 'V', 0),
	(135, 16, 13, 'V', 0),
	(136, 13, 22, 'V', 0),
	(137, 19, 6, 'V', 0),
	(138, 2, 22, 'V', 0),
	(139, 9, 26, 'I', 0),
	(140, 20, 26, 'I', 0),
	(141, 2, 26, 'U1', 0),
	(142, 7, 24, 'V', 0),
	(143, 6, 27, 'I', 0),
	(144, 8, 5, 'V', 0),
	(145, 17, 18, 'V', 0),
	(147, 13, 3, 'V', 0),
	(148, 1, 22, 'V', 0),
	(149, 17, 25, 'V', 0),
	(152, 11, 5, 'V', 0),
	(153, 7, 27, 'V', 0),
	(154, 2, 3, 'V', 0),
	(155, 9, 3, 'V', 0),
	(156, 10, 3, 'V', 0),
	(157, 14, 18, 'U3', 0),
	(159, 8, 27, 'U1', 0),
	(160, 14, 24, 'U1', 0),
	(161, 14, 13, 'V', 0),
	(162, 14, 28, 'U2', 0),
	(163, 7, 28, 'U1', 0),
	(164, 11, 28, 'U1', 0),
	(165, 13, 28, 'V', 0),
	(166, 13, 27, 'V', 0),
	(167, 6, 28, 'V', 0),
	(168, 8, 28, 'V', 0),
	(169, 8, 22, 'V', 0),
	(170, 6, 22, 'V', 0);

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
