Skip to content

Instantly share code, notes, and snippets.

@jeremiahmarks
Created April 20, 2017 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremiahmarks/2089c746d87e08efe5ef0e2f3e8a7847 to your computer and use it in GitHub Desktop.
Save jeremiahmarks/2089c746d87e08efe5ef0e2f3e8a7847 to your computer and use it in GitHub Desktop.
CREATE TRIGGER update_appInfo_updatetime BEFORE update ON appInfo
begin
update appinfo set updatedatetime = strftime('%Y-%m-%d %H:%M:%S:%s','now', 'localtime') where bundle_id = old.bundle_id;
end
CREATE TABLE "appInfo" (bundle_id INTEGER PRIMARY KEY,title text, updatedatetime text DEFAULT (strftime('%Y-%m-%d %H:%M:%S:%s','now', 'localtime')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment