PHP Classes

File: src/Installer/sql/pgsql/14-files.sql

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   src/Installer/sql/pgsql/14-files.sql   Download  
File: src/Installer/sql/pgsql/14-files.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: 742 bytes
 

Contents

Class file image Download
CREATE TABLE IF NOT EXISTS airship_dirs ( directoryid BIGSERIAL PRIMARY KEY, parent BIGINT NULL REFERENCES airship_dirs (directoryid), cabin TEXT, name TEXT NOT NULL, created TIMESTAMP DEFAULT NOW(), modified TIMESTAMP DEFAULT NOW(), CHECK(LENGTH(name) > 0), UNIQUE(cabin, parent, name) ); CREATE TABLE IF NOT EXISTS airship_files ( fileid BIGSERIAL PRIMARY KEY, filename TEXT, type TEXT, realname TEXT, checksum TEXT, uploaded_by BIGINT NULL REFERENCES airship_users (userid), directory BIGINT NULL REFERENCES airship_dirs (directoryid), cabin TEXT NULL, created TIMESTAMP DEFAULT NOW(), modified TIMESTAMP DEFAULT NOW(), UNIQUE(directory, filename), CHECK((directory IS NULL) != (cabin IS NULL)) );