summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index 185a777..6304790 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1,5 +1,18 @@
BEGIN TRANSACTION;
+-- For PostgreSQL 9.1 upward, we should consider using enum types
+-- instead of VARCHARs with CHECK constraints:
+--
+-- CREATE TYPE user_status AS
+-- ENUM ('pending', 'approved', 'trusted', 'deferred', 'disabled', 'admin');
+--
+-- CREATE TYPE comment_status AS
+-- ENUM ('pending', 'approved', 'trusted', 'deferred', 'spam', 'rejected');
+--
+-- CREATE TYPE text_format AS
+-- ENUM ('html', 'text');
+
+
CREATE TABLE users(
id SERIAL NOT NULL,
name VARCHAR,