From: Jess Robinson Date: Thu, 22 Jun 2006 22:43:26 +0000 (+0000) Subject: New Event field X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c03ccdbc5ad48748023000136d88d6cdafe8e9e4;p=dbsrgits%2FDBIx-Class-Historic.git New Event field --- diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index 551d159..28e1e76 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Sat Jun 17 07:46:56 2006 +-- Created on Thu Jun 22 23:07:04 2006 -- BEGIN TRANSACTION; @@ -150,7 +150,8 @@ CREATE TABLE tags ( -- CREATE TABLE event ( id INTEGER PRIMARY KEY NOT NULL, - starts_at datetime NOT NULL + starts_at datetime NOT NULL, + created_on timestamp NOT NULL ); -- @@ -203,4 +204,9 @@ 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 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;