]> Dogcows Code - chaz/chatty/blobdiff - db/schema.sql
fixed sqlite schema timestamp identifier
[chaz/chatty] / db / schema.sql
index 70a5a24aae6db1ba2dc94c7f71edda9774135067..fee4063c1152baf247785b5a5c1884fc5f1ee53a 100644 (file)
@@ -3,8 +3,8 @@ PRAGMA foreign_keys = ON;
 
 CREATE TABLE room (
        id              INTEGER PRIMARY KEY,
-       name            TEXT,
-       created         TIMESTAMP DEFAULT NOW
+       name            TEXT UNIQUE,
+       created         TIMESTAMP DEFAULT CURRENT_TIMESTAMP
 );
 
 CREATE TABLE account (
@@ -18,7 +18,7 @@ CREATE TABLE account (
 
 CREATE TABLE message (
        id              INTEGER PRIMARY KEY,
-       posted          TIMESTAMP DEFAULT NOW,
+       posted          TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        author          INTEGER REFERENCES account(id),
        room            INTEGER REFERENCES room(id),
        content         TEXT
This page took 0.021106 seconds and 4 git commands to generate.