From 5c93a028d30792aacda5d5633cd2dbdff24d4ed6 Mon Sep 17 00:00:00 2001 From: josch Date: Wed, 9 Apr 2008 19:36:34 +0000 Subject: [PATCH] changed default value in uploaded table from 0 to -1 git-svn-id: http://yolanda.mister-muffin.de/svn@289 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/init_sql.pl | 8 ++++---- trunk/tools/daemon.pl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/trunk/init_sql.pl b/trunk/init_sql.pl index 75e6daf..a5dac66 100644 --- a/trunk/init_sql.pl +++ b/trunk/init_sql.pl @@ -75,10 +75,10 @@ $dbh->do(qq{create table coverage varchar(255) not null, rights varchar(255) not null, license varchar(255) not null, - filesize int not null, - duration int not null, - width smallint not null, - height smallint not null, + filesize int default -1, + duration int default -1, + width smallint default -1, + height smallint default -1, fps float not null, hash char(64) not null, primary key (id) diff --git a/trunk/tools/daemon.pl b/trunk/tools/daemon.pl index fbf6c3c..0bdf81f 100755 --- a/trunk/tools/daemon.pl +++ b/trunk/tools/daemon.pl @@ -43,7 +43,7 @@ while(1) { #get fresh video id from db my $sth = $dbh->prepare(qq{select id, filesize, duration, width, height, fps, hash - from uploaded where duration != 0 and width != 0 and height != 0 limit 1}) or interrupt $dbh->errstr; + from uploaded where filesize != -1 and duration != -1 and width != -1 and height != -1 limit 1}) or interrupt $dbh->errstr; $sth->execute() or interrupt $dbh->errstr; my ($id,$filesize, $duration, $width, $height, $fps, $sha) = $sth->fetchrow_array();