houdini/gems/ruby-qx/test/test_schema.sql
2019-01-09 17:57:35 -06:00

13 lines
408 B
SQL

DROP SCHEMA IF EXISTS public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO admin;
-- users
CREATE TABLE users (
id integer NOT NULL
, email character varying(255)
);
CREATE SEQUENCE users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER SEQUENCE users_id_seq OWNED BY users.id;
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);