-- phpMyAdmin SQL Dump
-- version 5.0.4deb2+deb11u1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Erstellungszeit: 08. Nov 2022 um 11:30
-- Server-Version: 8.0.30
-- PHP-Version: 7.4.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Datenbank: `andregeissler_bikeparts`
--

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

--
-- Tabellenstruktur für Tabelle `activities`
--

CREATE TABLE `activities` (
  `a_id` tinyint NOT NULL,
  `a_set` text COLLATE latin1_german1_ci NOT NULL,
  `a_name` text COLLATE latin1_german1_ci NOT NULL,
  `a_activity` text COLLATE latin1_german1_ci NOT NULL,
  `a_distance` text CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,
  `a_duration` text CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

--
-- Daten für Tabelle `activities`
--

INSERT INTO `activities` (`a_id`, `a_set`, `a_name`, `a_activity`, `a_distance`, `a_duration`) VALUES
(6, '', '', '9863521014', '', ''),
(7, '', '', '9793580237', '', ''),
(8, '', '', '9793947540', '', ''),
(9, '', '', '9794120404', '', ''),
(10, '', '', '9794257062', '', ''),
(12, '', '', '9805106858', '', ''),
(13, '', '', '9810963026', '', ''),
(14, '', '', '9811038039', '', ''),
(15, '', '', '9815506899', '', ''),
(16, '', '', '9817421618', '', ''),
(17, '', '', '9823500557', '', ''),
(18, '', '', '9829123183', '', ''),
(19, '', '', '9829196716', '', ''),
(20, '', '', '9835567046', '', ''),
(21, '', '', '9834485034', '', ''),
(22, '', '', '9835645067', '', ''),
(23, '', '', '9835842999', '', ''),
(24, '', '', '9836734225', '', ''),
(25, '', '', '9836983551', '', ''),
(26, '', '', '9844120666', '', ''),
(27, '', '', '9847991670', '', ''),
(28, '', '', '9851137978', '', ''),
(29, '', '', '9855412514', '', ''),
(30, '', '', '9855413000', '', ''),
(31, '', '', '9857424702', '', ''),
(32, '', '', '9860098564', '', ''),
(33, '', '', '9865325891', '', ''),
(35, '', '', '9800683564', '', ''),
(36, '', '', '9866146873', '', ''),
(37, '', '', '9867936351', '', ''),
(38, '', '', '9868212498', '', ''),
(39, '', '', '9851137977', '', ''),
(40, '', '', '9869478622', '', ''),
(41, '', '', '9871925456', '', ''),
(42, '', '', '9874991186', '', ''),
(43, '', '', '9888656375', '', ''),
(44, '', '', '9900486250', '', ''),
(45, '', '', '9900844604', '', ''),
(46, '', '', '9912499818', '', ''),
(47, '', '', '9912802788', '', ''),
(48, '', '', '9920774522', '', ''),
(49, '', '', '9921252629', '', ''),
(50, '', '', '9924139597', '', ''),
(51, 'indoor', 'Lustrafjord - Stage 2_indoor_', '9936023568', '33875.36', '4048.964');

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

--
-- Tabellenstruktur für Tabelle `maintenance`
--

CREATE TABLE `maintenance` (
  `m_id` tinyint NOT NULL,
  `m_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `p_id` tinyint DEFAULT NULL,
  `p_name` text CHARACTER SET latin1 COLLATE latin1_german1_ci,
  `p_text` text CHARACTER SET latin1 COLLATE latin1_german1_ci,
  `p_t_id` tinyint DEFAULT NULL,
  `p_time` text CHARACTER SET latin1 COLLATE latin1_german1_ci,
  `p_max_time` text CHARACTER SET latin1 COLLATE latin1_german1_ci,
  `p_distance` text CHARACTER SET latin1 COLLATE latin1_german1_ci,
  `p_max_distance` text CHARACTER SET latin1 COLLATE latin1_german1_ci,
  `p_start_date` text COLLATE latin1_german1_ci,
  `p_end_date` text COLLATE latin1_german1_ci,
  `p_inactive` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

--
-- Daten für Tabelle `maintenance`
--

INSERT INTO `maintenance` (`m_id`, `m_date`, `p_id`, `p_name`, `p_text`, `p_t_id`, `p_time`, `p_max_time`, `p_distance`, `p_max_distance`, `p_start_date`, `p_end_date`, `p_inactive`) VALUES
(33, '2022-11-05 22:44:41', 26, 'Di2 Akku', 'Di2 Akku', 17, '11602.71', '', '95250.92', '', '2022-11-01 23:07:00', '', 0);

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

--
-- Tabellenstruktur für Tabelle `parts`
--

CREATE TABLE `parts` (
  `p_id` tinyint NOT NULL,
  `p_name` text CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,
  `p_text` text CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,
  `p_t_id` tinyint NOT NULL,
  `p_time` text COLLATE latin1_german1_ci,
  `p_max_time` text COLLATE latin1_german1_ci,
  `p_distance` text COLLATE latin1_german1_ci,
  `p_max_distance` text COLLATE latin1_german1_ci,
  `p_start_date` text COLLATE latin1_german1_ci,
  `p_end_date` text COLLATE latin1_german1_ci,
  `p_inactive` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

--
-- Daten für Tabelle `parts`
--

INSERT INTO `parts` (`p_id`, `p_name`, `p_text`, `p_t_id`, `p_time`, `p_max_time`, `p_distance`, `p_max_distance`, `p_start_date`, `p_end_date`, `p_inactive`) VALUES
(7, 'Rennrad', 'Opelit Feldberg Müsing Aviator', 9, '46123.214', NULL, '2333999.38', NULL, '2021-09-25', NULL, 0),
(8, 'MTB', 'Giant Terrago 2', 9, '0', NULL, '7738100', NULL, '2013-01-01', NULL, 0),
(9, 'Cross', 'Merida Crossway XT-Edition', 9, '28580.99', NULL, '16857856.55', NULL, '2019-07-31', NULL, 0),
(10, 'CS-105', 'Shimano CS-R7000-11 11-30T', 5, '39103.414', NULL, '419099.38', NULL, '2022-09-24', NULL, 0),
(11, 'CS-Ultegra', 'Shimano CS-R8000-11 11-30T', 5, '7019.77', NULL, '1921300', NULL, '2022-06-28', NULL, 0),
(12, 'CS-XT', 'Shimano CS-HG500-10 11-34T', 5, '33749.39', NULL, '3218792.97', NULL, '2022-03-14', NULL, 0),
(13, 'CN-Ultegra', 'Shimano CN-HG701-11', 11, '46123.214', NULL, '2340499.38', NULL, '2022-06-28', NULL, 0),
(14, 'CN-XT', 'Shimano CN-HG54-10', 11, '33749.39', NULL, '3218792.97', NULL, '2022-03-14', NULL, 0),
(15, 'Vortex', 'Tacx Vortex Smart', 8, '39103.414', NULL, '3991399.38', NULL, '2020-12-18', NULL, 0),
(16, 'Tacx Reifen', 'Tacx Indoor Reifen', 4, '39103.414', NULL, '419099.38', NULL, '2022-09-24', NULL, 0),
(17, 'Rennradschuhe  1', 'Northwave Core Plus 2 weiss', 7, '46123.214', NULL, '5253899.38', NULL, '2021-10-02', NULL, 0),
(18, 'MTB Schuhe 1', 'Northwave schwarz', 7, '0', NULL, '0', NULL, NULL, NULL, 0),
(19, 'Edge 530', 'Garmin Edge 530', 15, '6696.348', NULL, '34592.47', NULL, NULL, NULL, 0),
(20, 'Wahoo Cad', 'Wahoo Cadence Sensor', 14, '28327.214', NULL, '230899.38', NULL, NULL, NULL, 0),
(21, 'Wahoo Cad Bat', 'Cadence Sensor Batterie', 16, '28327.214', NULL, '230899.38', NULL, NULL, NULL, 0),
(22, 'Heart Rate Bat', 'Heart Rate Sensor Batterie', 16, '28327.214', NULL, '230899.38', NULL, NULL, NULL, 0),
(23, 'Heart Rate', 'Heart Rate Sensor', 12, '28327.214', NULL, '230899.38', NULL, NULL, NULL, 0),
(24, 'Wahoo Speed', 'Wahoo Speed Sensor', 13, NULL, NULL, NULL, NULL, NULL, NULL, 0),
(25, 'Wahoo Speed Bat', 'Speed Sensor Batterie', 16, NULL, NULL, NULL, NULL, NULL, NULL, 0),
(26, 'Di2 Akku', 'Di2 Akku', 17, '16724.504', NULL, '135648.46', NULL, '2022-11-05 22:44:00', NULL, 0);

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

--
-- Tabellenstruktur für Tabelle `sets`
--

CREATE TABLE `sets` (
  `s_id` tinyint NOT NULL,
  `s_name` text COLLATE latin1_german1_ci NOT NULL,
  `s_text` text COLLATE latin1_german1_ci NOT NULL,
  `s_p_ids` text COLLATE latin1_german1_ci NOT NULL,
  `s_inactive` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

--
-- Daten für Tabelle `sets`
--

INSERT INTO `sets` (`s_id`, `s_name`, `s_text`, `s_p_ids`, `s_inactive`) VALUES
(1, 'mdrza', 'Fahrten zur Arbeit', '9,12,14,19,', 0),
(2, 'indoor', 'Indoor Training', '7,10,13,15,16,17,20,21,22,23,26,', 0),
(3, 'rennrad', 'Outdoor Rennrad', '7,11,13,17,19,20,21,22,23,24,25,26,', 0),
(4, 'mdrddg', 'Einkauf etc', '9,12,14,19,', 0),
(5, 'outdoor', 'Outdoor Rennrad', '7,11,13,17,19,20,21,22,23,24,25,26,', 0),
(6, 'manual', 'manuelle Zuordnung', '', 0);

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

--
-- Tabellenstruktur für Tabelle `types`
--

CREATE TABLE `types` (
  `t_id` tinyint NOT NULL,
  `t_name` text COLLATE latin1_german1_ci NOT NULL,
  `t_text` text CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,
  `t_inactive` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

--
-- Daten für Tabelle `types`
--

INSERT INTO `types` (`t_id`, `t_name`, `t_text`, `t_inactive`) VALUES
(1, 'Felge, vorne', 'Vorderradfelgen', 0),
(2, 'Felge, hinten', 'Hinerradfelgen', 0),
(3, 'Reifen, vorne', 'Vorderradreifen', 0),
(4, 'Reifen, hinten', 'Hinterradreifen', 0),
(5, 'Kassette', 'Ritzelpakete', 0),
(6, 'Kurbel', 'Kurbelsätze', 0),
(7, 'Schuh', 'Schuhpaare', 0),
(8, 'Trainer', 'Indoortrainer', 0),
(9, 'Fahrrad', 'Fahrräder', 0),
(10, 'Lenkerband', 'Lenkerband', 0),
(11, 'Kette', 'Kette', 0),
(12, 'Heart Rate', 'Herzfrequenzsensor', 0),
(13, 'Speed', 'Geschwindigkeitssensor', 0),
(14, 'Cadence', 'Trittfrequenzsensor', 0),
(15, 'Computer', 'Fahrradcomputer', 0),
(16, 'CR2032', 'Batterie', 0),
(17, 'Akku', 'Akku', 0);

--
-- Indizes der exportierten Tabellen
--

--
-- Indizes für die Tabelle `activities`
--
ALTER TABLE `activities`
  ADD PRIMARY KEY (`a_id`);

--
-- Indizes für die Tabelle `maintenance`
--
ALTER TABLE `maintenance`
  ADD PRIMARY KEY (`m_id`);

--
-- Indizes für die Tabelle `parts`
--
ALTER TABLE `parts`
  ADD PRIMARY KEY (`p_id`);

--
-- Indizes für die Tabelle `sets`
--
ALTER TABLE `sets`
  ADD PRIMARY KEY (`s_id`);

--
-- Indizes für die Tabelle `types`
--
ALTER TABLE `types`
  ADD PRIMARY KEY (`t_id`);

--
-- AUTO_INCREMENT für exportierte Tabellen
--

--
-- AUTO_INCREMENT für Tabelle `activities`
--
ALTER TABLE `activities`
  MODIFY `a_id` tinyint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

--
-- AUTO_INCREMENT für Tabelle `maintenance`
--
ALTER TABLE `maintenance`
  MODIFY `m_id` tinyint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT für Tabelle `parts`
--
ALTER TABLE `parts`
  MODIFY `p_id` tinyint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT für Tabelle `sets`
--
ALTER TABLE `sets`
  MODIFY `s_id` tinyint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT für Tabelle `types`
--
ALTER TABLE `types`
  MODIFY `t_id` tinyint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
