Permalink
Browse files

pgsql cms tables

  • Loading branch information...
1 parent 2ddf30b commit a5813a40d9fb8d22aa1e5bd153a5d2a6f865bc2a acerix committed Apr 12, 2012
Showing with 32 additions and 0 deletions.
  1. +32 −0 install/pgsql/cms.sql
View
@@ -0,0 +1,32 @@
+CREATE TABLE sites (
+ id serial NOT NULL PRIMARY KEY,
+ path VARCHAR(255) UNIQUE,
+ created TIMESTAMP DEFAULT NOW()
+);
+
+CREATE TABLE nav (
+ id serial NOT NULL PRIMARY KEY,
+ site_id int DEFAULT 1,
+ parent_id INT DEFAULT 0,
+ content_id INT DEFAULT NULL UNIQUE,
+ title VARCHAR(255),
+ path VARCHAR(255),
+ created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ status VARCHAR(255) DEFAULT 'active',
+ UNIQUE(site_id, parent_id, path)
+);
+
+CREATE TABLE content (
+ id serial NOT NULL PRIMARY KEY,
+ nav_id INT DEFAULT 0,
+ path VARCHAR(255),
+ title VARCHAR(255),
+ person_id INT,
+ created TIMESTAMP DEFAULT NOW(),
+ modified TIMESTAMP,
+ description text,
+ content text,
+ status VARCHAR(255) DEFAULT 'new',
+ UNIQUE(nav_id, path)
+);
+

0 comments on commit a5813a4

Please sign in to comment.