Created
September 15, 2014 22:36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TYPE feedback_type AS ENUM('rolloffs', 'waste', 'hauling', 'commerical', 'residential'); | |
CREATE TABLE IF NOT EXISTS company_feedback ( | |
id serial PRIMARY KEY, | |
company integer REFERENCES companies(id) NOT NULL, | |
ip text NOT NULL, | |
"type" feedback_type NOT NULL, | |
affirmative boolean NOT NULL | |
); | |
CREATE UNIQUE INDEX limit_feedback ON company_feedback (company, ip, "type"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment