So, the voices are obnoxious. They constantly badger me about what I’m doing wrong in life, and I don’t know how to handle it. So many voices doing what they do best, annoy me. To no end. They argue with each other. The constant nagging can be annoying at times. I don’t know what to do about any of this. Damn voices always doing whatever they want to do! I end up suffering from it all. Damn voices. If I didn’t have voices going off in my head? I think I would be better off. So many thoughts come and go in my head at times, I can’t tell where they’re coming from. Is it the devil that’s talking to me? Is it God? I doubt God would want to be messing with me like this…but he did create me the way I am? So I’m not sure about any of that. When the voices tell me to do things? Things I don’t want to do? Yeah, that’s when they tend to come in fighting. I don’t have a way of making them stop. I don’t have a way of making them go away. Maybe I need more medication? I wish I had an answer to al...
Here's some code I'm working on for a sqlite3 database to store backup file content. Might add a BLOB type later for storing binary data. Not sure yet.
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE files (id INTEGER PRIMARY KEY,
name TEXT,
content TEXT,
created_ts TEXT,
modified_ts TEXT);
CREATE TABLE files_log(id INTEGER PRIMARY KEY,
fileid TEXT,
name TEXT,
content TEXT,
created_ts TEXT,
modified_ts TEXT,
dt TEXT);
CREATE TRIGGER files_trig AFTER INSERT ON files
BEGIN
update files SET created_ts = datetime('now','localtime') WHERE id = NEW.id;
END;
CREATE TRIGGER files_update_trig AFTER UPDATE ON files
BEGIN
update files SET modified_ts = datetime('now','localtime') WHERE id = OLD.id;
insert into files_log(fileid, name, content, created_ts, modified_ts)
values(OLD.id, OLD.name, OLD.content, OLD.created_ts, OLD.modified_ts);
END;
CREATE TRIGGER files_log_update_trig AFTER INSERT ON files_log
BEGIN
update files_log SET dt = datetime('now', 'localtime') WHERE id = NEW.id;
END;
COMMIT;
Comments
Post a Comment