Re: [sqlite] Problem with create table and strftime

2011-06-06 Thread Cecil Westerhof
2011/6/6 Igor Tandetnik :
>> In a create table I have:
>>      measureDate            DATE           UNIQUE      DEFAULT
>> (strftime('%Y-%m-%d', 'now')),
>> but when I look with .schema, I get:
>>      measureDate            DATE           DEFAULT (Datetime('now')),
>>
>> The UNIQUE constraint is disappeared and the DEFAULT is changed.
>
> This sounds extremely unlikely. If I had to guess, I'd suspect you already 
> have the table in the database, with the old schema, and the new CREATE TABLE 
> statement fails.

You are right. I made a mistake. My excuses for the noise.

-- 
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with create table and strftime

2011-06-06 Thread Igor Tandetnik
Cecil Westerhof  wrote:
> In a create table I have:
>  measureDateDATE   UNIQUE  DEFAULT
> (strftime('%Y-%m-%d', 'now')),
> but when I look with .schema, I get:
>  measureDateDATE   DEFAULT (Datetime('now')),
> 
> The UNIQUE constraint is disappeared and the DEFAULT is changed.

This sounds extremely unlikely. If I had to guess, I'd suspect you already have 
the table in the database, with the old schema, and the new CREATE TABLE 
statement fails.
-- 
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users