Created
February 19, 2015 21:14
-
-
Save bgmarx/bebf286319b61639e85f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite> CREATE TABLE skypelog (author TEXT, from_dispname TEXT, timestamp INTEGER, body_xml TEXT); | |
sqlite> CREATE TRIGGER update_skypelog AFTER UPDATE ON Messages | |
...> BEGIN | |
...> INSERT INTO skypelog | |
...> SELECT new.author, new.from_dispname, new.timestamp, new.body_xml | |
...> WHERE (SELECT count(*) FROM skypelog | |
...> WHERE timestamp = new.timestamp AND body_xml = new.body_xml) = 0; | |
...> END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment