Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO postgres;
- GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO postgres;
- GRANT USAGE, SELECT ON SEQUENCE users_id_seq TO postgres;
- DROP TABLE IF EXISTS public.user_role;
- CREATE TYPE public.user_role AS ENUM (
- 'admin',
- 'user'
- );
- DROP SEQUENCE IF EXISTS public.users_id_seq;
- CREATE SEQUENCE public.users_id_seq
- START WITH 1000
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
- DROP TABLE IF EXISTS public.users;
- CREATE TABLE public.users
- (
- id integer NOT NULL DEFAULT nextval('users_id_seq'::regclass),
- email character varying NOT NULL DEFAULT ''::character varying,
- encrypted_password character varying DEFAULT ''::character varying,
- reset_password_token character varying,
- reset_password_sent_at timestamp without time zone,
- remember_created_at timestamp without time zone,
- sign_in_count integer NOT NULL DEFAULT 0,
- current_sign_in_at timestamp without time zone,
- last_sign_in_at timestamp without time zone,
- current_sign_in_ip inet,
- last_sign_in_ip inet,
- created_at timestamp without time zone NOT NULL,
- updated_at timestamp without time zone NOT NULL,
- authentication_token character varying(30),
- first_name character varying,
- last_name character varying,
- nickname character varying,
- avatar character varying,
- role user_role,
- uuid character varying,
- cmt_authentication_token character varying,
- slug character varying,
- discarded_at timestamp without time zone,
- member_id character varying,
- phone_number character varying,
- address character varying,
- age character varying,
- gender character varying,
- marketing_preferences json DEFAULT '{}'::json,
- dob character varying,
- flipper_id integer,
- rego_number character varying,
- invitation_token character varying,
- invitation_created_at timestamp without time zone,
- invitation_sent_at timestamp without time zone,
- invitation_accepted_at timestamp without time zone,
- invitation_limit integer,
- invited_by_id integer,
- invited_by_type character varying,
- raxel_uid character varying,
- password_changed timestamp without time zone,
- CONSTRAINT users_pkey PRIMARY KEY (id)
- )
- WITH (
- OIDS=FALSE
- );
- ALTER TABLE public.users OWNER TO ubicar_staging;
- -- Index: public.index_users_on_authentication_token
- -- DROP INDEX public.index_users_on_authentication_token;
- CREATE UNIQUE INDEX index_users_on_authentication_token
- ON public.users
- USING btree
- (authentication_token COLLATE pg_catalog."default");
- -- Index: public.index_users_on_discarded_at
- -- DROP INDEX public.index_users_on_discarded_at;
- CREATE INDEX index_users_on_discarded_at
- ON public.users
- USING btree
- (discarded_at);
- -- Index: public.index_users_on_email
- -- DROP INDEX public.index_users_on_email;
- CREATE UNIQUE INDEX index_users_on_email
- ON public.users
- USING btree
- (email COLLATE pg_catalog."default");
- -- Index: public.index_users_on_invitation_token
- -- DROP INDEX public.index_users_on_invitation_token;
- CREATE UNIQUE INDEX index_users_on_invitation_token
- ON public.users
- USING btree
- (invitation_token COLLATE pg_catalog."default");
- -- Index: public.index_users_on_nickname
- -- DROP INDEX public.index_users_on_nickname;
- CREATE UNIQUE INDEX index_users_on_nickname
- ON public.users
- USING btree
- (nickname COLLATE pg_catalog."default");
- -- Index: public.index_users_on_reset_password_token
- -- DROP INDEX public.index_users_on_reset_password_token;
- CREATE UNIQUE INDEX index_users_on_reset_password_token
- ON public.users
- USING btree
- (reset_password_token COLLATE pg_catalog."default");
- -- Index: public.index_users_on_slug
- -- DROP INDEX public.index_users_on_slug;
- CREATE INDEX index_users_on_slug
- ON public.users
- USING btree
- (slug COLLATE pg_catalog."default");
- -- Index: public.index_users_on_uuid
- -- DROP INDEX public.index_users_on_uuid;
- CREATE UNIQUE INDEX index_users_on_uuid
- ON public.users
- USING btree
- (uuid COLLATE pg_catalog."default");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement