[sqlite] Updating the 'default' clause of a column?

2016-05-23 Thread Olivier Mascia
Thanks Simon! Don't worry about the type 'timestamp'. We know how SQLite works with types. We use timestamp because it is a good thing for documentation purpose. We actually store an integer or real in there according to our application rules. For the short story we initially chose to always

[sqlite] Updating the 'default' clause of a column?

2016-05-23 Thread Olivier Mascia
Hello, Assume a table simplified for this discussion as: create table T(C timestamp default (julianday()) not null); I simply have to use a new function (let's call it 'now()' other than julianday() to define the default for this column. I have apparently successfully tested this:

[sqlite] Updating the 'default' clause of a column?

2016-05-23 Thread Simon Slavin
On 23 May 2016, at 11:14am, Olivier Mascia wrote: > But am I missing some important detail that could hurt me later? I notice only one thing, but you're at the time when it's easy to change it. The 'type' you've picked for this column is 'timestamp'. SQLite has no such type. I recommend