From a6bbef0937649cd92a4b378a8454a96e6110bd99 Mon Sep 17 00:00:00 2001
From: yo mama <pepper@scannerjammer.com>
Date: Mon, 23 Mar 2015 15:57:36 -0700
Subject: moved things around

---
 database/manytomany_sqlite.sql | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 database/manytomany_sqlite.sql

(limited to 'database/manytomany_sqlite.sql')

diff --git a/database/manytomany_sqlite.sql b/database/manytomany_sqlite.sql
new file mode 100644
index 0000000..2546b5f
--- /dev/null
+++ b/database/manytomany_sqlite.sql
@@ -0,0 +1,16 @@
+CREATE TABLE cds(
+    id INTEGER PRIMARY KEY NOT NULL,
+    title TEXT NOT NULL
+);
+CREATE TABLE artists(
+    id INTEGER PRIMARY KEY NOT NULL,
+    name TEXT NOT NULL
+);
+CREATE TABLE cds_and_artists(
+    cds_id INTEGER,
+    artists_id INTEGER,
+    FOREIGN KEY(cds_id) REFERENCES cds(id) ON DELETE CASCADE,
+    FOREIGN KEY(artists_id) REFERENCES artists(id) ON DELETE CASCADE
+);
+CREATE INDEX cdsindex ON cds_and_artists(cds_id);
+CREATE INDEX artistsindex ON cds_and_artists(artists_id);
-- 
cgit v1.2.3-70-g09d2

