-
Notifications
You must be signed in to change notification settings - Fork 0
Base de pruebas
SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
-- -- TOC entry 230 (class 1259 OID 131985) -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.ar_internal_metadata ( key character varying NOT NULL, value character varying, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.ar_internal_metadata OWNER TO postgres;
-- -- TOC entry 210 (class 1259 OID 131820) -- Name: businesses; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.businesses ( id bigint NOT NULL, name character varying, nit character varying, country character varying DEFAULT 'Colombia'::character varying, city character varying, telephone character varying, email character varying, user_id bigint NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.businesses OWNER TO postgres;
-- -- TOC entry 209 (class 1259 OID 131819) -- Name: businesses_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.businesses_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.businesses_id_seq OWNER TO postgres;
-- -- TOC entry 3475 (class 0 OID 0) -- Dependencies: 209 -- Name: businesses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.businesses_id_seq OWNED BY public.businesses.id;
-- -- TOC entry 232 (class 1259 OID 140010) -- Name: catalogs; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.catalogs ( id bigint NOT NULL, reference character varying, name character varying, description text, price integer, actived boolean DEFAULT true, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.catalogs OWNER TO postgres;
-- -- TOC entry 231 (class 1259 OID 140009) -- Name: catalogs_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.catalogs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.catalogs_id_seq OWNER TO postgres;
-- -- TOC entry 3476 (class 0 OID 0) -- Dependencies: 231 -- Name: catalogs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.catalogs_id_seq OWNED BY public.catalogs.id;
-- -- TOC entry 212 (class 1259 OID 131831) -- Name: categories; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.categories ( id bigint NOT NULL, name character varying NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.categories OWNER TO postgres;
-- -- TOC entry 211 (class 1259 OID 131830) -- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.categories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.categories_id_seq OWNER TO postgres;
-- -- TOC entry 3477 (class 0 OID 0) -- Dependencies: 211 -- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.categories_id_seq OWNED BY public.categories.id;
-- -- TOC entry 214 (class 1259 OID 131840) -- Name: customers; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.customers ( id bigint NOT NULL, dni character varying, full_name character varying NOT NULL, telephone character varying, birthday character varying, email character varying, business_id bigint NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.customers OWNER TO postgres;
-- -- TOC entry 213 (class 1259 OID 131839) -- Name: customers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.customers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.customers_id_seq OWNER TO postgres;
-- -- TOC entry 3478 (class 0 OID 0) -- Dependencies: 213 -- Name: customers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.customers_id_seq OWNED BY public.customers.id;
-- -- TOC entry 234 (class 1259 OID 148202) -- Name: deductions; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.deductions ( id bigint NOT NULL, date timestamp(6) without time zone NOT NULL, amount integer NOT NULL, stylist_id bigint NOT NULL, description text, status character varying, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.deductions OWNER TO postgres;
-- -- TOC entry 233 (class 1259 OID 148201) -- Name: deductions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.deductions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.deductions_id_seq OWNER TO postgres;
-- -- TOC entry 3479 (class 0 OID 0) -- Dependencies: 233 -- Name: deductions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.deductions_id_seq OWNED BY public.deductions.id;
-- -- TOC entry 216 (class 1259 OID 131850) -- Name: invoices; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.invoices ( id bigint NOT NULL, date timestamp(6) without time zone NOT NULL, customer_id bigint NOT NULL, amount integer DEFAULT 0, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL, status character varying DEFAULT 'pending'::character varying );
ALTER TABLE public.invoices OWNER TO postgres;
-- -- TOC entry 215 (class 1259 OID 131849) -- Name: invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.invoices_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.invoices_id_seq OWNER TO postgres;
-- -- TOC entry 3480 (class 0 OID 0) -- Dependencies: 215 -- Name: invoices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id;
-- -- TOC entry 218 (class 1259 OID 131859) -- Name: order_items; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.order_items ( id bigint NOT NULL, invoice_id bigint NOT NULL, product_id bigint NOT NULL, quantity integer DEFAULT 1, adjustment integer DEFAULT 0, stylist_id bigint NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.order_items OWNER TO postgres;
-- -- TOC entry 217 (class 1259 OID 131858) -- Name: order_items_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.order_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.order_items_id_seq OWNER TO postgres;
-- -- TOC entry 3481 (class 0 OID 0) -- Dependencies: 217 -- Name: order_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.order_items_id_seq OWNED BY public.order_items.id;
-- -- TOC entry 220 (class 1259 OID 131871) -- Name: payments; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.payments ( id bigint NOT NULL, date timestamp(6) without time zone NOT NULL, invoice_id bigint NOT NULL, value integer NOT NULL, kind character varying, note character varying, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.payments OWNER TO postgres;
-- -- TOC entry 219 (class 1259 OID 131870) -- Name: payments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.payments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.payments_id_seq OWNER TO postgres;
-- -- TOC entry 3482 (class 0 OID 0) -- Dependencies: 219 -- Name: payments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.payments_id_seq OWNED BY public.payments.id;
-- -- TOC entry 222 (class 1259 OID 131881) -- Name: products; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.products ( id bigint NOT NULL, reference character varying, name character varying, description text, price integer NOT NULL, actived boolean DEFAULT true, cannon numeric DEFAULT 0.0, category_id bigint NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.products OWNER TO postgres;
-- -- TOC entry 221 (class 1259 OID 131880) -- Name: products_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.products_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.products_id_seq OWNER TO postgres;
-- -- TOC entry 3483 (class 0 OID 0) -- Dependencies: 221 -- Name: products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.products_id_seq OWNED BY public.products.id;
-- -- TOC entry 229 (class 1259 OID 131978) -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.schema_migrations ( version character varying NOT NULL );
ALTER TABLE public.schema_migrations OWNER TO postgres;
-- -- TOC entry 224 (class 1259 OID 131894) -- Name: stylists; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.stylists ( id bigint NOT NULL, dni character varying NOT NULL, name character varying, telephone character varying, role character varying, actived boolean DEFAULT true, business_id bigint NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.stylists OWNER TO postgres;
-- -- TOC entry 223 (class 1259 OID 131893) -- Name: stylists_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.stylists_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.stylists_id_seq OWNER TO postgres;
-- -- TOC entry 3484 (class 0 OID 0) -- Dependencies: 223 -- Name: stylists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.stylists_id_seq OWNED BY public.stylists.id;
-- -- TOC entry 226 (class 1259 OID 131906) -- Name: subcategories; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.subcategories ( id bigint NOT NULL, name character varying NOT NULL, category_id bigint NOT NULL, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL );
ALTER TABLE public.subcategories OWNER TO postgres;
-- -- TOC entry 225 (class 1259 OID 131905) -- Name: subcategories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.subcategories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.subcategories_id_seq OWNER TO postgres;
-- -- TOC entry 3485 (class 0 OID 0) -- Dependencies: 225 -- Name: subcategories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.subcategories_id_seq OWNED BY public.subcategories.id;
-- -- TOC entry 228 (class 1259 OID 131916) -- Name: users; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.users ( id bigint NOT NULL, email character varying DEFAULT ''::character varying NOT NULL, encrypted_password character varying DEFAULT ''::character varying NOT NULL, reset_password_token character varying, reset_password_sent_at timestamp(6) without time zone, remember_created_at timestamp(6) without time zone, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL, role character varying DEFAULT 'seller'::character varying );
ALTER TABLE public.users OWNER TO postgres;
-- -- TOC entry 227 (class 1259 OID 131915) -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
CREATE SEQUENCE public.users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO postgres;
-- -- TOC entry 3486 (class 0 OID 0) -- Dependencies: 227 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
-- -- TOC entry 3227 (class 2604 OID 131823) -- Name: businesses id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.businesses ALTER COLUMN id SET DEFAULT nextval('public.businesses_id_seq'::regclass);
-- -- TOC entry 3248 (class 2604 OID 140013) -- Name: catalogs id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.catalogs ALTER COLUMN id SET DEFAULT nextval('public.catalogs_id_seq'::regclass);
-- -- TOC entry 3229 (class 2604 OID 131834) -- Name: categories id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.categories ALTER COLUMN id SET DEFAULT nextval('public.categories_id_seq'::regclass);
-- -- TOC entry 3230 (class 2604 OID 131843) -- Name: customers id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.customers ALTER COLUMN id SET DEFAULT nextval('public.customers_id_seq'::regclass);
-- -- TOC entry 3250 (class 2604 OID 148205) -- Name: deductions id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.deductions ALTER COLUMN id SET DEFAULT nextval('public.deductions_id_seq'::regclass);
-- -- TOC entry 3231 (class 2604 OID 131853) -- Name: invoices id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.invoices ALTER COLUMN id SET DEFAULT nextval('public.invoices_id_seq'::regclass);
-- -- TOC entry 3234 (class 2604 OID 131862) -- Name: order_items id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.order_items ALTER COLUMN id SET DEFAULT nextval('public.order_items_id_seq'::regclass);
-- -- TOC entry 3237 (class 2604 OID 131874) -- Name: payments id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.payments ALTER COLUMN id SET DEFAULT nextval('public.payments_id_seq'::regclass);
-- -- TOC entry 3238 (class 2604 OID 131884) -- Name: products id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.products ALTER COLUMN id SET DEFAULT nextval('public.products_id_seq'::regclass);
-- -- TOC entry 3241 (class 2604 OID 131897) -- Name: stylists id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.stylists ALTER COLUMN id SET DEFAULT nextval('public.stylists_id_seq'::regclass);
-- -- TOC entry 3243 (class 2604 OID 131909) -- Name: subcategories id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.subcategories ALTER COLUMN id SET DEFAULT nextval('public.subcategories_id_seq'::regclass);
-- -- TOC entry 3244 (class 2604 OID 131919) -- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
-- -- TOC entry 3465 (class 0 OID 131985) -- Dependencies: 230 -- Data for Name: ar_internal_metadata; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.ar_internal_metadata (key, value, created_at, updated_at) FROM stdin; environment development 2022-07-19 00:54:39.253358 2022-07-19 00:54:39.253358 schema_sha1 78a260973846e5e9805edc91f989c15c08b479a5 2022-07-19 00:54:39.285718 2022-07-19 00:54:39.285718 .
-- -- TOC entry 3445 (class 0 OID 131820) -- Dependencies: 210 -- Data for Name: businesses; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.businesses (id, name, nit, country, city, telephone, email, user_id, created_at, updated_at) FROM stdin; 1 Lindo Salon 906090 Colombia Valledupar 5736407 lindosalon@mail.com 1 2022-07-19 16:28:27.908852 2022-07-19 16:28:27.908852 .
-- -- TOC entry 3467 (class 0 OID 140010) -- Dependencies: 232 -- Data for Name: catalogs; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.catalogs (id, reference, name, description, price, actived, created_at, updated_at) FROM stdin; .
-- -- TOC entry 3447 (class 0 OID 131831) -- Dependencies: 212 -- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.categories (id, name, created_at, updated_at) FROM stdin; 1 Productos 2022-07-19 16:08:16.866431 2022-07-19 16:08:16.866431 2 Servicios 2022-07-19 16:08:16.979244 2022-07-19 16:08:16.979244 .
-- -- TOC entry 3449 (class 0 OID 131840) -- Dependencies: 214 -- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.customers (id, dni, full_name, telephone, birthday, email, business_id, created_at, updated_at) FROM stdin; 1 101 Ivan Sampedro 5700101 10-abr ivan@mail.com 1 2022-07-19 16:31:27.083912 2022-07-19 16:31:27.083912 2 101 Ivan Sampedro 5700101 10-abr ivan@mail.com 1 2022-07-20 22:41:20.441471 2022-07-20 22:41:20.441471 3 102 Liz Barrena 5700102 20-nov liz@mail.com 1 2022-07-20 22:41:20.495512 2022-07-20 22:41:20.495512 4 103 Felicity Ramirez 5700103 13-feb felicity@mail.com 1 2022-07-20 22:41:20.513317 2022-07-20 22:41:20.513317 5 104 Evelyn Bravo 5700104 30-nov evelyn@mail.com 1 2022-07-20 22:41:20.529388 2022-07-20 22:41:20.529388 6 105 Sofia Torregrosa 5700105 12-sep sofia@mail.com 1 2022-07-20 22:41:20.543237 2022-07-20 22:41:20.543237 7 106 Ronaldo Benjumea 5700106 2-jun ronaldo@mail.com 1 2022-07-20 22:41:20.55664 2022-07-20 22:41:20.55664 8 107 Vivian Aguilar 5700107 3-oct vivian@mail.com 1 2022-07-20 22:41:20.570748 2022-07-20 22:41:20.570748 9 108 Daphnee Saez 5700108 10-nov daphnee@mail.com 1 2022-07-20 22:41:20.589312 2022-07-20 22:41:20.589312 10 109 Nora Navarro 5700109 19-sep nora@mail.com 1 2022-07-20 22:41:20.609912 2022-07-20 22:41:20.609912 11 110 Pedro Barrera 5700110 18-jul pedro@mail.com 1 2022-07-20 22:41:20.628449 2022-07-20 22:41:20.628449 12 111 Fredy Sanjuan \N \N \N 1 2022-08-03 23:45:06.580797 2022-08-03 23:45:06.580797 13 112 Juan Caballero \N \N \N 1 2022-08-03 23:45:06.80844 2022-08-03 23:45:06.80844 14 113 Juan Daza \N \N \N 1 2022-08-03 23:45:06.822455 2022-08-03 23:45:06.822455 15 114 Juan Daza \N \N \N 1 2022-08-03 23:45:06.844767 2022-08-03 23:45:06.844767 16 115 Juan Campanella \N \N \N 1 2022-08-03 23:45:06.859167 2022-08-03 23:45:06.859167 17 116 Juan Corredor \N \N \N 1 2022-08-03 23:45:06.874145 2022-08-03 23:45:06.874145 18 117 Juan David Urbina \N \N \N 1 2022-08-03 23:45:06.887089 2022-08-03 23:45:06.887089 19 118 Juan Lopez \N \N \N 1 2022-08-03 23:45:06.902475 2022-08-03 23:45:06.902475 20 119 Juan Machacon \N \N \N 1 2022-08-03 23:45:06.916209 2022-08-03 23:45:06.916209 21 120 Juan Pablo Sierra \N \N \N 1 2022-08-03 23:45:06.929119 2022-08-03 23:45:06.929119 22 121 Juan Sanjuan \N \N \N 1 2022-08-03 23:45:06.942869 2022-08-03 23:45:06.942869 23 122 Juana Oñate \N \N \N 1 2022-08-03 23:45:06.956191 2022-08-03 23:45:06.956191 24 123 Juanita Ardila \N \N \N 1 2022-08-03 23:45:06.969971 2022-08-03 23:45:06.969971 25 124 Juanita Daza \N \N \N 1 2022-08-03 23:45:07.001346 2022-08-03 23:45:07.001346 26 125 Juanse Daza \N \N \N 1 2022-08-03 23:45:07.016484 2022-08-03 23:45:07.016484 27 126 Maira Sanjuan \N \N \N 1 2022-08-03 23:45:07.030489 2022-08-03 23:45:07.030489 28 127 Norayma San juan \N \N \N 1 2022-08-03 23:45:07.05111 2022-08-03 23:45:07.05111 29 2222 juan martin quintero b aaaaa 14/04 jumaquba@gmail.com 1 2022-08-19 19:12:58.2816 2022-08-19 19:12:58.2816 .
-- -- TOC entry 3469 (class 0 OID 148202) -- Dependencies: 234 -- Data for Name: deductions; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.deductions (id, date, amount, stylist_id, description, status, created_at, updated_at) FROM stdin; .
-- -- TOC entry 3451 (class 0 OID 131850) -- Dependencies: 216 -- Data for Name: invoices; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.invoices (id, date, customer_id, amount, created_at, updated_at, status) FROM stdin; 73 2022-07-21 00:00:00 10 172000 2022-07-21 20:15:55.96206 2022-08-19 23:11:27.313067 pending 72 2022-07-20 00:00:00 10 311000 2022-07-21 20:06:56.830425 2022-07-28 20:36:54.539969 pending 187 2022-08-16 20:13:00 16 10000 2022-08-16 20:13:21.580695 2022-08-16 20:13:41.388775 pending 158 2022-08-04 22:54:00 5 40000 2022-08-04 22:54:06.857206 2022-08-04 22:56:58.689411 pending 159 2022-08-04 23:17:00 4 107000 2022-08-04 23:18:07.600121 2022-08-04 23:19:09.76705 pending 160 2022-08-05 00:01:00 16 10000 2022-08-05 00:02:07.076048 2022-08-05 00:02:51.050021 pending 189 2022-08-16 20:56:00 13 10000 2022-08-16 20:56:56.342355 2022-08-16 21:00:02.838206 pending 161 2022-08-05 21:25:00 4 17000 2022-08-05 21:26:02.05083 2022-08-05 21:26:46.298597 pending 80 2022-07-25 08:08:00 2 424000 2022-07-25 16:29:41.422487 2022-08-10 00:15:12.890852 pending 100 2022-07-28 22:22:00 3 110000 2022-07-28 19:09:32.698817 2022-08-12 01:13:43.274576 pending 167 2022-08-14 02:23:00 5 363663366 2022-08-14 02:23:50.011721 2022-08-14 02:24:38.193859 pending 168 2022-08-14 02:38:00 5 100000 2022-08-14 02:38:14.631646 2022-08-14 02:39:01.115885 pending 191 2022-08-16 21:25:00 1 7000 2022-08-16 21:25:55.326028 2022-08-16 21:26:31.86407 pending 179 2022-08-15 23:25:00 3 10000 2022-08-15 23:25:21.981731 2022-08-17 01:46:10.189441 pending 74 2022-07-13 04:44:00 3 101000 2022-07-21 20:24:38.725777 2022-07-28 20:37:06.875406 pending 26 2022-07-21 00:00:00 1 160110 2022-07-20 23:04:18.662942 2022-07-28 20:37:17.057867 pending 169 2022-08-15 17:35:00 5 20000 2022-08-15 17:35:53.760701 2022-08-15 17:36:55.552208 pending 76 2022-07-21 00:00:00 4 150001 2022-07-21 22:15:55.621168 2022-07-28 20:38:16.598463 pending 78 2022-07-21 00:00:00 9 10000 2022-07-22 02:24:13.588878 2022-07-28 20:38:47.835009 pending 197 2022-08-17 16:40:00 13 10000 2022-08-17 16:40:51.649966 2022-08-17 16:48:36.828962 paid 185 2022-08-16 19:56:00 1 10000 2022-08-16 19:57:04.363341 2022-08-17 16:55:36.141278 paid 110 2022-07-28 18:04:00 5 10000 2022-07-28 23:04:50.919054 2022-08-17 16:59:24.934993 partial 82 2022-07-25 04:04:00 3 10000 2022-07-25 22:46:43.912546 2022-08-17 17:14:12.499008 paid 153 2022-08-01 15:18:00 5 21000 2022-08-01 20:19:01.250978 2022-08-17 19:45:13.268866 paid 119 2022-07-29 18:56:00 3 100000 2022-07-29 23:56:15.216167 2022-08-17 19:51:52.025163 partial 199 2022-08-17 20:15:00 4 10000 2022-08-17 20:16:14.11758 2022-08-17 20:19:58.144793 paid 198 2022-08-17 19:43:00 13 20000 2022-08-17 19:43:53.535826 2022-08-17 22:27:49.089406 partial 202 2022-08-19 01:18:00 1 0 2022-08-19 01:19:04.245326 2022-08-19 01:19:04.245326 pending 204 2022-08-19 02:30:00 3 0 2022-08-19 02:43:55.461298 2022-08-19 02:43:55.461298 pending 205 2022-08-19 18:48:00 3 10007 2022-08-19 18:48:55.425673 2022-08-19 18:51:41.910021 pending 206 2022-08-19 19:01:00 16 0 2022-08-19 19:01:08.619485 2022-08-19 19:01:08.619485 pending 186 2022-08-16 20:05:00 1 10000 2022-08-16 20:06:02.392751 2022-08-19 19:15:54.280068 partial 209 2022-08-19 22:08:00 4 0 2022-08-19 22:08:56.514436 2022-08-19 22:08:56.514436 pending 210 2022-08-19 22:10:00 1 0 2022-08-19 22:10:35.979129 2022-08-19 22:10:35.979129 pending 71 2022-07-20 00:00:00 5 515000 2022-07-21 19:42:24.731496 2022-08-19 23:01:57.633823 pending .
-- -- TOC entry 3453 (class 0 OID 131859) -- Dependencies: 218 -- Data for Name: order_items; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.order_items (id, invoice_id, product_id, quantity, adjustment, stylist_id, created_at, updated_at) FROM stdin; 50 26 2 1 10 1 2022-07-20 23:04:18.692197 2022-07-20 23:04:18.692197 56 71 3 5 1000 2 2022-07-21 19:42:24.821613 2022-07-21 19:42:24.821613 60 72 3 3 1000 6 2022-07-21 20:06:56.840984 2022-07-21 20:06:56.840984 61 73 7 3 1000 6 2022-07-21 20:15:55.977291 2022-07-21 20:15:55.977291 62 73 3 1 0 2 2022-07-21 20:20:01.402088 2022-07-21 20:20:01.402088 63 73 6 1 0 2 2022-07-21 20:20:53.794588 2022-07-21 20:20:53.794588 65 74 3 1 1000 3 2022-07-21 20:24:38.733519 2022-07-21 20:43:01.260584 66 26 6 3 100 3 2022-07-21 21:05:13.544459 2022-07-21 21:05:13.544459 68 76 3 1 1 2 2022-07-21 22:15:55.630058 2022-07-21 22:15:55.630058 72 80 3 1 0 4 2022-07-25 16:36:14.936539 2022-07-25 16:36:14.936539 73 80 7 1 0 5 2022-07-25 16:43:56.489925 2022-07-25 16:43:56.489925 75 80 3 1 0 4 2022-07-25 16:45:38.242912 2022-07-25 16:45:38.242912 77 80 3 1 0 4 2022-07-25 16:54:35.284486 2022-07-25 16:54:35.284486 84 82 2 1 0 1 2022-07-25 22:48:29.445488 2022-07-25 22:48:29.445488 71 80 2 1 0 1 2022-07-25 16:31:31.151004 2022-07-28 19:06:34.720994 89 72 2 1 0 2 2022-07-28 19:08:13.716197 2022-07-28 19:08:13.716197 90 100 3 1 0 3 2022-07-28 19:09:51.52851 2022-07-28 19:09:51.52851 74 80 6 2 0 4 2022-07-25 16:44:24.841544 2022-07-28 19:17:35.046777 78 76 2 5 0 1 2022-07-25 18:07:55.424217 2022-07-28 20:38:16.009933 94 78 2 1 0 5 2022-07-28 20:38:47.247975 2022-07-28 20:38:47.247975 96 110 2 1 0 2 2022-07-28 23:06:44.787373 2022-07-28 23:06:44.787373 98 119 3 1 0 2 2022-07-30 00:13:09.357972 2022-07-30 00:13:09.357972 100 153 4 1 1000 3 2022-08-01 20:19:28.944923 2022-08-01 20:19:28.944923 101 153 5 1 0 2 2022-08-01 20:19:51.57152 2022-08-01 20:19:51.57152 103 158 2 1 0 2 2022-08-04 22:55:18.065957 2022-08-04 22:55:18.065957 104 158 4 1 0 3 2022-08-04 22:55:40.873973 2022-08-04 22:55:40.873973 105 158 5 2 0 3 2022-08-04 22:56:57.922172 2022-08-04 22:56:57.922172 106 159 7 1 0 3 2022-08-04 23:18:30.615611 2022-08-04 23:18:30.615611 107 159 3 1 0 4 2022-08-04 23:19:09.195345 2022-08-04 23:19:09.195345 108 160 4 1 0 6 2022-08-05 00:02:50.251767 2022-08-05 00:02:50.251767 109 161 7 1 0 2 2022-08-05 21:26:24.30098 2022-08-05 21:26:24.30098 110 161 4 1 0 3 2022-08-05 21:26:45.338682 2022-08-05 21:26:45.338682 76 80 7 1 0 5 2022-07-25 16:52:06.712542 2022-08-10 00:15:12.035651 111 100 2 1 0 2 2022-08-12 01:13:41.458085 2022-08-12 01:13:41.458085 144 167 1 3 0 5 2022-08-14 02:24:37.568323 2022-08-14 02:24:37.568323 145 168 3 1 0 5 2022-08-14 02:39:00.529022 2022-08-14 02:39:00.529022 146 169 4 1 0 2 2022-08-15 17:36:25.89373 2022-08-15 17:36:25.89373 147 169 5 1 0 3 2022-08-15 17:36:55.004996 2022-08-15 17:36:55.004996 148 179 2 1 0 6 2022-08-15 23:30:20.631259 2022-08-15 23:30:20.631259 150 185 2 1 0 5 2022-08-16 19:57:30.510989 2022-08-16 19:57:30.510989 151 186 2 1 0 2 2022-08-16 20:06:22.866436 2022-08-16 20:06:22.866436 152 187 2 1 0 5 2022-08-16 20:13:40.544656 2022-08-16 20:13:40.544656 153 189 2 1 0 2 2022-08-16 21:00:02.230595 2022-08-16 21:00:02.230595 154 191 7 1 0 2 2022-08-16 21:26:31.25829 2022-08-16 21:26:31.25829 155 197 2 1 0 6 2022-08-17 16:41:31.863854 2022-08-17 16:41:31.863854 156 199 2 1 0 2 2022-08-17 20:18:25.347528 2022-08-17 20:18:25.347528 157 198 2 1 0 6 2022-08-17 22:26:52.445632 2022-08-17 22:26:52.445632 158 198 5 1 0 2 2022-08-17 22:27:14.048117 2022-08-17 22:27:14.048117 159 205 2 1 7 2 2022-08-19 18:51:41.056333 2022-08-19 18:51:41.056333 160 71 7 2 0 1 2022-08-19 23:01:56.452728 2022-08-19 23:01:56.452728 .
-- -- TOC entry 3455 (class 0 OID 131871) -- Dependencies: 220 -- Data for Name: payments; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.payments (id, date, invoice_id, value, kind, note, created_at, updated_at) FROM stdin; 1 2022-08-15 12:23:31 110 1000 Efectivo p1 2022-08-15 17:23:45.420227 2022-08-15 17:23:45.420227 2 2022-08-15 12:30:32 110 1000 Efectivo p2 2022-08-15 17:30:51.253737 2022-08-15 17:30:51.253737 3 2022-08-15 12:33:43 110 1000 Efectivo p3 2022-08-15 17:33:55.481017 2022-08-15 17:33:55.481017 4 2022-08-15 12:37:01 169 2000 Efectivo 2022-08-15 17:37:17.573984 2022-08-15 17:37:17.573984 5 2022-08-15 12:38:28 153 2000 Efectivo p1 2022-08-15 17:38:45.734707 2022-08-15 17:38:45.734707 6 2022-08-15 18:51:56 179 1000 Efectivo p1 2022-08-15 23:52:12.606191 2022-08-15 23:52:12.606191 8 2022-08-16 16:26:38 191 1000 Efectivo p1 2022-08-16 21:26:53.295316 2022-08-16 21:26:53.295316 10 2022-08-17 11:41:53 197 10000 Efectivo 2022-08-17 16:42:14.940612 2022-08-17 16:42:14.940612 11 2022-08-17 11:47:11 197 10000 Efectivo p1 2022-08-17 16:47:44.69072 2022-08-17 16:47:44.69072 12 2022-08-17 11:48:15 197 10000 Efectivo p1 2022-08-17 16:48:36.66723 2022-08-17 16:48:36.66723 13 2022-08-17 11:55:26 185 10000 Efectivo p1 2022-08-17 16:55:36.095889 2022-08-17 16:55:36.095889 14 2022-08-17 11:59:08 110 5000 Efectivo p1 2022-08-17 16:59:24.900155 2022-08-17 16:59:24.900155 15 2022-08-17 12:13:50 82 10000 Efectivo p1 2022-08-17 17:14:12.46634 2022-08-17 17:14:12.46634 16 2022-08-17 14:44:40 153 21000 Efectivo p1 2022-08-17 19:45:13.224407 2022-08-17 19:45:13.224407 17 2022-08-17 14:51:37 119 10000 E 2022-08-17 19:51:51.995531 2022-08-17 19:51:51.995531 18 2022-08-17 15:19:01 199 10000 Efectivo p1 2022-08-17 20:19:58.100383 2022-08-17 20:19:58.100383 19 2022-08-17 17:27:21 198 10000 Efectivo p1 2022-08-17 22:27:49.049974 2022-08-17 22:27:49.049974 20 2022-08-19 14:15:29 186 6000 Efectivo p1 2022-08-19 19:15:54.122076 2022-08-19 19:15:54.122076 .
-- -- TOC entry 3457 (class 0 OID 131881) -- Dependencies: 222 -- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.products (id, reference, name, description, price, actived, cannon, category_id, created_at, updated_at) FROM stdin; 2 C2 Corte Barba \N 10000 t 0.5 2 2022-07-20 22:41:20.194463 2022-07-20 22:41:20.194463 3 C3 Mechas \N 100000 t 0.5 2 2022-07-20 22:41:20.26463 2022-07-20 22:41:20.26463 4 U1 Manicure \N 10000 t 0.4 2 2022-07-20 22:41:20.288282 2022-07-20 22:41:20.288282 5 U2 Pedicure \N 10000 t 0.4 2 2022-07-20 22:41:20.312596 2022-07-20 22:41:20.312596 6 M1 Rostro \N 50000 t 0.6 2 2022-07-20 22:41:20.338218 2022-07-20 22:41:20.338218 8 P2 Base Tuleno - Masglo \N 7000 t 0.0 1 2022-07-20 22:41:20.388399 2022-07-20 22:41:20.388399 7 P1 Brillo Secante - Masglo 7000 t 0.0 1 2022-07-20 22:41:20.365509 2022-08-10 20:48:31.011031 1 c1 corte de bigote 10000 t 0.5 1 2022-07-19 16:21:02.198864 2022-08-19 19:00:14.412411 .
-- -- TOC entry 3464 (class 0 OID 131978) -- Dependencies: 229 -- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.schema_migrations (version) FROM stdin; 20220714235538 20220708000945 20220714002615 20220714002616 20220714200000 20220714200001 20220714222706 20220714232709 20220714235535 20220714235536 20220707214143 20220724195446 20220809222252 20220815162949 20220816224103 .
-- -- TOC entry 3459 (class 0 OID 131894) -- Dependencies: 224 -- Data for Name: stylists; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.stylists (id, dni, name, telephone, role, actived, business_id, created_at, updated_at) FROM stdin; 3 202 Eugenia Hernandes 3000000002 Estilista t 1 2022-07-20 22:41:19.885659 2022-07-20 22:41:19.885659 4 203 Julian Ordonez 3000000003 Manicurista t 1 2022-07-20 22:41:19.907988 2022-07-20 22:41:19.907988 5 204 Pilar Bocanegra 3000000004 Manicurista t 1 2022-07-20 22:41:19.930619 2022-07-20 22:41:19.930619 6 205 Marlon Moreno 3000000005 Maquillador t 1 2022-07-20 22:41:19.952781 2022-07-20 22:41:19.952781 2 201 Diana Ospina 3000000001 Estilista t 1 2022-07-20 22:41:19.761722 2022-08-03 17:13:57.598714 1 1234 pedro rmrz estilista t 1 2022-07-19 16:34:20.857363 2022-08-19 18:57:23.94938 .
-- -- TOC entry 3461 (class 0 OID 131906) -- Dependencies: 226 -- Data for Name: subcategories; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.subcategories (id, name, category_id, created_at, updated_at) FROM stdin; 1 Cabello 2 2022-07-19 16:08:17.04674 2022-07-19 16:08:17.04674 2 Uñas 2 2022-07-19 16:08:17.112359 2022-07-19 16:08:17.112359 3 Maquillaje 2 2022-07-19 16:08:17.124185 2022-07-19 16:08:17.124185 4 1 2022-08-17 20:36:16.602303 2022-08-17 20:36:16.602303 .
-- -- TOC entry 3463 (class 0 OID 131916) -- Dependencies: 228 -- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.users (id, email, encrypted_password, reset_password_token, reset_password_sent_at, remember_created_at, created_at, updated_at, role) FROM stdin; 2 alex@mail.com $2a$12$DHvJIYvT1z86lzu8pmM6XuLfCVIudZPAU513FilxOlHv.9Pk1sc3. \N \N \N 2022-07-27 21:23:22.863568 2022-07-27 21:23:22.863568 seller 3 martin@mail.com $2a$12$qV9GkXIZtXCwjgz/OkimzOJqjAMw4vjQoypikbGcD.22Ii1N1zwt6 \N \N \N 2022-08-03 14:07:36.954698 2022-08-03 14:07:36.954698 seller 1 juan@gmail.com $2a$12$MjeeKik6hiqwLbCvnc31Beh.Ub3udNwbzRz2p0QT49UXzSIpCLgrS 8f569a8442d60a7bd6383cb4a7537b3c62dffd96bc7b908e22ee35faad79e4f6 2022-07-22 23:28:56.513522 \N 2022-07-19 16:27:28.332768 2022-08-11 00:20:17.312533 manager .
-- -- TOC entry 3487 (class 0 OID 0) -- Dependencies: 209 -- Name: businesses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.businesses_id_seq', 1, true);
-- -- TOC entry 3488 (class 0 OID 0) -- Dependencies: 231 -- Name: catalogs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.catalogs_id_seq', 1, false);
-- -- TOC entry 3489 (class 0 OID 0) -- Dependencies: 211 -- Name: categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.categories_id_seq', 2, true);
-- -- TOC entry 3490 (class 0 OID 0) -- Dependencies: 213 -- Name: customers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.customers_id_seq', 29, true);
-- -- TOC entry 3491 (class 0 OID 0) -- Dependencies: 233 -- Name: deductions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.deductions_id_seq', 1, false);
-- -- TOC entry 3492 (class 0 OID 0) -- Dependencies: 215 -- Name: invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.invoices_id_seq', 210, true);
-- -- TOC entry 3493 (class 0 OID 0) -- Dependencies: 217 -- Name: order_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.order_items_id_seq', 160, true);
-- -- TOC entry 3494 (class 0 OID 0) -- Dependencies: 219 -- Name: payments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.payments_id_seq', 20, true);
-- -- TOC entry 3495 (class 0 OID 0) -- Dependencies: 221 -- Name: products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.products_id_seq', 8, true);
-- -- TOC entry 3496 (class 0 OID 0) -- Dependencies: 223 -- Name: stylists_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.stylists_id_seq', 6, true);
-- -- TOC entry 3497 (class 0 OID 0) -- Dependencies: 225 -- Name: subcategories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.subcategories_id_seq', 4, true);
-- -- TOC entry 3498 (class 0 OID 0) -- Dependencies: 227 -- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.users_id_seq', 3, true);
-- -- TOC entry 3288 (class 2606 OID 131991) -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.ar_internal_metadata ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
-- -- TOC entry 3252 (class 2606 OID 131828) -- Name: businesses businesses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.businesses ADD CONSTRAINT businesses_pkey PRIMARY KEY (id);
-- -- TOC entry 3290 (class 2606 OID 140018) -- Name: catalogs catalogs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.catalogs ADD CONSTRAINT catalogs_pkey PRIMARY KEY (id);
-- -- TOC entry 3255 (class 2606 OID 131838) -- Name: categories categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.categories ADD CONSTRAINT categories_pkey PRIMARY KEY (id);
-- -- TOC entry 3257 (class 2606 OID 131847) -- Name: customers customers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.customers ADD CONSTRAINT customers_pkey PRIMARY KEY (id);
-- -- TOC entry 3292 (class 2606 OID 148209) -- Name: deductions deductions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.deductions ADD CONSTRAINT deductions_pkey PRIMARY KEY (id);
-- -- TOC entry 3261 (class 2606 OID 131856) -- Name: invoices invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.invoices ADD CONSTRAINT invoices_pkey PRIMARY KEY (id);
-- -- TOC entry 3266 (class 2606 OID 131866) -- Name: order_items order_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.order_items ADD CONSTRAINT order_items_pkey PRIMARY KEY (id);
-- -- TOC entry 3269 (class 2606 OID 131878) -- Name: payments payments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.payments ADD CONSTRAINT payments_pkey PRIMARY KEY (id);
-- -- TOC entry 3273 (class 2606 OID 131890) -- Name: products products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.products ADD CONSTRAINT products_pkey PRIMARY KEY (id);
-- -- TOC entry 3286 (class 2606 OID 131984) -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.schema_migrations ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
-- -- TOC entry 3277 (class 2606 OID 131902) -- Name: stylists stylists_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.stylists ADD CONSTRAINT stylists_pkey PRIMARY KEY (id);
-- -- TOC entry 3280 (class 2606 OID 131913) -- Name: subcategories subcategories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.subcategories ADD CONSTRAINT subcategories_pkey PRIMARY KEY (id);
-- -- TOC entry 3284 (class 2606 OID 131925) -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.users ADD CONSTRAINT users_pkey PRIMARY KEY (id);
-- -- TOC entry 3253 (class 1259 OID 131829) -- Name: index_businesses_on_user_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_businesses_on_user_id ON public.businesses USING btree (user_id);
-- -- TOC entry 3258 (class 1259 OID 131848) -- Name: index_customers_on_business_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_customers_on_business_id ON public.customers USING btree (business_id);
-- -- TOC entry 3293 (class 1259 OID 148215) -- Name: index_deductions_on_stylist_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_deductions_on_stylist_id ON public.deductions USING btree (stylist_id);
-- -- TOC entry 3259 (class 1259 OID 131857) -- Name: index_invoices_on_customer_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_invoices_on_customer_id ON public.invoices USING btree (customer_id);
-- -- TOC entry 3262 (class 1259 OID 131867) -- Name: index_order_items_on_invoice_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_order_items_on_invoice_id ON public.order_items USING btree (invoice_id);
-- -- TOC entry 3263 (class 1259 OID 131868) -- Name: index_order_items_on_product_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_order_items_on_product_id ON public.order_items USING btree (product_id);
-- -- TOC entry 3264 (class 1259 OID 131869) -- Name: index_order_items_on_stylist_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_order_items_on_stylist_id ON public.order_items USING btree (stylist_id);
-- -- TOC entry 3267 (class 1259 OID 131879) -- Name: index_payments_on_invoice_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_payments_on_invoice_id ON public.payments USING btree (invoice_id);
-- -- TOC entry 3270 (class 1259 OID 131891) -- Name: index_products_on_category_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_products_on_category_id ON public.products USING btree (category_id);
-- -- TOC entry 3271 (class 1259 OID 131892) -- Name: index_products_on_reference; Type: INDEX; Schema: public; Owner: postgres
CREATE UNIQUE INDEX index_products_on_reference ON public.products USING btree (reference);
-- -- TOC entry 3274 (class 1259 OID 131903) -- Name: index_stylists_on_business_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_stylists_on_business_id ON public.stylists USING btree (business_id);
-- -- TOC entry 3275 (class 1259 OID 131904) -- Name: index_stylists_on_dni; Type: INDEX; Schema: public; Owner: postgres
CREATE UNIQUE INDEX index_stylists_on_dni ON public.stylists USING btree (dni);
-- -- TOC entry 3278 (class 1259 OID 131914) -- Name: index_subcategories_on_category_id; Type: INDEX; Schema: public; Owner: postgres
CREATE INDEX index_subcategories_on_category_id ON public.subcategories USING btree (category_id);
-- -- TOC entry 3281 (class 1259 OID 131926) -- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: postgres
CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email);
-- -- TOC entry 3282 (class 1259 OID 131927) -- Name: index_users_on_reset_password_token; Type: INDEX; Schema: public; Owner: postgres
CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING btree (reset_password_token);
-- -- TOC entry 3296 (class 2606 OID 131938) -- Name: invoices fk_rails_0d349e632f; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.invoices ADD CONSTRAINT fk_rails_0d349e632f FOREIGN KEY (customer_id) REFERENCES public.customers(id);
-- -- TOC entry 3297 (class 2606 OID 131943) -- Name: order_items fk_rails_3590651aad; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.order_items ADD CONSTRAINT fk_rails_3590651aad FOREIGN KEY (invoice_id) REFERENCES public.invoices(id);
-- -- TOC entry 3303 (class 2606 OID 131973) -- Name: subcategories fk_rails_3937626525; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.subcategories ADD CONSTRAINT fk_rails_3937626525 FOREIGN KEY (category_id) REFERENCES public.categories(id);
-- -- TOC entry 3300 (class 2606 OID 131958) -- Name: payments fk_rails_62d18ea517; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.payments ADD CONSTRAINT fk_rails_62d18ea517 FOREIGN KEY (invoice_id) REFERENCES public.invoices(id);
-- -- TOC entry 3294 (class 2606 OID 131928) -- Name: businesses fk_rails_963ee95a5f; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.businesses ADD CONSTRAINT fk_rails_963ee95a5f FOREIGN KEY (user_id) REFERENCES public.users(id);
-- -- TOC entry 3302 (class 2606 OID 131968) -- Name: stylists fk_rails_a266b24630; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.stylists ADD CONSTRAINT fk_rails_a266b24630 FOREIGN KEY (business_id) REFERENCES public.businesses(id);
-- -- TOC entry 3295 (class 2606 OID 131933) -- Name: customers fk_rails_b73113df4b; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.customers ADD CONSTRAINT fk_rails_b73113df4b FOREIGN KEY (business_id) REFERENCES public.businesses(id);
-- -- TOC entry 3299 (class 2606 OID 131953) -- Name: order_items fk_rails_ceb0a80d56; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.order_items ADD CONSTRAINT fk_rails_ceb0a80d56 FOREIGN KEY (stylist_id) REFERENCES public.stylists(id);
-- -- TOC entry 3304 (class 2606 OID 148210) -- Name: deductions fk_rails_ee80863148; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.deductions ADD CONSTRAINT fk_rails_ee80863148 FOREIGN KEY (stylist_id) REFERENCES public.stylists(id);
-- -- TOC entry 3298 (class 2606 OID 131948) -- Name: order_items fk_rails_f1a29ddd47; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.order_items ADD CONSTRAINT fk_rails_f1a29ddd47 FOREIGN KEY (product_id) REFERENCES public.products(id);
-- -- TOC entry 3301 (class 2606 OID 131963) -- Name: products fk_rails_fb915499a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
ALTER TABLE ONLY public.products ADD CONSTRAINT fk_rails_fb915499a4 FOREIGN KEY (category_id) REFERENCES public.categories(id);
-- Completed on 2022-08-20 12:17:48