From d5d36bac73f37a92d4ee2d18a807b2acbccf16f3 Mon Sep 17 00:00:00 2001
From: dakkar <dakkar@thenautilus.net>
Date: Mon, 21 Jun 2010 23:20:31 +0100
Subject: initial version

---
 sql/create-schema.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 sql/create-schema.sql

(limited to 'sql/create-schema.sql')

diff --git a/sql/create-schema.sql b/sql/create-schema.sql
new file mode 100644
index 0000000..04e94fd
--- /dev/null
+++ b/sql/create-schema.sql
@@ -0,0 +1,19 @@
+CREATE TABLE status (
+ code VARCHAR(255) PRIMARY KEY,
+ class VARCHAR(255) NOT NULL,
+ description VARCHAR(255) NOT NULL,
+ is_active BOOLEAN NOT NULL
+);
+
+CREATE TABLE line (
+ id INT PRIMARY KEY,
+ name VARCHAR(255) NOT NULL UNIQUE
+);
+
+CREATE TABLE line_status (
+ time DATETIME NOT NULL,
+ line_id INT NOT NULL REFERENCES line(id),
+ status_code VARCHAR(255) NOT NULL REFERENCES status(code),
+ is_active BOOLEAN NOT NULL,
+ details TEXT
+);
-- 
cgit v1.2.3

