Fix two aliasing bugs: remove the alias when provided to new_result and add the alias...
[dbsrgits/DBIx-Class.git] / t / lib / sqlite.sql
index 81d56ae..5846973 100644 (file)
@@ -1,25 +1,25 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Fri Mar 24 07:13:26 2006
+-- Created on Fri Aug  4 19:03:21 2006
 -- 
 BEGIN TRANSACTION;
 
 --
--- Table: serialized
+-- Table: employee
 --
-CREATE TABLE serialized (
-  id INTEGER PRIMARY KEY NOT NULL,
-  serialized text NOT NULL
+CREATE TABLE employee (
+  employee_id INTEGER PRIMARY KEY NOT NULL,
+  position integer NOT NULL,
+  group_id integer,
+  name varchar(100)
 );
 
 --
--- Table: employees_adjacencylist
+-- Table: serialized
 --
-CREATE TABLE employees_adjacencylist (
-  employee_id INTEGER PRIMARY KEY NOT NULL,
-  parent_id integer NOT NULL,
-  position integer,
-  name varchar(100)
+CREATE TABLE serialized (
+  id INTEGER PRIMARY KEY NOT NULL,
+  serialized text NOT NULL
 );
 
 --
@@ -44,10 +44,45 @@ CREATE TABLE cd_to_producer (
 --
 CREATE TABLE artist (
   artistid INTEGER PRIMARY KEY NOT NULL,
+  agent integer,
   name varchar(100)
 );
 
 --
+-- Table: label
+--
+CREATE TABLE label (
+  labelid INTEGER PRIMARY KEY NOT NULL,
+  name varchar(100)
+);
+
+--
+-- 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 (
+  f_foo integer NOT NULL,
+  f_bar integer NOT NULL,
+  f_hello integer NOT NULL,
+  f_goodbye integer NOT NULL,
+  t_artist integer NOT NULL,
+  t_cd integer NOT NULL,
+  autopilot character NOT NULL,
+  PRIMARY KEY (f_foo, f_bar, f_hello, f_goodbye, t_artist, t_cd)
+);
+
+--
 -- Table: self_ref_alias
 --
 CREATE TABLE self_ref_alias (
@@ -67,6 +102,14 @@ CREATE TABLE cd (
 );
 
 --
+-- Table: bookmark
+--
+CREATE TABLE bookmark (
+  id INTEGER PRIMARY KEY NOT NULL,
+  link integer NOT NULL
+);
+
+--
 -- Table: track
 --
 CREATE TABLE track (
@@ -94,6 +137,24 @@ CREATE TABLE tags (
 );
 
 --
+-- Table: agent
+--
+CREATE TABLE agent (
+  agentid INTEGER PRIMARY KEY NOT NULL,
+  label integer NOT NULL,
+  name varchar(100)
+);
+
+--
+-- Table: link
+--
+CREATE TABLE link (
+  id INTEGER PRIMARY KEY NOT NULL,
+  url varchar(100),
+  title varchar(100)
+);
+
+--
 -- Table: treelike
 --
 CREATE TABLE treelike (
@@ -103,6 +164,15 @@ CREATE TABLE treelike (
 );
 
 --
+-- Table: event
+--
+CREATE TABLE event (
+  id INTEGER PRIMARY KEY NOT NULL,
+  starts_at datetime NOT NULL,
+  created_on timestamp NOT NULL
+);
+
+--
 -- Table: twokeys
 --
 CREATE TABLE twokeys (
@@ -112,13 +182,12 @@ CREATE TABLE twokeys (
 );
 
 --
--- Table: employees_positional
+-- Table: noprimarykey
 --
-CREATE TABLE employees_positional (
-  employee_id INTEGER PRIMARY KEY NOT NULL,
-  position integer NOT NULL,
-  group_id integer,
-  name varchar(100)
+CREATE TABLE noprimarykey (
+  foo integer NOT NULL,
+  bar integer NOT NULL,
+  baz integer NOT NULL
 );
 
 --
@@ -129,6 +198,7 @@ CREATE TABLE fourkeys (
   bar integer NOT NULL,
   hello integer NOT NULL,
   goodbye integer NOT NULL,
+  sensors character NOT NULL,
   PRIMARY KEY (foo, bar, hello, goodbye)
 );
 
@@ -158,4 +228,10 @@ CREATE TABLE onekey (
   cd integer NOT NULL
 );
 
+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 foo_bar_noprimarykey on noprimarykey (foo, bar);
+CREATE UNIQUE INDEX prod_name_producer on producer (name);
 COMMIT;