Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix the order of SQL create statements

  • Loading branch information...
commit 8077131dbe9b91fd07bacc371cc775441ecad85b 1 parent 1325107
@jhurliman authored
Showing with 13 additions and 13 deletions.
  1. +13 −13 mysql.sql
View
26 mysql.sql
@@ -12,19 +12,6 @@ CREATE TABLE IF NOT EXISTS `artists` (
-- --------------------------------------------------------
--
--- Table structure for table `codes`
---
-
-CREATE TABLE IF NOT EXISTS `codes` (
- `code` int(7) NOT NULL,
- `time` int(7) NOT NULL,
- `track_id` char(16) NOT NULL,
- PRIMARY KEY (`code`,`time`,`track_id`),
- FOREIGN KEY (`track_id`) REFERENCES `tracks`(`id`) ON DELETE CASCADE
-) DEFAULT CHARSET=utf8;
-
--- --------------------------------------------------------
---
-- Table structure for table `tracks`
--
@@ -38,3 +25,16 @@ CREATE TABLE IF NOT EXISTS `tracks` (
PRIMARY KEY (`id`,`codever`),
FOREIGN KEY (`artist_id`) REFERENCES `artists`(`id`) ON DELETE CASCADE
) DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+--
+-- Table structure for table `codes`
+--
+
+CREATE TABLE IF NOT EXISTS `codes` (
+ `code` int(7) NOT NULL,
+ `time` int(7) NOT NULL,
+ `track_id` char(16) NOT NULL,
+ PRIMARY KEY (`code`,`time`,`track_id`),
+ FOREIGN KEY (`track_id`) REFERENCES `tracks`(`id`) ON DELETE CASCADE
+) DEFAULT CHARSET=utf8;
Please sign in to comment.
Something went wrong with that request. Please try again.