til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Defaulting to now for date

It can be useful to have dates default to now when inserting records.

CREATE TABLE test (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  t TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

References