]> git.donarmstrong.com Git - infobot.git/blobdiff - setup/sqlite2/onjoin.sql
major re-organisation of the different SQL files; cleanup and fixing of the postgres...
[infobot.git] / setup / sqlite2 / onjoin.sql
diff --git a/setup/sqlite2/onjoin.sql b/setup/sqlite2/onjoin.sql
new file mode 100644 (file)
index 0000000..994cc54
--- /dev/null
@@ -0,0 +1,14 @@
+CREATE TABLE onjoin (
+       nick VARCHAR(20) NOT NULL,
+       channel VARCHAR(16) NOT NULL,
+       message VARCHAR(255) NOT NULL,
+       modified_by VARCHAR(20) NOT NULL DEFAULT 'nobody',
+       modified_time INT NOT NULL DEFAULT '0',
+       PRIMARY KEY (nick, channel)
+);
+
+-- v.2 -> v.3
+-- ALTER TABLE onjoin ADD COLUMN modified_by VARCHAR(20) NOT NULL DEFAULT 'nobody';
+-- ALTER TABLE onjoin ADD COLUMN modified_time INT NOT NULL DEFAULT '0';
+-- ** the following doesn't work for sqlite **
+-- ALTER TABLE onjoin ADD PRIMARY KEY (nick, channel);