sql/1.sql
author Mahlon E. Smith <mahlon@martini.nu>
Sun, 23 Oct 2011 22:59:59 -0700
changeset 12 191b3c25974a
parent 10 d07309450285
child 13 23a242d7b7fa
permissions -rw-r--r--
Clean up redundant parser actions via preprocessor macros, add a hostname->tld extractor for doing tld "wildcard" queries. Stop tracking 'parser.c' completely.

--- vim: set noet nosta sw=4 ts=4 ft=sql:
BEGIN;

DROP TABLE IF EXISTS requests;
CREATE TABLE requests (
	hi INT,
	rewrite_rule INTEGER REFERENCES rewrite_rules( id ) ON DELETE SET NULL ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED 
);

DROP TABLE IF EXISTS rewrite_rules;
CREATE TABLE rewrite_rules (
	id    INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
	redir TINYINT NOT NULL DEFAULT 0 CHECK( redir IN (0,1,2) )
);

COMMIT;