PHP Classes

File: src/Installer/sql/pgsql/21-blog-series.sql

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   src/Installer/sql/pgsql/21-blog-series.sql   Download  
File: src/Installer/sql/pgsql/21-blog-series.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CMS Airship
Content management system with security features
Author: By
Last change: Add 'IF NOT EXISTS' clauses (requires PostgreSQL 9.5)
Date: 7 years ago
Size: 1,059 bytes
 

Contents

Class file image Download
CREATE TABLE IF NOT EXISTS hull_blog_series ( seriesid BIGSERIAL PRIMARY KEY, name TEXT, slug TEXT, preamble TEXT, format TEXT, -- HTML, Markdown, RST (for preamble) config JSONB, created TIMESTAMP DEFAULT NOW(), modified TIMESTAMP DEFAULT NOW(), UNIQUE(slug) ); CREATE TABLE IF NOT EXISTS hull_blog_series_items ( itemid BIGSERIAL PRIMARY KEY, listorder INTEGER, parent INTEGER NULL, post INTEGER NULL, series INTEGER NULL, CHECK((post IS NULL) != (series IS NULL)), created TIMESTAMP DEFAULT NOW(), modified TIMESTAMP DEFAULT NOW() ); DROP TRIGGER IF EXISTS update_hull_blog_series_modtime ON hull_blog_series; CREATE TRIGGER update_hull_blog_series_modtime BEFORE UPDATE ON hull_blog_series FOR EACH ROW EXECUTE PROCEDURE update_modtime(); DROP TRIGGER IF EXISTS update_hull_blog_series_items_modtime ON hull_blog_series_items; CREATE TRIGGER update_hull_blog_series_items_modtime BEFORE UPDATE ON hull_blog_series_items FOR EACH ROW EXECUTE PROCEDURE update_modtime();