-
-
Save dasistdaniel/6c52bc808ae2bea99f49e39c778114ae to your computer and use it in GitHub Desktop.
Vorlage von meiner Datenbank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: `ugxclnyn_hr` | |
-- | |
-- -------------------------------------------------------- | |
-- | |
-- Tabellenstruktur für Tabelle `artists` | |
-- | |
CREATE TABLE `artists` ( | |
`id` int(10) UNSIGNED NOT NULL, | |
`artist` varchar(255) NOT NULL, | |
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
-- -------------------------------------------------------- | |
-- | |
-- Tabellenstruktur für Tabelle `playlist` | |
-- | |
CREATE TABLE `playlist` ( | |
`id` int(10) UNSIGNED NOT NULL, | |
`dtplayed` datetime NOT NULL, | |
`station_id` int(10) UNSIGNED NOT NULL, | |
`song_id` int(10) UNSIGNED NOT NULL, | |
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
-- -------------------------------------------------------- | |
-- | |
-- Tabellenstruktur für Tabelle `songs` | |
-- | |
CREATE TABLE `songs` ( | |
`id` int(10) UNSIGNED NOT NULL, | |
`artist_id` int(10) UNSIGNED NOT NULL, | |
`title_id` int(10) UNSIGNED NOT NULL, | |
`playcount` int(10) UNSIGNED NOT NULL, | |
`disabled` tinyint(1) NOT NULL, | |
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
-- -------------------------------------------------------- | |
-- | |
-- Tabellenstruktur für Tabelle `stations` | |
-- | |
CREATE TABLE `stations` ( | |
`id` int(10) UNSIGNED NOT NULL, | |
`shortname` varchar(128) NOT NULL, | |
`fullname` varchar(255) NOT NULL, | |
`urlhomepage` varchar(255) NOT NULL, | |
`urlplaylisturl` varchar(255) NOT NULL, | |
`station_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`sation_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
-- -------------------------------------------------------- | |
-- | |
-- Tabellenstruktur für Tabelle `titles` | |
-- | |
CREATE TABLE `titles` ( | |
`id` int(10) UNSIGNED NOT NULL, | |
`title` varchar(255) NOT NULL, | |
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
-- | |
-- Indizes der exportierten Tabellen | |
-- | |
-- | |
-- Indizes für die Tabelle `artists` | |
-- | |
ALTER TABLE `artists` | |
ADD PRIMARY KEY (`id`), | |
ADD UNIQUE KEY `artist` (`artist`); | |
-- | |
-- Indizes für die Tabelle `playcounts_old` | |
-- | |
ALTER TABLE `playcounts_old` | |
ADD PRIMARY KEY (`id`); | |
-- | |
-- Indizes für die Tabelle `playlist` | |
-- | |
ALTER TABLE `playlist` | |
ADD PRIMARY KEY (`id`); | |
-- | |
-- Indizes für die Tabelle `songs` | |
-- | |
ALTER TABLE `songs` | |
ADD PRIMARY KEY (`id`,`artist_id`,`title_id`); | |
-- | |
-- Indizes für die Tabelle `stations` | |
-- | |
ALTER TABLE `stations` | |
ADD PRIMARY KEY (`id`), | |
ADD UNIQUE KEY `shortname` (`shortname`); | |
-- | |
-- Indizes für die Tabelle `titles` | |
-- | |
ALTER TABLE `titles` | |
ADD PRIMARY KEY (`id`), | |
ADD UNIQUE KEY `title` (`title`); | |
-- | |
-- AUTO_INCREMENT für exportierte Tabellen | |
-- | |
-- | |
-- AUTO_INCREMENT für Tabelle `artists` | |
-- | |
ALTER TABLE `artists` | |
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; | |
-- | |
-- AUTO_INCREMENT für Tabelle `playlist` | |
-- | |
ALTER TABLE `playlist` | |
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; | |
-- | |
-- AUTO_INCREMENT für Tabelle `songs` | |
-- | |
ALTER TABLE `songs` | |
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; | |
-- | |
-- AUTO_INCREMENT für Tabelle `stations` | |
-- | |
ALTER TABLE `stations` | |
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; | |
-- | |
-- AUTO_INCREMENT für Tabelle `titles` | |
-- | |
ALTER TABLE `titles` | |
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; | |
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 */; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment