· 8 years ago · May 26, 2018, 09:56 AM
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 10.3
6-- Dumped by pg_dump version 10.3
7
8SET statement_timeout = 0;
9SET lock_timeout = 0;
10SET idle_in_transaction_session_timeout = 0;
11SET client_encoding = 'UTF8';
12SET standard_conforming_strings = on;
13SELECT pg_catalog.set_config('search_path', '', false);
14SET check_function_bodies = false;
15SET client_min_messages = warning;
16SET row_security = off;
17
18--
19-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
20--
21
22CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
23
24
25--
26-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
27--
28
29COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
30
31
32SET default_tablespace = '';
33
34SET default_with_oids = false;
35
36--
37-- Name: accounts; Type: TABLE; Schema: public; Owner: postgres
38--
39
40CREATE TABLE public.accounts (
41 id bigint NOT NULL,
42 company_id bigint NOT NULL,
43 code character varying,
44 description character varying NOT NULL,
45 date date NOT NULL,
46 release_cents integer DEFAULT 0 NOT NULL,
47 release_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
48 bx_prod_out_cents integer DEFAULT 0 NOT NULL,
49 bx_prod_out_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
50 bank_dispatch_cents integer DEFAULT 0 NOT NULL,
51 bank_dispatch_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
52 interest_cents integer DEFAULT 0 NOT NULL,
53 interest_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
54 balance_cents integer DEFAULT 0 NOT NULL,
55 balance_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
56 kind integer NOT NULL,
57 created_at timestamp without time zone NOT NULL,
58 updated_at timestamp without time zone NOT NULL,
59 extract_id bigint
60);
61
62
63ALTER TABLE public.accounts OWNER TO postgres;
64
65--
66-- Name: accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
67--
68
69CREATE SEQUENCE public.accounts_id_seq
70 START WITH 1
71 INCREMENT BY 1
72 NO MINVALUE
73 NO MAXVALUE
74 CACHE 1;
75
76
77ALTER TABLE public.accounts_id_seq OWNER TO postgres;
78
79--
80-- Name: accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
81--
82
83ALTER SEQUENCE public.accounts_id_seq OWNED BY public.accounts.id;
84
85
86--
87-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: postgres
88--
89
90CREATE TABLE public.ar_internal_metadata (
91 key character varying NOT NULL,
92 value character varying,
93 created_at timestamp without time zone NOT NULL,
94 updated_at timestamp without time zone NOT NULL
95);
96
97
98ALTER TABLE public.ar_internal_metadata OWNER TO postgres;
99
100--
101-- Name: borderos; Type: TABLE; Schema: public; Owner: postgres
102--
103
104CREATE TABLE public.borderos (
105 id bigint NOT NULL,
106 company_id bigint,
107 number character varying NOT NULL,
108 operation_tax integer DEFAULT 0 NOT NULL,
109 operation_date date NOT NULL,
110 bank_tax_cents integer DEFAULT 0 NOT NULL,
111 bank_tax_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
112 payments_count integer DEFAULT 0,
113 created_at timestamp without time zone NOT NULL,
114 updated_at timestamp without time zone NOT NULL,
115 extract_id bigint
116);
117
118
119ALTER TABLE public.borderos OWNER TO postgres;
120
121--
122-- Name: borderos_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
123--
124
125CREATE SEQUENCE public.borderos_id_seq
126 START WITH 1
127 INCREMENT BY 1
128 NO MINVALUE
129 NO MAXVALUE
130 CACHE 1;
131
132
133ALTER TABLE public.borderos_id_seq OWNER TO postgres;
134
135--
136-- Name: borderos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
137--
138
139ALTER SEQUENCE public.borderos_id_seq OWNED BY public.borderos.id;
140
141
142--
143-- Name: companies; Type: TABLE; Schema: public; Owner: postgres
144--
145
146CREATE TABLE public.companies (
147 id bigint NOT NULL,
148 matrix_id bigint,
149 kind integer DEFAULT 0 NOT NULL,
150 name character varying NOT NULL,
151 cnpj character varying NOT NULL,
152 created_at timestamp without time zone NOT NULL,
153 updated_at timestamp without time zone NOT NULL,
154 company_id bigint,
155 settings jsonb DEFAULT '"{}"'::jsonb NOT NULL
156);
157
158
159ALTER TABLE public.companies OWNER TO postgres;
160
161--
162-- Name: companies_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
163--
164
165CREATE SEQUENCE public.companies_id_seq
166 START WITH 1
167 INCREMENT BY 1
168 NO MINVALUE
169 NO MAXVALUE
170 CACHE 1;
171
172
173ALTER TABLE public.companies_id_seq OWNER TO postgres;
174
175--
176-- Name: companies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
177--
178
179ALTER SEQUENCE public.companies_id_seq OWNED BY public.companies.id;
180
181
182--
183-- Name: extracts; Type: TABLE; Schema: public; Owner: postgres
184--
185
186CREATE TABLE public.extracts (
187 id bigint NOT NULL,
188 company_id bigint,
189 date date NOT NULL,
190 balance_cents integer DEFAULT 0 NOT NULL,
191 balance_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
192 created_at timestamp without time zone NOT NULL,
193 updated_at timestamp without time zone NOT NULL
194);
195
196
197ALTER TABLE public.extracts OWNER TO postgres;
198
199--
200-- Name: extracts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
201--
202
203CREATE SEQUENCE public.extracts_id_seq
204 START WITH 1
205 INCREMENT BY 1
206 NO MINVALUE
207 NO MAXVALUE
208 CACHE 1;
209
210
211ALTER TABLE public.extracts_id_seq OWNER TO postgres;
212
213--
214-- Name: extracts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
215--
216
217ALTER SEQUENCE public.extracts_id_seq OWNED BY public.extracts.id;
218
219
220--
221-- Name: invoices; Type: TABLE; Schema: public; Owner: postgres
222--
223
224CREATE TABLE public.invoices (
225 id bigint NOT NULL,
226 company_id bigint,
227 number character varying NOT NULL,
228 customer_name character varying NOT NULL,
229 billing_type integer NOT NULL,
230 issue_date date NOT NULL,
231 value_cents integer DEFAULT 0 NOT NULL,
232 value_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
233 payments_count integer DEFAULT 0,
234 created_at timestamp without time zone NOT NULL,
235 updated_at timestamp without time zone NOT NULL,
236 departure_date date,
237 request_number character varying,
238 quantity integer,
239 billing_kind character varying,
240 unity_price_cents integer,
241 unity_price_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
242 measure character varying,
243 z3_cents integer,
244 z3_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
245 market_value_cents integer,
246 market_value_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
247 total_invoiced_cents integer,
248 total_invoiced_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
249 icms_cents integer,
250 icms_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
251 ipi_cents integer,
252 ipi_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
253 average_price_cents integer,
254 average_price_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
255 freight character varying,
256 payment_term character varying,
257 seller character varying,
258 percentage_comission integer,
259 value_comission_cents integer,
260 value_comission_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
261 observations text
262);
263
264
265ALTER TABLE public.invoices OWNER TO postgres;
266
267--
268-- Name: invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
269--
270
271CREATE SEQUENCE public.invoices_id_seq
272 START WITH 1
273 INCREMENT BY 1
274 NO MINVALUE
275 NO MAXVALUE
276 CACHE 1;
277
278
279ALTER TABLE public.invoices_id_seq OWNER TO postgres;
280
281--
282-- Name: invoices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
283--
284
285ALTER SEQUENCE public.invoices_id_seq OWNED BY public.invoices.id;
286
287
288--
289-- Name: payments; Type: TABLE; Schema: public; Owner: postgres
290--
291
292CREATE TABLE public.payments (
293 id bigint NOT NULL,
294 invoice_id bigint NOT NULL,
295 value_cents integer DEFAULT 0 NOT NULL,
296 value_currency character varying DEFAULT 'BRL'::character varying NOT NULL,
297 due_date date,
298 status integer DEFAULT 0 NOT NULL,
299 created_at timestamp without time zone NOT NULL,
300 updated_at timestamp without time zone NOT NULL,
301 bordero_id bigint
302);
303
304
305ALTER TABLE public.payments OWNER TO postgres;
306
307--
308-- Name: payments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
309--
310
311CREATE SEQUENCE public.payments_id_seq
312 START WITH 1
313 INCREMENT BY 1
314 NO MINVALUE
315 NO MAXVALUE
316 CACHE 1;
317
318
319ALTER TABLE public.payments_id_seq OWNER TO postgres;
320
321--
322-- Name: payments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
323--
324
325ALTER SEQUENCE public.payments_id_seq OWNED BY public.payments.id;
326
327
328--
329-- Name: permissions; Type: TABLE; Schema: public; Owner: postgres
330--
331
332CREATE TABLE public.permissions (
333 id bigint NOT NULL,
334 subject_class character varying NOT NULL,
335 action character varying NOT NULL,
336 created_at timestamp without time zone
337);
338
339
340ALTER TABLE public.permissions OWNER TO postgres;
341
342--
343-- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
344--
345
346CREATE SEQUENCE public.permissions_id_seq
347 START WITH 1
348 INCREMENT BY 1
349 NO MINVALUE
350 NO MAXVALUE
351 CACHE 1;
352
353
354ALTER TABLE public.permissions_id_seq OWNER TO postgres;
355
356--
357-- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
358--
359
360ALTER SEQUENCE public.permissions_id_seq OWNED BY public.permissions.id;
361
362
363--
364-- Name: permissions_roles; Type: TABLE; Schema: public; Owner: postgres
365--
366
367CREATE TABLE public.permissions_roles (
368 permission_id bigint NOT NULL,
369 role_id bigint NOT NULL
370);
371
372
373ALTER TABLE public.permissions_roles OWNER TO postgres;
374
375--
376-- Name: roles; Type: TABLE; Schema: public; Owner: postgres
377--
378
379CREATE TABLE public.roles (
380 id bigint NOT NULL,
381 name character varying,
382 resource_type character varying,
383 resource_id bigint,
384 created_at timestamp without time zone NOT NULL,
385 updated_at timestamp without time zone NOT NULL
386);
387
388
389ALTER TABLE public.roles OWNER TO postgres;
390
391--
392-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
393--
394
395CREATE SEQUENCE public.roles_id_seq
396 START WITH 1
397 INCREMENT BY 1
398 NO MINVALUE
399 NO MAXVALUE
400 CACHE 1;
401
402
403ALTER TABLE public.roles_id_seq OWNER TO postgres;
404
405--
406-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
407--
408
409ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id;
410
411
412--
413-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: postgres
414--
415
416CREATE TABLE public.schema_migrations (
417 version character varying NOT NULL
418);
419
420
421ALTER TABLE public.schema_migrations OWNER TO postgres;
422
423--
424-- Name: users; Type: TABLE; Schema: public; Owner: postgres
425--
426
427CREATE TABLE public.users (
428 id bigint NOT NULL,
429 provider character varying DEFAULT 'email'::character varying NOT NULL,
430 uid character varying DEFAULT ''::character varying NOT NULL,
431 encrypted_password character varying DEFAULT ''::character varying NOT NULL,
432 reset_password_token character varying,
433 reset_password_sent_at timestamp without time zone,
434 allow_password_change boolean DEFAULT false,
435 remember_created_at timestamp without time zone,
436 sign_in_count integer DEFAULT 0 NOT NULL,
437 current_sign_in_at timestamp without time zone,
438 last_sign_in_at timestamp without time zone,
439 current_sign_in_ip character varying,
440 last_sign_in_ip character varying,
441 name character varying,
442 email character varying,
443 tokens json,
444 created_at timestamp without time zone NOT NULL,
445 updated_at timestamp without time zone NOT NULL,
446 password_will_change boolean DEFAULT false NOT NULL
447);
448
449
450ALTER TABLE public.users OWNER TO postgres;
451
452--
453-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
454--
455
456CREATE SEQUENCE public.users_id_seq
457 START WITH 1
458 INCREMENT BY 1
459 NO MINVALUE
460 NO MAXVALUE
461 CACHE 1;
462
463
464ALTER TABLE public.users_id_seq OWNER TO postgres;
465
466--
467-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
468--
469
470ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
471
472
473--
474-- Name: users_roles; Type: TABLE; Schema: public; Owner: postgres
475--
476
477CREATE TABLE public.users_roles (
478 user_id bigint,
479 role_id bigint
480);
481
482
483ALTER TABLE public.users_roles OWNER TO postgres;
484
485--
486-- Name: accounts id; Type: DEFAULT; Schema: public; Owner: postgres
487--
488
489ALTER TABLE ONLY public.accounts ALTER COLUMN id SET DEFAULT nextval('public.accounts_id_seq'::regclass);
490
491
492--
493-- Name: borderos id; Type: DEFAULT; Schema: public; Owner: postgres
494--
495
496ALTER TABLE ONLY public.borderos ALTER COLUMN id SET DEFAULT nextval('public.borderos_id_seq'::regclass);
497
498
499--
500-- Name: companies id; Type: DEFAULT; Schema: public; Owner: postgres
501--
502
503ALTER TABLE ONLY public.companies ALTER COLUMN id SET DEFAULT nextval('public.companies_id_seq'::regclass);
504
505
506--
507-- Name: extracts id; Type: DEFAULT; Schema: public; Owner: postgres
508--
509
510ALTER TABLE ONLY public.extracts ALTER COLUMN id SET DEFAULT nextval('public.extracts_id_seq'::regclass);
511
512
513--
514-- Name: invoices id; Type: DEFAULT; Schema: public; Owner: postgres
515--
516
517ALTER TABLE ONLY public.invoices ALTER COLUMN id SET DEFAULT nextval('public.invoices_id_seq'::regclass);
518
519
520--
521-- Name: payments id; Type: DEFAULT; Schema: public; Owner: postgres
522--
523
524ALTER TABLE ONLY public.payments ALTER COLUMN id SET DEFAULT nextval('public.payments_id_seq'::regclass);
525
526
527--
528-- Name: permissions id; Type: DEFAULT; Schema: public; Owner: postgres
529--
530
531ALTER TABLE ONLY public.permissions ALTER COLUMN id SET DEFAULT nextval('public.permissions_id_seq'::regclass);
532
533
534--
535-- Name: roles id; Type: DEFAULT; Schema: public; Owner: postgres
536--
537
538ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass);
539
540
541--
542-- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
543--
544
545ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
546
547
548--
549-- Data for Name: accounts; Type: TABLE DATA; Schema: public; Owner: postgres
550--
551
552COPY public.accounts (id, company_id, code, description, date, release_cents, release_currency, bx_prod_out_cents, bx_prod_out_currency, bank_dispatch_cents, bank_dispatch_currency, interest_cents, interest_currency, balance_cents, balance_currency, kind, created_at, updated_at, extract_id) FROM stdin;
5531 6 33 CombustÃvel 2018-05-10 1579 BRL 158 BRL 159 BRL 87 BRL 0 BRL 1 2018-05-10 16:37:26.099768 2018-05-10 21:13:52.281443 \N
5543 6 32 Vale alimentação 2018-06-11 535 BRL 0 BRL 1735 BRL 108 BRL 0 BRL 2 2018-05-11 20:16:56.329319 2018-05-11 20:16:56.329319 \N
5555 1 32 Vale alimentação 2018-06-11 535 BRL 0 BRL 1735 BRL 108 BRL 0 BRL 2 2018-05-15 17:51:19.208905 2018-05-15 17:51:19.208905 \N
5564 1 33 CombustÃvel 2018-05-10 1579 BRL 158 BRL 159 BRL 87 BRL 0 BRL 1 2018-05-15 17:50:53.817769 2018-05-15 17:50:53.817769 1
557\.
558
559
560--
561-- Data for Name: ar_internal_metadata; Type: TABLE DATA; Schema: public; Owner: postgres
562--
563
564COPY public.ar_internal_metadata (key, value, created_at, updated_at) FROM stdin;
565environment development 2018-04-25 13:03:48.766938 2018-04-25 13:03:48.766938
566\.
567
568
569--
570-- Data for Name: borderos; Type: TABLE DATA; Schema: public; Owner: postgres
571--
572
573COPY public.borderos (id, company_id, number, operation_tax, operation_date, bank_tax_cents, bank_tax_currency, payments_count, created_at, updated_at, extract_id) FROM stdin;
5743 6 002/2018 5 2018-04-27 15 BRL 0 2018-05-15 17:24:03.97092 2018-05-15 17:24:03.97092 \N
5754 6 001/2018 6 2018-04-25 600 BRL 2 2018-05-15 17:25:34.649071 2018-05-15 17:25:34.649071 \N
5762 1 002/2018 5 2018-04-27 15 BRL 0 2018-04-27 19:55:56.947227 2018-04-27 19:55:56.947227 \N
5771 1 001/2018 6 2018-04-25 600 BRL 2 2018-04-25 13:03:59.686784 2018-04-27 19:41:44.825082 1
578\.
579
580
581--
582-- Data for Name: companies; Type: TABLE DATA; Schema: public; Owner: postgres
583--
584
585COPY public.companies (id, matrix_id, kind, name, cnpj, created_at, updated_at, company_id, settings) FROM stdin;
5861 \N 0 Hernandes S.A. 11793919038764 2018-04-25 13:03:59.388984 2018-04-25 13:03:59.388984 \N "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
5872 \N 0 Corrêa, Muniz e Meireles 81709099599449 2018-04-25 13:03:59.432156 2018-04-25 13:03:59.432156 1 "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
5883 \N 0 DIKAPLAN Matriz 00650123029079 2018-04-25 13:04:00.137152 2018-04-25 13:04:00.137152 \N "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
5894 \N 1 DIKAPLAN Filial 45264896577346 2018-04-25 13:04:00.143337 2018-04-25 13:04:00.143337 1 "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
5905 \N 1 DIKAPLAN Filial 21996133693070 2018-04-25 13:04:00.147373 2018-04-25 13:04:00.147373 2 "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
5916 \N 1 DIKAPLAN Filial 96524498650459 2018-04-25 13:04:00.15111 2018-04-25 13:04:00.15111 3 "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
5927 \N 1 ZRP Filial 2 06161801692599 2018-05-02 20:56:11.960767 2018-05-02 20:56:11.960767 6 "{\\"departure_date\\":true,\\"request_number\\":true,\\"quantity\\":true,\\"billing_kind\\":true,\\"unity_price\\":true,\\"measure\\":true,\\"z3\\":true,\\"market_value\\":true,\\"total_invoiced\\":true,\\"icms\\":true,\\"ipi\\":true,\\"average_price\\":true,\\"freight\\":true,\\"payment_term\\":true,\\"seller\\":true,\\"percentage_comission\\":true,\\"value_comission\\":true}"
593\.
594
595
596--
597-- Data for Name: extracts; Type: TABLE DATA; Schema: public; Owner: postgres
598--
599
600COPY public.extracts (id, company_id, date, balance_cents, balance_currency, created_at, updated_at) FROM stdin;
6011 1 2018-05-15 0 BRL 2018-05-16 00:08:34.562958 2018-05-16 00:08:34.562958
602\.
603
604
605--
606-- Data for Name: invoices; Type: TABLE DATA; Schema: public; Owner: postgres
607--
608
609COPY public.invoices (id, company_id, number, customer_name, billing_type, issue_date, value_cents, value_currency, payments_count, created_at, updated_at, departure_date, request_number, quantity, billing_kind, unity_price_cents, unity_price_currency, measure, z3_cents, z3_currency, market_value_cents, market_value_currency, total_invoiced_cents, total_invoiced_currency, icms_cents, icms_currency, ipi_cents, ipi_currency, average_price_cents, average_price_currency, freight, payment_term, seller, percentage_comission, value_comission_cents, value_comission_currency, observations) FROM stdin;
6101 1 98652356 Customer name 0 2018-06-24 10000000 BRL 1 2018-04-25 13:03:59.612939 2018-04-25 13:03:59.612939 2018-05-25 0001/2018 1 Tipo A 10000000 BRL 10x30x50 100000 BRL 10000000 BRL 10000000 BRL 100000 BRL 100000 BRL 10000000 BRL SIM A vista no boleto Nome do vendedor 10 1000000 BRL \N
6112 6 25000 João 0 2018-04-25 250000 BRL 2 2018-04-25 17:43:37.154278 2018-04-25 17:43:37.154278 2018-04-25 250000 10 What 25000 BRL 200x300 1000 BRL 8000 BRL 100000000 BRL 1000 BRL 1000 BRL 100 BRL Caminhão Boleto José 10 12000 BRL Sem observações
612\.
613
614
615--
616-- Data for Name: payments; Type: TABLE DATA; Schema: public; Owner: postgres
617--
618
619COPY public.payments (id, invoice_id, value_cents, value_currency, due_date, status, created_at, updated_at, bordero_id) FROM stdin;
6201 1 10000000 BRL 2018-04-25 0 2018-04-25 15:16:00.283314 2018-04-25 15:16:00.283314 \N
6212 2 100000 BRL 2018-06-22 0 2018-04-25 17:50:17.698841 2018-04-26 20:02:17.203808 1
6223 2 150000 BRL 2018-05-22 0 2018-04-25 17:50:17.701368 2018-04-26 20:02:17.401525 1
623\.
624
625
626--
627-- Data for Name: permissions; Type: TABLE DATA; Schema: public; Owner: postgres
628--
629
630COPY public.permissions (id, subject_class, action, created_at) FROM stdin;
6311 Company index 2018-04-25 13:03:59.761679
6322 Company show 2018-04-25 13:03:59.765852
6333 Company create 2018-04-25 13:03:59.769328
6344 Company update 2018-04-25 13:03:59.773113
6355 Company destroy 2018-04-25 13:03:59.77651
6366 Invoice index 2018-04-25 13:03:59.779842
6377 Invoice show 2018-04-25 13:03:59.783941
6388 Invoice create 2018-04-25 13:03:59.787597
6399 Invoice update 2018-04-25 13:03:59.791089
64010 Invoice destroy 2018-04-25 13:03:59.794746
641\.
642
643
644--
645-- Data for Name: permissions_roles; Type: TABLE DATA; Schema: public; Owner: postgres
646--
647
648COPY public.permissions_roles (permission_id, role_id) FROM stdin;
6491 4
6502 4
6513 4
6524 4
6535 4
6546 4
6557 4
6568 4
6579 4
65810 4
6591 7
6602 7
6616 7
6627 7
6638 7
6649 7
665\.
666
667
668--
669-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: postgres
670--
671
672COPY public.roles (id, name, resource_type, resource_id, created_at, updated_at) FROM stdin;
6731 admin \N \N 2018-04-25 13:03:58.350936 2018-04-25 13:03:58.350936
6742 client Company 1 2018-04-25 13:03:59.451706 2018-04-25 13:03:59.451706
6753 client Company 2 2018-04-25 13:03:59.505333 2018-04-25 13:03:59.505333
6764 client Company 3 2018-04-25 13:04:00.188373 2018-04-25 13:04:00.188373
6775 client Company 4 2018-04-25 13:04:00.195186 2018-04-25 13:04:00.195186
6786 client Company 5 2018-04-25 13:04:00.209004 2018-04-25 13:04:00.209004
6797 client Company 6 2018-04-25 13:04:00.217112 2018-04-25 13:04:00.217112
680\.
681
682
683--
684-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
685--
686
687COPY public.schema_migrations (version) FROM stdin;
68820180322180325
68920180323144022
69020180328124758
69120180328143836
69220180329155202
69320180403143657
69420180403205905
69520180403210034
69620180405145054
69720180405150308
69820180407145032
69920180410120730
70020180410121002
70120180507113529
70220180510135040
70320180510140801
70420180510141404
705\.
706
707
708--
709-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
710--
711
712COPY public.users (id, provider, uid, encrypted_password, reset_password_token, reset_password_sent_at, allow_password_change, remember_created_at, sign_in_count, current_sign_in_at, last_sign_in_at, current_sign_in_ip, last_sign_in_ip, name, email, tokens, created_at, updated_at, password_will_change) FROM stdin;
7132 email client@dikaplan.com.br $2a$11$SDQZJ/RtpUSTUnGei3iI7Osk1mzo0xGs9vK.FBcS7ToMdLkDXK5RC \N \N f \N 0 \N \N \N \N DIKAPLAN client client@dikaplan.com.br {} 2018-04-25 13:03:58.646939 2018-04-25 13:03:58.646939 f
7143 email dikaplan@dikaplan.com $2a$11$K899iJv2KY6Sgp6abA9PLOm9GkIEFb7ni1xqAOLi0Nn2ESH87CNWC \N \N f \N 0 \N \N \N \N DIKAPLAN User dikaplan@dikaplan.com {} 2018-04-25 13:03:59.978722 2018-04-25 13:03:59.978722 f
7154 email user@dikaplan.com $2a$11$jXP1U4.ZQ29wZFSl6QFdnOb4y9bMu1nDZGLlmR2DT4R3ipFq2ixqG \N \N f \N 0 \N \N \N \N Dikaplan Client user@dikaplan.com {} 2018-04-25 13:04:00.123219 2018-04-25 13:04:00.123219 f
7161 email zrp@zrp.com.br $2a$11$K/4R7PDMK8Zk0iu0aJVM5uUmI./rXzTnjdIpFhS67FEY91JJjW.1C \N \N f \N 55 2018-05-18 18:05:02.576651 2018-05-17 19:20:08.675478 127.0.0.1 127.0.0.1 ZRP Aplicações zrp@zrp.com.br {"TY0kO1ducaMckKytDVMDEg":{"token":"$2a$10$XZ96jKnjVDkLTk2Qy3H.G.kYlNGGkT9HqfJZan.N44ZdhNu/L2EnK","expiry":1526669626},"u2GFIDIVz4y2ZQjO7DBU3A":{"token":"$2a$10$n7HhFjk7AEnW9i/STMSPNu4wQkyM2K4nCxAkDlXIMPu0w.lkWne/a","expiry":1526675250},"Y6s8Yp3yK4pWml4G1ijV0Q":{"token":"$2a$10$.RTbJoWCOv4Ak531Dpxj5e735z.ZJWy3Wf5BYsnHFMy8hqFnd7Shy","expiry":1526876744},"4kvNEqJS40SEcaw_2LebrQ":{"token":"$2a$10$u.95pFaeoe3hG5UPqlRxpuXFyjabM7qMIsnq0cdxoGLHmcUQ3VdXi","expiry":1526919060},"Q2SFX3Qxj10_WUPquUDFzw":{"token":"$2a$10$Ei8ZMIthOhgtJ6jZvpU42.jPHjP10.Efb67tOs8TYHb5/ywcVqd6C","expiry":1526923312},"n6rqzsD0uPYLgIbZAihXJA":{"token":"$2a$10$6jO6nA2GhCIgyrxbUbAEROLDdQvDwH5bFX7AfRe4DLN5R.Ber9Tby","expiry":1526939760},"RDYo1l4cC5PtWoW7lfCcnQ":{"token":"$2a$10$GKMIOUG/lB4ULTFB9euKk.NVHDHX32h7eLrrojw2YvuZ.T4y7NFge","expiry":1526951278},"3IsOKppSqXuD0PbTEqnkrA":{"token":"$2a$10$yWaBeyZLVDb/U8ZsA.4H2us/k9h/tPVmseL75nov4fmVmmFRv1VSi","expiry":1527006163},"QMiY7i6zIoE2_aX45qO4NA":{"token":"$2a$10$SlMiri.vo0WrIwogCQbRH.XfmbUBtTIkXK5JVNxfiV08L0U9Rhvn6","expiry":1527010039},"lBh9AyAjExuOcLlDuUJUBQ":{"token":"$2a$10$DogSP33w6ZvKADRCJ0Xf4OUvKi0SpPNtOEYHs3zMiu5LAvddYBXky","expiry":1527011662},"hBJN2-qR3M6s3e7WNVVdEw":{"token":"$2a$10$djZxWD/qDuErjDiY7QksoOipXlxlsEiHlxKounCcD29N7ZiMxiWHK","expiry":1527013603},"yEtQISXJGFuVLXIGHSN96A":{"token":"$2a$10$TOn0hH48ncsCu2bO4kFsHuADNaD5GDCy6qrg9ToHTAePfrFIa8k1m","expiry":1527016583},"IOdZf0E_6N9C7lNO0CV21g":{"token":"$2a$10$7mQdHVz7KlSJ6ku9rNDXWOVecPFXR4RyszVFD4ML.ZGlBWBJZN1ca","expiry":1527016776},"PUGIkhpZKP7a_6TOzcBqMg":{"token":"$2a$10$u/tm0dQa8CXlSeiHlx0yPuLMENfRl07TaFNBs3xjSlpBiO0nABgT2","expiry":1527022074},"N5TxyTu51f8NqlYt_vr-xw":{"token":"$2a$10$XT2CpLNB2iUiNA8OHtJwEubYNrI6LoawM0sdBzstyFQpclNeBnXdi","expiry":1527095555},"dszAe0qlH-R_13Ma_HyGdw":{"token":"$2a$10$YTiz3pC2guiHvupfMjvKA.uUXWjvIFMrRWL8BEQA4Fs4DY/GP1q2u","expiry":1527103902},"qCRthFuUs228M8ezae-_Rw":{"token":"$2a$10$IcMZ5Ai.03KQ0sx2f171s.1OoC/in174utjbzXNzay1ZEv5dP/mP.","expiry":1527104295},"4_XPBjIOeTcLPLsvVzyIvg":{"token":"$2a$10$IAXbBlR1uzhRv4fOdwgtgOq6PijPSN12X4ezzbEN4ah.l/pbsC9Iq","expiry":1527108821},"KknaX8oqYtEF7GtxPMzc_A":{"token":"$2a$10$4HWMCGipbI/WLmqnPGnhCuwtrQepjt2yRN5giKECEy5itmdb3mCEG","expiry":1527112117},"V6EtyTXSbm7yDZ2S34f1vw":{"token":"$2a$10$wMPkdkeqtskudc9OPpZl0OV9JL1VdyN8tiGjSpTRwyKpNOHf6cXsS","expiry":1527179729},"2bNF4J1RWYHIH1stULmzAw":{"token":"$2a$10$2t8vEfr.blnqe8Qr9Ho.1.WuD5mjz1weD1nilZ1xWzC6QpwIHP1li","expiry":1527185854},"4p0DuZNjmLFVIQOk0mgOGg":{"token":"$2a$10$lkc8lxF9W3vtMknJW/bvcOOx22dk6zAB6o7HfPyf9xct0SAuJdWxa","expiry":1527279353},"XK75rYJRtJMCrs398N9Faw":{"token":"$2a$10$HSmQmMfdj0qxZwXyYOZrnOgCDJpusSoOomksppI97T.TbjaqFsixK","expiry":1527608533},"t2DinmQmTW1y0_WxU2poTg":{"token":"$2a$10$wxZsAW4EYfs/UFqhNFXReu8Sb0kGg/9gVVlPt7hTY7OSIDneS4IYS","expiry":1527613293},"b7CUTzsBy6V6oZVbdUKJnA":{"token":"$2a$10$qU7IoSLSIS7lwRLt5QSpcOXvp2rAnOpP1YVoDa9rafTmsXVvia3oG","expiry":1527622635},"9XzAFWuPy6D35bmC7mFzdQ":{"token":"$2a$10$1xaaNRIOQWxJaSkY.szf/OylcPr6XJ9VXa0kuncVh3XsJN.bjDTK.","expiry":1527624423},"4uutzMM3-Lu9cAbZlUUP2g":{"token":"$2a$10$EOJ8edSrJEXlO1paUhj/BeO6w1iNtV2w8lb1B1/lQ65DSUZP365h2","expiry":1527627926},"sOHbvSDDWQF9SRaxrsxfeg":{"token":"$2a$10$FlCcn7l.ecb31xT/wQvHrOUkZvsbmhAmW8guJ/yfjXGBq9t4/xKmC","expiry":1527628483},"jRrITdyOx944EvahrSDGAw":{"token":"$2a$10$jK8GJk1s46B4WxRjqneUhe9InvI0BwIaMYO6XyGCzolTeYgnKIEC2","expiry":1527637855},"JlRwrJDT3mZ5wkwexUK_ZA":{"token":"$2a$10$SBsa5nY.ViooTTsfNq79xeCnoMCq2/rJgsZsBXWjYfoe8IckcfasK","expiry":1527683386},"VPhBR_Ji1ejXN1g7-S5IzA":{"token":"$2a$10$jm7et.NKM5Dbjysc17eGTePoB4LMhfZKtHPw8Wl9zLeGl2Ki.fNay","expiry":1527696321},"aSTe3QqFV8ADpJJHrcCzCg":{"token":"$2a$10$SCOh6AfBc0CvQ2pDdJAwI.2pcXFWM5RnaI6FUvApYFJ0GtljYo8Ji","expiry":1527702334},"NEmPhcpJf8d31C780bnudw":{"token":"$2a$10$JrbznzA5moOUccWPs9Rg6ekD3swxZp.bfqwySCmN8pDVErhQsUXnG","expiry":1527705184},"yOLX9YWajd_8dlI1K5eSnQ":{"token":"$2a$10$jCaxe5tT2n9/BpT9K45fZevmJ/wv4StsXxtARhst8DANiGfG4Yl.C","expiry":1527775460},"EoYesYOd2QHer12KOO8z1w":{"token":"$2a$10$SgqZ3TiF3EZHfFiu6GJBDutbPKcrhNWmGo9VFNajBqVG7VEHdYsg.","expiry":1527789092},"iETEmb8IsJMpgi5Myu7QKg":{"token":"$2a$10$eiNK7/MVz0zLB68WiU3lwOF2tfKoU4CejkjgOB.yoflGzgeMtlL8i","expiry":1527794408},"faqRFR7PZeFi7uXSHcdUSg":{"token":"$2a$10$0FGiZXUDzXnRpn.uQQMm3.0qfaQaDgsFFSM7Q/lBL7lJ0RT3tSFhm","expiry":1527876302}} 2018-04-25 13:03:58.287788 2018-05-18 18:05:02.583012 f
717\.
718
719
720--
721-- Data for Name: users_roles; Type: TABLE DATA; Schema: public; Owner: postgres
722--
723
724COPY public.users_roles (user_id, role_id) FROM stdin;
7251 1
7262 2
7272 3
7283 2
7293 3
7303 4
7313 5
7324 5
7333 6
7344 6
7353 7
7364 7
737\.
738
739
740--
741-- Name: accounts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
742--
743
744SELECT pg_catalog.setval('public.accounts_id_seq', 5, true);
745
746
747--
748-- Name: borderos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
749--
750
751SELECT pg_catalog.setval('public.borderos_id_seq', 4, true);
752
753
754--
755-- Name: companies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
756--
757
758SELECT pg_catalog.setval('public.companies_id_seq', 7, true);
759
760
761--
762-- Name: extracts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
763--
764
765SELECT pg_catalog.setval('public.extracts_id_seq', 1, true);
766
767
768--
769-- Name: invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
770--
771
772SELECT pg_catalog.setval('public.invoices_id_seq', 2, true);
773
774
775--
776-- Name: payments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
777--
778
779SELECT pg_catalog.setval('public.payments_id_seq', 3, true);
780
781
782--
783-- Name: permissions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
784--
785
786SELECT pg_catalog.setval('public.permissions_id_seq', 10, true);
787
788
789--
790-- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
791--
792
793SELECT pg_catalog.setval('public.roles_id_seq', 7, true);
794
795
796--
797-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
798--
799
800SELECT pg_catalog.setval('public.users_id_seq', 5, false);
801
802
803--
804-- Name: accounts accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
805--
806
807ALTER TABLE ONLY public.accounts
808 ADD CONSTRAINT accounts_pkey PRIMARY KEY (id);
809
810
811--
812-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
813--
814
815ALTER TABLE ONLY public.ar_internal_metadata
816 ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
817
818
819--
820-- Name: borderos borderos_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
821--
822
823ALTER TABLE ONLY public.borderos
824 ADD CONSTRAINT borderos_pkey PRIMARY KEY (id);
825
826
827--
828-- Name: companies companies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
829--
830
831ALTER TABLE ONLY public.companies
832 ADD CONSTRAINT companies_pkey PRIMARY KEY (id);
833
834
835--
836-- Name: extracts extracts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
837--
838
839ALTER TABLE ONLY public.extracts
840 ADD CONSTRAINT extracts_pkey PRIMARY KEY (id);
841
842
843--
844-- Name: invoices invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
845--
846
847ALTER TABLE ONLY public.invoices
848 ADD CONSTRAINT invoices_pkey PRIMARY KEY (id);
849
850
851--
852-- Name: payments payments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
853--
854
855ALTER TABLE ONLY public.payments
856 ADD CONSTRAINT payments_pkey PRIMARY KEY (id);
857
858
859--
860-- Name: permissions permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
861--
862
863ALTER TABLE ONLY public.permissions
864 ADD CONSTRAINT permissions_pkey PRIMARY KEY (id);
865
866
867--
868-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
869--
870
871ALTER TABLE ONLY public.roles
872 ADD CONSTRAINT roles_pkey PRIMARY KEY (id);
873
874
875--
876-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
877--
878
879ALTER TABLE ONLY public.schema_migrations
880 ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
881
882
883--
884-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
885--
886
887ALTER TABLE ONLY public.users
888 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
889
890
891--
892-- Name: index_accounts_on_company_id; Type: INDEX; Schema: public; Owner: postgres
893--
894
895CREATE INDEX index_accounts_on_company_id ON public.accounts USING btree (company_id);
896
897
898--
899-- Name: index_accounts_on_extract_id; Type: INDEX; Schema: public; Owner: postgres
900--
901
902CREATE INDEX index_accounts_on_extract_id ON public.accounts USING btree (extract_id);
903
904
905--
906-- Name: index_borderos_on_company_id; Type: INDEX; Schema: public; Owner: postgres
907--
908
909CREATE INDEX index_borderos_on_company_id ON public.borderos USING btree (company_id);
910
911
912--
913-- Name: index_borderos_on_extract_id; Type: INDEX; Schema: public; Owner: postgres
914--
915
916CREATE INDEX index_borderos_on_extract_id ON public.borderos USING btree (extract_id);
917
918
919--
920-- Name: index_companies_on_cnpj; Type: INDEX; Schema: public; Owner: postgres
921--
922
923CREATE INDEX index_companies_on_cnpj ON public.companies USING btree (cnpj);
924
925
926--
927-- Name: index_companies_on_company_id; Type: INDEX; Schema: public; Owner: postgres
928--
929
930CREATE INDEX index_companies_on_company_id ON public.companies USING btree (company_id);
931
932
933--
934-- Name: index_companies_on_kind; Type: INDEX; Schema: public; Owner: postgres
935--
936
937CREATE INDEX index_companies_on_kind ON public.companies USING btree (kind);
938
939
940--
941-- Name: index_companies_on_matrix_id; Type: INDEX; Schema: public; Owner: postgres
942--
943
944CREATE INDEX index_companies_on_matrix_id ON public.companies USING btree (matrix_id);
945
946
947--
948-- Name: index_companies_on_settings; Type: INDEX; Schema: public; Owner: postgres
949--
950
951CREATE INDEX index_companies_on_settings ON public.companies USING gin (settings);
952
953
954--
955-- Name: index_extracts_on_company_id; Type: INDEX; Schema: public; Owner: postgres
956--
957
958CREATE INDEX index_extracts_on_company_id ON public.extracts USING btree (company_id);
959
960
961--
962-- Name: index_extracts_on_date; Type: INDEX; Schema: public; Owner: postgres
963--
964
965CREATE INDEX index_extracts_on_date ON public.extracts USING btree (date);
966
967
968--
969-- Name: index_invoices_on_company_id; Type: INDEX; Schema: public; Owner: postgres
970--
971
972CREATE INDEX index_invoices_on_company_id ON public.invoices USING btree (company_id);
973
974
975--
976-- Name: index_invoices_on_customer_name; Type: INDEX; Schema: public; Owner: postgres
977--
978
979CREATE INDEX index_invoices_on_customer_name ON public.invoices USING btree (customer_name);
980
981
982--
983-- Name: index_invoices_on_number; Type: INDEX; Schema: public; Owner: postgres
984--
985
986CREATE INDEX index_invoices_on_number ON public.invoices USING btree (number);
987
988
989--
990-- Name: index_payments_on_bordero_id; Type: INDEX; Schema: public; Owner: postgres
991--
992
993CREATE INDEX index_payments_on_bordero_id ON public.payments USING btree (bordero_id);
994
995
996--
997-- Name: index_payments_on_invoice_id; Type: INDEX; Schema: public; Owner: postgres
998--
999
1000CREATE INDEX index_payments_on_invoice_id ON public.payments USING btree (invoice_id);
1001
1002
1003--
1004-- Name: index_payments_on_status; Type: INDEX; Schema: public; Owner: postgres
1005--
1006
1007CREATE INDEX index_payments_on_status ON public.payments USING btree (status);
1008
1009
1010--
1011-- Name: index_payments_on_value_cents_and_due_date; Type: INDEX; Schema: public; Owner: postgres
1012--
1013
1014CREATE INDEX index_payments_on_value_cents_and_due_date ON public.payments USING btree (value_cents, due_date);
1015
1016
1017--
1018-- Name: index_permissions_on_subject_class_and_action; Type: INDEX; Schema: public; Owner: postgres
1019--
1020
1021CREATE UNIQUE INDEX index_permissions_on_subject_class_and_action ON public.permissions USING btree (subject_class, action);
1022
1023
1024--
1025-- Name: index_permissions_roles_on_permission_id_and_role_id; Type: INDEX; Schema: public; Owner: postgres
1026--
1027
1028CREATE INDEX index_permissions_roles_on_permission_id_and_role_id ON public.permissions_roles USING btree (permission_id, role_id);
1029
1030
1031--
1032-- Name: index_roles_on_name_and_resource_type_and_resource_id; Type: INDEX; Schema: public; Owner: postgres
1033--
1034
1035CREATE INDEX index_roles_on_name_and_resource_type_and_resource_id ON public.roles USING btree (name, resource_type, resource_id);
1036
1037
1038--
1039-- Name: index_roles_on_resource_type_and_resource_id; Type: INDEX; Schema: public; Owner: postgres
1040--
1041
1042CREATE INDEX index_roles_on_resource_type_and_resource_id ON public.roles USING btree (resource_type, resource_id);
1043
1044
1045--
1046-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: postgres
1047--
1048
1049CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email);
1050
1051
1052--
1053-- Name: index_users_on_reset_password_token; Type: INDEX; Schema: public; Owner: postgres
1054--
1055
1056CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING btree (reset_password_token);
1057
1058
1059--
1060-- Name: index_users_on_uid_and_provider; Type: INDEX; Schema: public; Owner: postgres
1061--
1062
1063CREATE UNIQUE INDEX index_users_on_uid_and_provider ON public.users USING btree (uid, provider);
1064
1065
1066--
1067-- Name: index_users_roles_on_role_id; Type: INDEX; Schema: public; Owner: postgres
1068--
1069
1070CREATE INDEX index_users_roles_on_role_id ON public.users_roles USING btree (role_id);
1071
1072
1073--
1074-- Name: index_users_roles_on_user_id; Type: INDEX; Schema: public; Owner: postgres
1075--
1076
1077CREATE INDEX index_users_roles_on_user_id ON public.users_roles USING btree (user_id);
1078
1079
1080--
1081-- Name: index_users_roles_on_user_id_and_role_id; Type: INDEX; Schema: public; Owner: postgres
1082--
1083
1084CREATE INDEX index_users_roles_on_user_id_and_role_id ON public.users_roles USING btree (user_id, role_id);
1085
1086
1087--
1088-- Name: accounts fk_rails_103731f3e2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1089--
1090
1091ALTER TABLE ONLY public.accounts
1092 ADD CONSTRAINT fk_rails_103731f3e2 FOREIGN KEY (extract_id) REFERENCES public.extracts(id);
1093
1094
1095--
1096-- Name: accounts fk_rails_2e7d5f83d7; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1097--
1098
1099ALTER TABLE ONLY public.accounts
1100 ADD CONSTRAINT fk_rails_2e7d5f83d7 FOREIGN KEY (company_id) REFERENCES public.companies(id);
1101
1102
1103--
1104-- Name: invoices fk_rails_433d4c368d; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1105--
1106
1107ALTER TABLE ONLY public.invoices
1108 ADD CONSTRAINT fk_rails_433d4c368d FOREIGN KEY (company_id) REFERENCES public.companies(id);
1109
1110
1111--
1112-- Name: extracts fk_rails_6085b2edf1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1113--
1114
1115ALTER TABLE ONLY public.extracts
1116 ADD CONSTRAINT fk_rails_6085b2edf1 FOREIGN KEY (company_id) REFERENCES public.companies(id);
1117
1118
1119--
1120-- Name: payments fk_rails_62d18ea517; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1121--
1122
1123ALTER TABLE ONLY public.payments
1124 ADD CONSTRAINT fk_rails_62d18ea517 FOREIGN KEY (invoice_id) REFERENCES public.invoices(id);
1125
1126
1127--
1128-- Name: borderos fk_rails_c72e03baf5; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1129--
1130
1131ALTER TABLE ONLY public.borderos
1132 ADD CONSTRAINT fk_rails_c72e03baf5 FOREIGN KEY (extract_id) REFERENCES public.extracts(id);
1133
1134
1135--
1136-- Name: payments fk_rails_d606e5e5fa; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1137--
1138
1139ALTER TABLE ONLY public.payments
1140 ADD CONSTRAINT fk_rails_d606e5e5fa FOREIGN KEY (bordero_id) REFERENCES public.borderos(id);
1141
1142
1143--
1144-- Name: borderos fk_rails_fe7a03d031; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1145--
1146
1147ALTER TABLE ONLY public.borderos
1148 ADD CONSTRAINT fk_rails_fe7a03d031 FOREIGN KEY (company_id) REFERENCES public.companies(id);
1149
1150
1151--
1152-- PostgreSQL database dump complete
1153--