Permalink
Browse files

added sql for a simple messages db

  • Loading branch information...
Mauro Parra-Miranda
Mauro Parra-Miranda committed May 11, 2011
1 parent eb16f81 commit 7e603f27d7c2d81f674986b2345502e98918ea81
Showing with 50 additions and 0 deletions.
  1. +25 −0 sql/setup.sql
  2. +25 −0 sql/setup.sql~
View
@@ -0,0 +1,25 @@
+-- SimpleAPI SQL
+-- (c) 2011 Mauro Parra-Miranda <mauropm@gmail.com>
+-- This will setup the new db, with tables and such.
+
+CREATE DATABASE IF NOT EXISTS messages
+ CHARACTER SET = latin1;
+
+USE messages;
+
+-- IID Inbound Message ID
+-- NUM Origin ID NUMBER
+-- MSG The Actual message
+-- TSTAMP The timestamp of the message
+-- PROC Did we process the message already? N - NO, Y - YES.
+
+CREATE TABLE inbound
+(
+ IID int NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (IID),
+ NUM char(10) NOT NULL,
+ MSG varchar(160) NOT NULL,
+ TSTAMP TIMESTAMP NOT NULL,
+ PROC char(1) DEFAULT 'N'
+);
+
View
@@ -0,0 +1,25 @@
+-- SimpleAPI SQL
+-- (c) 2011 Mauro Parra-Miranda <mauropm@gmail.com>
+-- This will setup the new db, with tables and such.
+
+CREATE DATABASE IF NOT EXISTS messages
+ CHARACTER SET = latin1;
+
+USE messages;
+
+-- IID Inbound Message ID
+-- NUM Origin ID NUMBER
+-- MSG The Actual message
+-- TSTAMP The timestamp of the message
+-- PROC Did we process the message already? N - NO, Y - YES.
+
+CREATE TABLE inbound
+(
+ IID int NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (IID),
+ NUM char(10) NOT NULL,
+ MSG varchar(160) NOT NULL,
+ TSTAMP TIMESTAMP NOT NULL
+ PROC char(1) DEFAULT 'N'
+);
+

0 comments on commit 7e603f2

Please sign in to comment.