Merge 'DBIx-Class-current' into 'trunk'
[dbsrgits/DBIx-Class.git] / t / lib / sqlite.sql
index 28e1e76..db76e3b 100644 (file)
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Thu Jun 22 23:07:04 2006
+-- Created on Sun Jul 23 00:23:30 2006
 -- 
 BEGIN TRANSACTION;
 
@@ -23,6 +23,14 @@ CREATE TABLE serialized (
 );
 
 --
+-- Table: liner_notes
+--
+CREATE TABLE liner_notes (
+  liner_id INTEGER PRIMARY KEY NOT NULL,
+  notes varchar(100) NOT NULL
+);
+
+--
 -- Table: cd_to_producer
 --
 CREATE TABLE cd_to_producer (
@@ -32,14 +40,6 @@ CREATE TABLE cd_to_producer (
 );
 
 --
--- Table: liner_notes
---
-CREATE TABLE liner_notes (
-  liner_id INTEGER PRIMARY KEY NOT NULL,
-  notes varchar(100) NOT NULL
-);
-
---
 -- Table: artist
 --
 CREATE TABLE artist (
@@ -48,6 +48,18 @@ CREATE TABLE artist (
 );
 
 --
+-- Table: twokeytreelike
+--
+CREATE TABLE twokeytreelike (
+  id1 integer NOT NULL,
+  id2 integer NOT NULL,
+  parent1 integer NOT NULL,
+  parent2 integer NOT NULL,
+  name varchar(100) NOT NULL,
+  PRIMARY KEY (id1, id2)
+);
+
+--
 -- Table: fourkeys_to_twokeys
 --
 CREATE TABLE fourkeys_to_twokeys (
@@ -62,18 +74,6 @@ CREATE TABLE fourkeys_to_twokeys (
 );
 
 --
--- Table: twokeytreelike
---
-CREATE TABLE twokeytreelike (
-  id1 integer NOT NULL,
-  id2 integer NOT NULL,
-  parent1 integer NOT NULL,
-  parent2 integer NOT NULL,
-  name varchar(100) NOT NULL,
-  PRIMARY KEY (id1, id2)
-);
-
---
 -- Table: self_ref_alias
 --
 CREATE TABLE self_ref_alias (
@@ -111,15 +111,6 @@ CREATE TABLE track (
 );
 
 --
--- Table: treelike
---
-CREATE TABLE treelike (
-  id INTEGER PRIMARY KEY NOT NULL,
-  parent integer NOT NULL,
-  name varchar(100) NOT NULL
-);
-
---
 -- Table: self_ref
 --
 CREATE TABLE self_ref (
@@ -146,6 +137,15 @@ CREATE TABLE tags (
 );
 
 --
+-- Table: treelike
+--
+CREATE TABLE treelike (
+  id INTEGER PRIMARY KEY NOT NULL,
+  parent integer NOT NULL,
+  name varchar(100) NOT NULL
+);
+
+--
 -- Table: event
 --
 CREATE TABLE event (
@@ -203,10 +203,7 @@ CREATE TABLE onekey (
 
 CREATE UNIQUE INDEX tktlnameunique_twokeytreelike on twokeytreelike (name);
 CREATE UNIQUE INDEX cd_artist_title_cd on cd (artist, title);
+CREATE UNIQUE INDEX track_cd_position_track on track (cd, position);
+CREATE UNIQUE INDEX track_cd_title_track on track (cd, title);
 CREATE UNIQUE INDEX prod_name_producer on producer (name);
-CREATE TRIGGER ts_event after insert on event
-begin
-  update event set created_on=timestamp() where id=new.id;
-end;
-
 COMMIT;