-- -- PostgreSQL database dump -- -- Dumped from database version 12.22 (Ubuntu 12.22-0ubuntu0.20.04.4) -- Dumped by pg_dump version 12.22 (Ubuntu 12.22-0ubuntu0.20.04.4) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; 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; -- -- Name: address_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.address_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE MAXVALUE 32767 CACHE 1; ALTER TABLE public.address_id_seq OWNER TO vespot; SET default_tablespace = ''; SET default_table_access_method = heap; -- -- Name: addresses; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.addresses ( address_id integer NOT NULL, client_id integer, name character varying, address character varying, country_id integer, city character varying ); ALTER TABLE public.addresses OWNER TO vespot; -- -- Name: addresses_address_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.addresses_address_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.addresses_address_id_seq OWNER TO vespot; -- -- Name: addresses_address_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.addresses_address_id_seq OWNED BY public.addresses.address_id; -- -- Name: categories; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.categories ( category_id smallint NOT NULL, name character varying, standar_code character varying, reference character varying, material character varying ); ALTER TABLE public.categories OWNER TO vespot; -- -- Name: categories_category_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.categories_category_id_seq AS smallint START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.categories_category_id_seq OWNER TO vespot; -- -- Name: categories_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.categories_category_id_seq OWNED BY public.categories.category_id; -- -- Name: clients; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.clients ( client_id smallint NOT NULL, name character varying, address character varying, phonenumber1 character varying, phonenumber2 character varying, contact_name character varying ); ALTER TABLE public.clients OWNER TO vespot; -- -- Name: clients_client_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.clients_client_id_seq AS smallint START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.clients_client_id_seq OWNER TO vespot; -- -- Name: clients_client_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.clients_client_id_seq OWNED BY public.clients.client_id; -- -- Name: countries; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.countries ( country_id smallint NOT NULL, name character varying ); ALTER TABLE public.countries OWNER TO vespot; -- -- Name: delivery_types; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.delivery_types ( delivery_type_id smallint NOT NULL, name character varying ); ALTER TABLE public.delivery_types OWNER TO vespot; -- -- Name: incidents_id; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.incidents_id ( incident_id smallint NOT NULL, name character varying, detail character varying, quantity integer, turn_incidents_id integer ); ALTER TABLE public.incidents_id OWNER TO vespot; -- -- Name: incidents_id_incident_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.incidents_id_incident_id_seq AS smallint START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.incidents_id_incident_id_seq OWNER TO vespot; -- -- Name: incidents_id_incident_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.incidents_id_incident_id_seq OWNED BY public.incidents_id.incident_id; -- -- Name: input_types; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.input_types ( input_type_id smallint NOT NULL, name character varying, reference character varying, standar_code character varying ); ALTER TABLE public.input_types OWNER TO vespot; -- -- Name: input_types_input_type_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.input_types_input_type_id_seq AS smallint START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.input_types_input_type_id_seq OWNER TO vespot; -- -- Name: input_types_input_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.input_types_input_type_id_seq OWNED BY public.input_types.input_type_id; -- -- Name: inputs; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.inputs ( input_id integer NOT NULL, barcode character varying, lot character varying, name character varying, supplier_id integer, input_type_id smallint, reception_date timestamp without time zone, quantity real, standar_code character varying, disponible real ); ALTER TABLE public.inputs OWNER TO vespot; -- -- Name: inputs_input_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.inputs_input_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.inputs_input_id_seq OWNER TO vespot; -- -- Name: inputs_input_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.inputs_input_id_seq OWNED BY public.inputs.input_id; -- -- Name: invoices_invoice_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.invoices_invoice_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE MAXVALUE 32767 CACHE 1; ALTER TABLE public.invoices_invoice_id_seq OWNER TO vespot; -- -- Name: invoices; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.invoices ( invoice_id integer DEFAULT nextval('public.invoices_invoice_id_seq'::regclass) NOT NULL, client_id integer, invoice_date timestamp without time zone ); ALTER TABLE public.invoices OWNER TO vespot; -- -- Name: invoices_products; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.invoices_products ( invoice_id integer NOT NULL, product_id integer NOT NULL, quantity real, remission_id integer NOT NULL ); ALTER TABLE public.invoices_products OWNER TO vespot; -- -- Name: lines; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.lines ( line_id smallint NOT NULL, name character varying ); ALTER TABLE public.lines OWNER TO vespot; -- -- Name: lines_line_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.lines_line_id_seq AS smallint START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.lines_line_id_seq OWNER TO vespot; -- -- Name: lines_line_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.lines_line_id_seq OWNED BY public.lines.line_id; -- -- Name: lines_machines; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.lines_machines ( line_id smallint NOT NULL, machine_id smallint NOT NULL ); ALTER TABLE public.lines_machines OWNER TO vespot; -- -- Name: machines; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.machines ( machine_id smallint NOT NULL, name character varying, serial character varying ); ALTER TABLE public.machines OWNER TO vespot; -- -- Name: machines_machine_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.machines_machine_id_seq AS smallint START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.machines_machine_id_seq OWNER TO vespot; -- -- Name: machines_machine_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.machines_machine_id_seq OWNED BY public.machines.machine_id; -- -- Name: operators; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.operators ( operator_id integer NOT NULL, is_leader boolean, name character varying, document_number character varying, rh character varying, operator_type_id smallint ); ALTER TABLE public.operators OWNER TO vespot; -- -- Name: operators_operator_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.operators_operator_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.operators_operator_id_seq OWNER TO vespot; -- -- Name: operators_operator_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.operators_operator_id_seq OWNED BY public.operators.operator_id; -- -- Name: preproducts; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.preproducts ( preproduct_id integer NOT NULL, measure integer, standar_code character varying, lot character varying, material character varying, weight real, caliber real, fabrication_date timestamp without time zone, turn_id integer, quantity integer, waste real, residue real, details character varying ); ALTER TABLE public.preproducts OWNER TO vespot; -- -- Name: preproducts_preproduct_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.preproducts_preproduct_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.preproducts_preproduct_id_seq OWNER TO vespot; -- -- Name: preproducts_preproduct_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.preproducts_preproduct_id_seq OWNED BY public.preproducts.preproduct_id; -- -- Name: products; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.products ( product_id integer NOT NULL, fabrication_date timestamp without time zone, name character varying, barcode character varying, category_id smallint, product_status_id smallint, turn_id integer, sale_order_id integer, weight real, waste real, supplier_id integer, quantity real, available integer ); ALTER TABLE public.products OWNER TO vespot; -- -- Name: products_inputs; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.products_inputs ( product_id integer NOT NULL, input_id integer NOT NULL ); ALTER TABLE public.products_inputs OWNER TO vespot; -- -- Name: products_product_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.products_product_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.products_product_id_seq OWNER TO vespot; -- -- Name: products_product_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.products_product_id_seq OWNED BY public.products.product_id; -- -- Name: products_status; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.products_status ( product_status_id smallint NOT NULL, name character varying, description character varying ); ALTER TABLE public.products_status OWNER TO vespot; -- -- Name: products_technical_data; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.products_technical_data ( product_id integer NOT NULL, reference character varying, article character varying, product_group character varying, presentation character varying, cai character varying, height numeric, width numeric, square_meters numeric, diameter numeric, length numeric, angle numeric, sale_value numeric, rental_value numeric ); ALTER TABLE public.products_technical_data OWNER TO vespot; -- -- Name: remissions; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.remissions ( remission_id integer NOT NULL, client_id integer, address_id integer, request_date timestamp without time zone, deliver_date timestamp without time zone, name character varying, is_delivery boolean ); ALTER TABLE public.remissions OWNER TO vespot; -- -- Name: remission_remission_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.remission_remission_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.remission_remission_id_seq OWNER TO vespot; -- -- Name: remission_remission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.remission_remission_id_seq OWNED BY public.remissions.remission_id; -- -- Name: remissions_products; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.remissions_products ( remission_id integer NOT NULL, product_id integer NOT NULL, quantity real, full_delivered boolean, quantity_for_return integer ); ALTER TABLE public.remissions_products OWNER TO vespot; -- -- Name: remissions_remission_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.remissions_remission_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE MAXVALUE 32767 CACHE 1; ALTER TABLE public.remissions_remission_id_seq OWNER TO vespot; -- -- Name: returns_return_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.returns_return_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE MAXVALUE 32767 CACHE 1; ALTER TABLE public.returns_return_id_seq OWNER TO vespot; -- -- Name: returns; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.returns ( return_id integer DEFAULT nextval('public.returns_return_id_seq'::regclass) NOT NULL, client_id integer, return_date timestamp without time zone ); ALTER TABLE public.returns OWNER TO vespot; -- -- Name: returns_products; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.returns_products ( return_id integer NOT NULL, product_id integer NOT NULL, quantity real, remission_id integer NOT NULL ); ALTER TABLE public.returns_products OWNER TO vespot; -- -- Name: sale_order_status; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.sale_order_status ( sale_order_status_id smallint NOT NULL, name character varying, description character varying ); ALTER TABLE public.sale_order_status OWNER TO vespot; -- -- Name: sale_orders; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.sale_orders ( sale_order_id integer NOT NULL, internal_code character varying, order_date timestamp without time zone, client_id smallint, description character varying, delivery_type_id smallint, sale_order_status_id smallint ); ALTER TABLE public.sale_orders OWNER TO vespot; -- -- Name: sale_orders_categories; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.sale_orders_categories ( sale_order_id integer NOT NULL, category_id smallint NOT NULL, quantity double precision ); ALTER TABLE public.sale_orders_categories OWNER TO vespot; -- -- Name: sale_orders_sale_order_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.sale_orders_sale_order_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.sale_orders_sale_order_id_seq OWNER TO vespot; -- -- Name: sale_orders_sale_order_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.sale_orders_sale_order_id_seq OWNED BY public.sale_orders.sale_order_id; -- -- Name: supplier_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.supplier_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE MAXVALUE 32767 CACHE 1; ALTER TABLE public.supplier_id_seq OWNER TO vespot; -- -- Name: suppliers; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.suppliers ( supplier_id integer NOT NULL, name character varying, address character varying, phonenumber1 character varying, phonenumber2 character varying, contact_name character varying ); ALTER TABLE public.suppliers OWNER TO vespot; -- -- Name: suppliers_input_types; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.suppliers_input_types ( supplier_id integer, input_type_id integer ); ALTER TABLE public.suppliers_input_types OWNER TO vespot; -- -- Name: suppliers_supplier_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.suppliers_supplier_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.suppliers_supplier_id_seq OWNER TO vespot; -- -- Name: suppliers_supplier_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.suppliers_supplier_id_seq OWNED BY public.suppliers.supplier_id; -- -- Name: turn_incidents; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.turn_incidents ( turn_incident_id integer NOT NULL, turn_id integer, description character varying, title character varying ); ALTER TABLE public.turn_incidents OWNER TO vespot; -- -- Name: turn_incidents_turn_incident_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.turn_incidents_turn_incident_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.turn_incidents_turn_incident_id_seq OWNER TO vespot; -- -- Name: turn_incidents_turn_incident_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.turn_incidents_turn_incident_id_seq OWNED BY public.turn_incidents.turn_incident_id; -- -- Name: turn_types; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.turn_types ( turn_type_id integer NOT NULL, initial_hour time without time zone, final_hour time without time zone, description character varying ); ALTER TABLE public.turn_types OWNER TO vespot; -- -- Name: turns; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.turns ( turn_id integer NOT NULL, line_id smallint, start_time timestamp without time zone, end_time timestamp without time zone, turn_type_id integer, waste real, residue real, waste_desc character varying, peletizado character varying, original character varying ); ALTER TABLE public.turns OWNER TO vespot; -- -- Name: turns_operators; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.turns_operators ( turn_id integer NOT NULL, operator_id integer NOT NULL ); ALTER TABLE public.turns_operators OWNER TO vespot; -- -- Name: turns_turn_id_seq; Type: SEQUENCE; Schema: public; Owner: vespot -- CREATE SEQUENCE public.turns_turn_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.turns_turn_id_seq OWNER TO vespot; -- -- Name: turns_turn_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vespot -- ALTER SEQUENCE public.turns_turn_id_seq OWNED BY public.turns.turn_id; -- -- Name: units_measure; Type: TABLE; Schema: public; Owner: vespot -- CREATE TABLE public.units_measure ( name character varying, standar_code character varying NOT NULL ); ALTER TABLE public.units_measure OWNER TO vespot; -- -- Name: addresses address_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.addresses ALTER COLUMN address_id SET DEFAULT nextval('public.addresses_address_id_seq'::regclass); -- -- Name: categories category_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.categories ALTER COLUMN category_id SET DEFAULT nextval('public.categories_category_id_seq'::regclass); -- -- Name: clients client_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.clients ALTER COLUMN client_id SET DEFAULT nextval('public.clients_client_id_seq'::regclass); -- -- Name: incidents_id incident_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.incidents_id ALTER COLUMN incident_id SET DEFAULT nextval('public.incidents_id_incident_id_seq'::regclass); -- -- Name: input_types input_type_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.input_types ALTER COLUMN input_type_id SET DEFAULT nextval('public.input_types_input_type_id_seq'::regclass); -- -- Name: inputs input_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.inputs ALTER COLUMN input_id SET DEFAULT nextval('public.inputs_input_id_seq'::regclass); -- -- Name: lines line_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.lines ALTER COLUMN line_id SET DEFAULT nextval('public.lines_line_id_seq'::regclass); -- -- Name: machines machine_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.machines ALTER COLUMN machine_id SET DEFAULT nextval('public.machines_machine_id_seq'::regclass); -- -- Name: operators operator_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.operators ALTER COLUMN operator_id SET DEFAULT nextval('public.operators_operator_id_seq'::regclass); -- -- Name: preproducts preproduct_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.preproducts ALTER COLUMN preproduct_id SET DEFAULT nextval('public.preproducts_preproduct_id_seq'::regclass); -- -- Name: products product_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ALTER COLUMN product_id SET DEFAULT nextval('public.products_product_id_seq'::regclass); -- -- Name: remissions remission_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.remissions ALTER COLUMN remission_id SET DEFAULT nextval('public.remission_remission_id_seq'::regclass); -- -- Name: sale_orders sale_order_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders ALTER COLUMN sale_order_id SET DEFAULT nextval('public.sale_orders_sale_order_id_seq'::regclass); -- -- Name: suppliers supplier_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.suppliers ALTER COLUMN supplier_id SET DEFAULT nextval('public.suppliers_supplier_id_seq'::regclass); -- -- Name: turn_incidents turn_incident_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turn_incidents ALTER COLUMN turn_incident_id SET DEFAULT nextval('public.turn_incidents_turn_incident_id_seq'::regclass); -- -- Name: turns turn_id; Type: DEFAULT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns ALTER COLUMN turn_id SET DEFAULT nextval('public.turns_turn_id_seq'::regclass); -- -- Data for Name: addresses; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.addresses (address_id, client_id, name, address, country_id, city) FROM stdin; 3 3 proyecto 1 cliente 1 cra 5 10 Medellín 4 4 proyecto 2 cliente 2 cra 34 10 Bogotá 5 4 proyecto test 2 cra 9 # 24-89 10 Bogotá 6 3 proyecto test cliente 1 cra 6 # xx-xx 10 Bogotá 7 6 proyecto 3 test cra 34 10 Bogotá \. -- -- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.categories (category_id, name, standar_code, reference, material) FROM stdin; 1 GENERAL kg \. -- -- Data for Name: clients; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.clients (client_id, name, address, phonenumber1, phonenumber2, contact_name) FROM stdin; 3 cliente test 1 cra 43#23-xx;Bogotá 1234567890 1123456789 1073543223 4 cliente test 2 cra 32 # xx- xx;Bogotá 1234567890 1345678900 1234567 6 cliente test 3 cra 3 # 3=33;Bogotá 12312312 12312312 049393 \. -- -- Data for Name: countries; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.countries (country_id, name) FROM stdin; 1 Antigua y Barbuda 2 Argentina 3 Bahamas 4 Barbados 5 Belice 6 Bolivia 7 Brasil 8 Canadá 9 Chile 10 Colombia 11 Costa Rica 12 Cuba 13 Dominica 14 Ecuador 15 El Salvador 16 Estados Unidos 17 Granada 18 Guatemala 19 Guyana 20 Haití 21 Honduras 22 Jamaica 23 México 24 Nicaragua 25 Panamá 26 Paraguay 27 Perú 28 República Dominicana 29 San Cristóbal y Nieves 30 San Vicente y las Granadinas 31 Santa Lucía 32 Surinam 33 Trinidad y Tobago 34 Uruguay 35 Venezuela \. -- -- Data for Name: delivery_types; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.delivery_types (delivery_type_id, name) FROM stdin; 1 Envío certificado 2 Recogida en Camión 3 Entregado a ACO \. -- -- Data for Name: incidents_id; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.incidents_id (incident_id, name, detail, quantity, turn_incidents_id) FROM stdin; \. -- -- Data for Name: input_types; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.input_types (input_type_id, name, reference, standar_code) FROM stdin; 2 Pelet Amarillo 123456 m 3 P-313 TAB-25 pl 4 P-313 R-25 pl 5 P-313 RSD-25 pl 6 P-313 N-25 pl 7 P-313 CRSTL-25 pl 8 PVC CRISTAL FUSCIA CLARO D81 pl 9 CMC PELETIZADO TBC pl 10 GRUPO PVC PELETIZADO TBC pl 12 GRUPO PVC PELETIZADO RSD pl 13 GRUPO PVC ROJO PELETIZADO pl 14 GRUPO PVC CRSTL PELETIZADO pl 11 GRUPO PVC PELETIZADO NGR pl 16 CMC PELETIZADO NGR pl 17 CMC PELETIZADO RSD pl 15 CMC PELETIZADO ROJO pl 20 PELICULA EXTENSIBLE TBC 12" CALIBRE DELGADO 0 m 21 PELICULA EXTENSIBLE NGR 12" CALIBRE DELGADO 0 m 26 PELICULA EXTENSIBLE RSD 12" CALIBRE NORMAL 0 kg 27 PELÍCULA EXTENSIBLE NEGRA CALIBRE NORMAL PENGR12"CN kg 28 SUPER NOVA E P -31TBC 25 kg 30 PELETIZADO CRISTAL CRSTL PELETIZADO kg 31 P-330 BIO-25 kg 32 PVC NEGRO CRISTAL STRECH D85 kg 33 BOLSA PLASTICA 3KGX100UNDS BLANCA pkg 34 BOLSA PLASTICA 5KGX100UNDS BLANCA pkg 35 BOLSA PLASTICA 10KGX100UNDS BLANCA pkg 36 BOLSA ALUMINIZADA HAMB 6X6X100UND pkg 37 MOLDE DE HELADO PQX25UNDS pkg 38 BOL SA ALUMINIZADA 6X9X100UNDS pkg 39 BOLSA ALUMINIZADA 7X8X100UNDS pkg 40 PALOS PINCHO MADERA ARO 30CMX100UND pkg 41 BOLSA ALUMINIZADA 8X10X100UND pkg 42 PALOS MADERA PINCHUZO ARO 30CMX100UND pkg 18 CMC PELETIZADO CRSTL kg 43 PELICULA AMARILLA QUIMIPLAST TBC kg 44 PELICULA ROSADA QUIMIPLAST RSD kg 45 PELICULA NEGRA QUIMIPLAST NGR kg \. -- -- Data for Name: inputs; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.inputs (input_id, barcode, lot, name, supplier_id, input_type_id, reception_date, quantity, standar_code, disponible) FROM stdin; \. -- -- Data for Name: invoices; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.invoices (invoice_id, client_id, invoice_date) FROM stdin; \. -- -- Data for Name: invoices_products; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.invoices_products (invoice_id, product_id, quantity, remission_id) FROM stdin; \. -- -- Data for Name: lines; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.lines (line_id, name) FROM stdin; \. -- -- Data for Name: lines_machines; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.lines_machines (line_id, machine_id) FROM stdin; \. -- -- Data for Name: machines; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.machines (machine_id, name, serial) FROM stdin; \. -- -- Data for Name: operators; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.operators (operator_id, is_leader, name, document_number, rh, operator_type_id) FROM stdin; \. -- -- Data for Name: preproducts; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.preproducts (preproduct_id, measure, standar_code, lot, material, weight, caliber, fabrication_date, turn_id, quantity, waste, residue, details) FROM stdin; \. -- -- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.products (product_id, fabrication_date, name, barcode, category_id, product_status_id, turn_id, sale_order_id, weight, waste, supplier_id, quantity, available) FROM stdin; 2 2025-08-15 00:00:00 Pasamanos Madera \N 1 1 \N \N 0 0 \N 4 4 6 2025-08-15 00:00:00 Plataforma normal 400cm \N 1 1 \N \N 0 0 \N 2 2 7 2025-08-15 00:00:00 Marco Andamio 1.30 \N 1 1 \N \N 0 0 \N 34 34 11 2025-08-15 00:00:00 Ruedas de Andamio Nor t.grande \N 1 1 \N \N 0 0 \N 40 40 12 2025-08-15 00:00:00 Ruedas de Andamio t.pequeño \N 1 1 \N \N 0 0 \N 8 8 13 2025-08-15 00:00:00 Alineador 240 cm \N 1 1 \N \N 0 0 \N 2 2 14 2025-08-15 00:00:00 Alineador 400 X 400 \N 1 1 \N \N 0 0 \N 2 2 15 2025-08-15 00:00:00 Angulo 120 cm \N 1 1 \N \N 0 0 \N 20 20 16 2025-08-15 00:00:00 Angulo 240cm \N 1 1 \N \N 0 0 \N 211 211 17 2025-08-15 00:00:00 Angulo 60 cm. \N 1 1 \N \N 0 0 \N 97 97 18 2025-08-15 00:00:00 Collarines \N 1 1 \N \N 0 0 \N 41 41 19 2025-08-15 00:00:00 Distanciador HR 12cm \N 1 1 \N \N 0 0 \N 50 50 20 2025-08-15 00:00:00 Distanciador HR 15cm \N 1 1 \N \N 0 0 \N 131 131 21 2025-08-15 00:00:00 Distanciador HR 16cm \N 1 1 \N \N 0 0 \N 40 40 22 2025-08-15 00:00:00 Distanciador HR 18cm \N 1 1 \N \N 0 0 \N 4 4 23 2025-08-15 00:00:00 Distanciador HR 20cm \N 1 1 \N \N 0 0 \N 134 134 24 2025-08-15 00:00:00 Distanciador HR 25cm \N 1 1 \N \N 0 0 \N 67 67 25 2025-08-15 00:00:00 Distanciador HR 30cm \N 1 1 \N \N 0 0 \N 112 112 26 2025-08-15 00:00:00 Distanciador HR 32cm \N 1 1 \N \N 0 0 \N 12 12 27 2025-08-15 00:00:00 Distanciador HR 35cm \N 1 1 \N \N 0 0 \N 56 56 28 2025-08-15 00:00:00 Distanciador HR 40cm \N 1 1 \N \N 0 0 \N 42 42 29 2025-08-15 00:00:00 Distanciador HR 45cm \N 1 1 \N \N 0 0 \N 17 17 30 2025-08-15 00:00:00 Distanciador HR 50cm \N 1 1 \N \N 0 0 \N 9 9 32 2025-08-15 00:00:00 Pin Sencillo \N 1 1 \N \N 0 0 \N 113 113 33 2025-08-15 00:00:00 Rinconera 15 X 10 X 120cm. \N 1 1 \N \N 0 0 \N 16 16 34 2025-08-15 00:00:00 Rinconera 15 X 10 X 60cm. \N 1 1 \N \N 0 0 \N 4 4 35 2025-08-15 00:00:00 Tablero 15 X 120 cm. \N 1 1 \N \N 0 0 \N 24 24 36 2025-08-15 00:00:00 Tablero 25 X 35 cm. \N 1 1 \N \N 0 0 \N 25 25 37 2025-08-15 00:00:00 Tablero 30 X40 cm. \N 1 1 \N \N 0 0 \N 3 3 38 2025-08-15 00:00:00 Tablero 35 X 40 cm. \N 1 1 \N \N 0 0 \N 2 2 39 2025-08-15 00:00:00 Tablero 50 X 40 cm. \N 1 1 \N \N 0 0 \N 10 10 40 2025-08-15 00:00:00 Tablero 20 X 120 cm. \N 1 1 \N \N 0 0 \N 45 45 41 2025-08-15 00:00:00 Tablero 20 X 30 cm. \N 1 1 \N \N 0 0 \N 1 1 42 2025-08-15 00:00:00 Tablero 25 X 120 cm. \N 1 1 \N \N 0 0 \N 75 75 43 2025-08-15 00:00:00 Tablero 30 X 120 cm. \N 1 1 \N \N 0 0 \N 135 135 44 2025-08-15 00:00:00 Tablero 35 X 120 cm. \N 1 1 \N \N 0 0 \N 92 92 45 2025-08-15 00:00:00 Tablero 40 X 120 cm. \N 1 1 \N \N 0 0 \N 76 76 46 2025-08-15 00:00:00 Tablero 40 X 60 cm. \N 1 1 \N \N 0 0 \N 18 18 47 2025-08-15 00:00:00 Tablero 45 X 120 cm. \N 1 1 \N \N 0 0 \N 29 29 48 2025-08-15 00:00:00 Tablero 50 X 120 cm. \N 1 1 \N \N 0 0 \N 82 82 49 2025-08-15 00:00:00 Tablero 50 X 60 cm. \N 1 1 \N \N 0 0 \N 9 9 50 2025-08-15 00:00:00 Tablero 55 X 120 cm. \N 1 1 \N \N 0 0 \N 20 20 51 2025-08-15 00:00:00 Tablero 55 X 60 cm. \N 1 1 \N \N 0 0 \N 23 23 52 2025-08-15 00:00:00 Tablero 60 X 120 cm. \N 1 1 \N \N 0 0 \N 44 44 53 2025-08-15 00:00:00 Tablero 60 X 20 cm. \N 1 1 \N \N 0 0 \N 10 10 54 2025-08-15 00:00:00 Tablero 60 X 25 cm. \N 1 1 \N \N 0 0 \N 30 30 55 2025-08-15 00:00:00 Tablero 60 X 30 cm. \N 1 1 \N \N 0 0 \N 21 21 56 2025-08-15 00:00:00 Tablero 60 X 35 cm. \N 1 1 \N \N 0 0 \N 12 12 117 2025-08-15 00:00:00 Verticales 200 cm \N 1 1 \N \N 0 0 \N 99 99 1 2025-08-15 00:00:00 Ganchos Andamio \N 1 1 \N \N 0 0 \N 25 25 8 2025-08-15 00:00:00 Marco Andamio 1.50 \N 1 1 \N \N 0 0 \N 251 251 9 2025-08-15 00:00:00 Marco Andamio 80 \N 1 1 \N \N 0 0 \N 145 145 31 2025-08-15 00:00:00 Grapa \N 1 1 \N \N 0 0 \N 5730 5730 3 2025-08-15 00:00:00 Pasamanos Metalico \N 1 1 \N \N 0 0 \N 30 30 4 2025-08-15 00:00:00 Perros \N 1 1 \N \N 0 0 \N 200 200 5 2025-08-15 00:00:00 Plataforma Normal 300 cm \N 1 1 \N \N 0 0 \N 41 41 99 2025-08-15 00:00:00 Paral Metalico Corto 160cm \N 1 1 \N \N 0 0 \N 949 949 100 2025-08-15 00:00:00 Paral metalico enano 110 cm \N 1 1 \N \N 0 0 \N 228 228 101 2025-08-15 00:00:00 Paral metalico extralargo 300cm \N 1 1 \N \N 0 0 \N 197 197 102 2025-08-15 00:00:00 Paral Metalico Largo 210cm \N 1 1 \N \N 0 0 \N 830 830 103 2025-08-15 00:00:00 Diagonales 240 cm \N 1 1 \N \N 0 0 \N 48 48 104 2025-08-15 00:00:00 Diagonales 280 cm \N 1 1 \N \N 0 0 \N 48 48 105 2025-08-15 00:00:00 Escalera gato \N 1 1 \N \N 0 0 \N 20 20 106 2025-08-15 00:00:00 horizontales 140 cm \N 1 1 \N \N 0 0 \N 82 82 107 2025-08-15 00:00:00 horizontales 152 cm \N 1 1 \N \N 0 0 \N 10 10 108 2025-08-15 00:00:00 Horizontales 207 cm \N 1 1 \N \N 0 0 \N 97 97 109 2025-08-15 00:00:00 Horizontales 60 cm \N 1 1 \N \N 0 0 \N 12 12 110 2025-08-15 00:00:00 Niveladores unidireccionales \N 1 1 \N \N 0 0 \N 41 41 111 2025-08-15 00:00:00 Plataforma Certificada 140cm \N 1 1 \N \N 0 0 \N 38 38 112 2025-08-15 00:00:00 Plataforma certificada 216cm \N 1 1 \N \N 0 0 \N 9 9 113 2025-08-15 00:00:00 Plataforma certificada 300cm \N 1 1 \N \N 0 0 \N 8 8 114 2025-08-15 00:00:00 Ruedas Andamio Unidireccional \N 1 1 \N \N 0 0 \N 28 28 10 2025-08-15 00:00:00 Niveladores normales \N 1 1 \N \N 0 0 \N 16 16 57 2025-08-15 00:00:00 Tensor \N 1 1 \N \N 0 0 \N 95 95 58 2025-08-15 00:00:00 Lamina 30 X 240 cm \N 1 1 \N \N 0 0 \N 4 4 59 2025-08-15 00:00:00 Camilla 120 X 60 cm \N 1 1 \N \N 0 0 \N 50 50 60 2025-08-15 00:00:00 Camilla 50 X 140cm \N 1 1 \N \N 0 0 \N 141 141 61 2025-08-15 00:00:00 Camilla 70 X 100cm \N 1 1 \N \N 0 0 \N 127 127 62 2025-08-15 00:00:00 Camilla 70 X 110cm \N 1 1 \N \N 0 0 \N 98 98 63 2025-08-15 00:00:00 Camilla 70 X 120cm \N 1 1 \N \N 0 0 \N 96 96 64 2025-08-15 00:00:00 Camilla 70 X 140 cm \N 1 1 \N \N 0 0 \N 1761 1761 65 2025-08-15 00:00:00 Camilla 30 X 120 cm \N 1 1 \N \N 0 0 \N 20 20 66 2025-08-15 00:00:00 Camilla 40 X 100 cm \N 1 1 \N \N 0 0 \N 50 50 67 2025-08-15 00:00:00 Camilla 40 X 130 cm \N 1 1 \N \N 0 0 \N 20 20 68 2025-08-15 00:00:00 Camilla 40 X 140 cm \N 1 1 \N \N 0 0 \N 365 365 69 2025-08-15 00:00:00 Camilla 50 X 100 cm \N 1 1 \N \N 0 0 \N 70 70 70 2025-08-15 00:00:00 camilla 50 X 120 cm \N 1 1 \N \N 0 0 \N 120 120 71 2025-08-15 00:00:00 Camilla 60 X 140 cm \N 1 1 \N \N 0 0 \N 25 25 72 2025-08-15 00:00:00 Camilla 70 X 90 cm \N 1 1 \N \N 0 0 \N 88 88 73 2025-08-15 00:00:00 Camillas 70 X 130 cm \N 1 1 \N \N 0 0 \N 61 61 74 2025-08-15 00:00:00 Planchones 300 a 350 \N 1 1 \N \N 0 0 \N 220 220 75 2025-08-15 00:00:00 Planchones 400 a 600 \N 1 1 \N \N 0 0 \N 20 20 76 2025-08-15 00:00:00 Planchones 200cm \N 1 1 \N \N 0 0 \N 20 20 77 2025-08-15 00:00:00 Planchones 250 a 280 \N 1 1 \N \N 0 0 \N 68 68 78 2025-08-15 00:00:00 balde pluma \N 1 1 \N \N 0 0 \N 8 8 79 2025-08-15 00:00:00 Bomba Sumergible \N 1 1 \N \N 0 0 \N 3 3 80 2025-08-15 00:00:00 Canastilla \N 1 1 \N \N 0 0 \N 1 1 81 2025-08-15 00:00:00 Canguro \N 1 1 \N \N 0 0 \N 4 4 82 2025-08-15 00:00:00 Cortadora de Ladrillo \N 1 1 \N \N 0 0 \N 3 3 83 2025-08-15 00:00:00 Cortadora de Piso \N 1 1 \N \N 0 0 \N 1 1 84 2025-08-15 00:00:00 Demoledor \N 1 1 \N \N 0 0 \N 9 9 85 2025-08-15 00:00:00 EXTENCION \N 1 1 \N \N 0 0 \N 4 4 86 2025-08-15 00:00:00 Mezcladora Grande \N 1 1 \N \N 0 0 \N 6 6 87 2025-08-15 00:00:00 Mezcladora Pequeña \N 1 1 \N \N 0 0 \N 1 1 88 2025-08-15 00:00:00 Pluma \N 1 1 \N \N 0 0 \N 5 5 89 2025-08-15 00:00:00 Rana Vibradora \N 1 1 \N \N 0 0 \N 4 4 90 2025-08-15 00:00:00 Vibrador \N 1 1 \N \N 0 0 \N 5 5 91 2025-08-15 00:00:00 Cercha 200 cm \N 1 1 \N \N 0 0 \N 20 20 92 2025-08-15 00:00:00 Cercha 300 cm \N 1 1 \N \N 0 0 \N 979 979 93 2025-08-15 00:00:00 Cercha 150cm \N 1 1 \N \N 0 0 \N 9 9 94 2025-08-15 00:00:00 Cercha 250 cm \N 1 1 \N \N 0 0 \N 7 7 95 2025-08-15 00:00:00 Cruceta 250cm \N 1 1 \N \N 0 0 \N 303 303 96 2025-08-15 00:00:00 Cruceta 195cm \N 1 1 \N \N 0 0 \N 453 453 97 2025-08-15 00:00:00 Cruceta 200 cm \N 1 1 \N \N 0 0 \N 50 50 98 2025-08-15 00:00:00 Cruceta 330 cm \N 1 1 \N \N 0 0 \N 526 526 115 2025-08-15 00:00:00 Verticales 100 cm \N 1 1 \N \N 0 0 \N 12 12 116 2025-08-15 00:00:00 Verticales 150 cm \N 1 1 \N \N 0 0 \N 4 4 \. -- -- Data for Name: products_inputs; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.products_inputs (product_id, input_id) FROM stdin; \. -- -- Data for Name: products_status; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.products_status (product_status_id, name, description) FROM stdin; 1 Disponible Producto activo y disponible para pedidos 2 Ocupado Producto inactivo y no disponible para pedidos \. -- -- Data for Name: products_technical_data; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.products_technical_data (product_id, reference, article, product_group, presentation, cai, height, width, square_meters, diameter, length, angle, sale_value, rental_value) FROM stdin; 1 ANDAMIO COLGANTE 0 0 0 0 0 0 0 0 2 ANDAMIO COLGANTE 0 0 0 0 0 0 0 0 4 ANDAMIO COLGANTE 0 0 0 0 0 0 0 0 113 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 6 ANDAMIO COLGANTE 0 0 0 0 0 0 0 0 7 ANDAMIO TUBULAR 0 0 0 0 0 0 0 0 115 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 9 ANDAMIO TUBULAR 0 0 0 0 0 0 0 0 10 ANDAMIO TUBULAR 0 0 0 0 0 0 0 0 11 ANDAMIO TUBULAR 0 0 0 0 0 0 0 0 71 MADERA 0 0 0 0 0 0 0 0 12 ANDAMIO TUBULAR 0 0 0 0 0 0 0 0 14 ENCOFRADO 0 0 0 0 0 0 0 0 15 ENCOFRADO 0 0 0 0 0 0 0 0 16 ENCOFRADO 0 0 0 0 0 0 0 0 17 ENCOFRADO 0 0 0 0 0 0 0 0 72 MADERA 0 0 0 0 0 0 0 0 73 MADERA 0 0 0 0 0 0 0 0 74 MADERA 0 0 0 0 0 0 0 0 75 MADERA 0 0 0 0 0 0 0 0 76 MADERA 0 0 0 0 0 0 0 0 77 MADERA 0 0 0 0 0 0 0 0 78 MAQUINARIA 0 0 0 0 0 0 0 0 79 MAQUINARIA 0 0 0 0 0 0 0 0 80 MAQUINARIA 0 0 0 0 0 0 0 0 81 MAQUINARIA 0 0 0 0 0 0 0 0 82 MAQUINARIA 0 0 0 0 0 0 0 0 83 MAQUINARIA 0 0 0 0 0 0 0 0 84 MAQUINARIA 0 0 0 0 0 0 0 0 18 ENCOFRADO 0 0 0 0 0 0 0 0 19 ENCOFRADO 0 0 0 0 0 0 0 0 20 ENCOFRADO 0 0 0 0 0 0 0 0 21 ENCOFRADO 0 0 0 0 0 0 0 0 22 ENCOFRADO 0 0 0 0 0 0 0 0 23 ENCOFRADO 0 0 0 0 0 0 0 0 24 ENCOFRADO 0 0 0 0 0 0 0 0 25 ENCOFRADO 0 0 0 0 0 0 0 0 26 ENCOFRADO 0 0 0 0 0 0 0 0 27 ENCOFRADO 0 0 0 0 0 0 0 0 28 ENCOFRADO 0 0 0 0 0 0 0 0 29 ENCOFRADO 0 0 0 0 0 0 0 0 30 ENCOFRADO 0 0 0 0 0 0 0 0 31 ENCOFRADO 0 0 0 0 0 0 0 0 32 ENCOFRADO 0 0 0 0 0 0 0 0 33 ENCOFRADO 0 0 0 0 0 0 0 0 34 ENCOFRADO 0 0 0 0 0 0 0 0 35 ENCOFRADO 0 0 0 0 0 0 0 0 36 ENCOFRADO 0 0 0 0 0 0 0 0 37 ENCOFRADO 0 0 0 0 0 0 0 0 38 ENCOFRADO 0 0 0 0 0 0 0 0 39 ENCOFRADO 0 0 0 0 0 0 0 0 40 ENCOFRADO 0 0 0 0 0 0 0 0 41 ENCOFRADO 0 0 0 0 0 0 0 0 42 ENCOFRADO 0 0 0 0 0 0 0 0 43 ENCOFRADO 0 0 0 0 0 0 0 0 44 ENCOFRADO 0 0 0 0 0 0 0 0 45 ENCOFRADO 0 0 0 0 0 0 0 0 46 ENCOFRADO 0 0 0 0 0 0 0 0 47 ENCOFRADO 0 0 0 0 0 0 0 0 48 ENCOFRADO 0 0 0 0 0 0 0 0 49 ENCOFRADO 0 0 0 0 0 0 0 0 50 ENCOFRADO 0 0 0 0 0 0 0 0 51 ENCOFRADO 0 0 0 0 0 0 0 0 52 ENCOFRADO 0 0 0 0 0 0 0 0 53 ENCOFRADO 0 0 0 0 0 0 0 0 54 ENCOFRADO 0 0 0 0 0 0 0 0 55 ENCOFRADO 0 0 0 0 0 0 0 0 56 ENCOFRADO 0 0 0 0 0 0 0 0 85 MAQUINARIA 0 0 0 0 0 0 0 0 86 MAQUINARIA 0 0 0 0 0 0 0 0 87 MAQUINARIA 0 0 0 0 0 0 0 0 88 MAQUINARIA 0 0 0 0 0 0 0 0 89 MAQUINARIA 0 0 0 0 0 0 0 0 90 MAQUINARIA 0 0 0 0 0 0 0 0 91 METALICO 0 0 0 0 0 0 0 0 92 METALICO 0 0 0 0 0 0 0 0 93 METALICO 0 0 0 0 0 0 0 0 94 METALICO 0 0 0 0 0 0 0 0 95 METALICO 0 0 0 0 0 0 0 0 96 METALICO 0 0 0 0 0 0 0 0 97 METALICO 0 0 0 0 0 0 0 0 98 METALICO 0 0 0 0 0 0 0 0 99 METALICO 0 0 0 0 0 0 0 0 100 METALICO 0 0 0 0 0 0 0 0 101 METALICO 0 0 0 0 0 0 0 0 102 METALICO 0 0 0 0 0 0 0 0 103 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 104 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 105 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 106 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 107 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 108 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 109 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 57 ENCOFRADO 0 0 0 0 0 0 0 0 58 ENCOFRADO 0 0 0 0 0 0 0 0 59 MADERA 0 0 0 0 0 0 0 0 60 MADERA 0 0 0 0 0 0 0 0 61 MADERA 0 0 0 0 0 0 0 0 63 MADERA 0 0 0 0 0 0 0 0 64 MADERA 0 0 0 0 0 0 0 0 65 MADERA 0 0 0 0 0 0 0 0 66 MADERA 0 0 0 0 0 0 0 0 67 MADERA 0 0 0 0 0 0 0 0 68 MADERA 0 0 0 0 0 0 0 0 69 MADERA 0 0 0 0 0 0 0 0 70 MADERA 0 0 0 0 0 0 0 0 110 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 111 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 3 ANDAMIO COLGANTE 0 0 0 0 0 0 0 0 112 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 114 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 5 ANDAMIO COLGANTE 0 0 0 0 0 0 0 0 116 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 117 UNIDIRECCIONAL 0 0 0 0 0 0 0 0 8 ANDAMIO TUBULAR 0 0 0 0 0 0 0 0 13 ENCOFRADO 0 0 0 0 0 0 0 0 62 MADERA 0 0 0 0 0 0 0 0 \. -- -- Data for Name: remissions; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.remissions (remission_id, client_id, address_id, request_date, deliver_date, name, is_delivery) FROM stdin; 26 4 5 2025-08-11 00:00:00 2025-08-11 00:00:00 t 25 3 3 2025-08-11 00:00:00 2025-08-11 00:00:00 t 27 6 7 2025-08-11 00:00:00 2025-08-11 00:00:00 t 28 4 4 2025-08-11 00:00:00 2025-08-11 00:00:00 t \. -- -- Data for Name: remissions_products; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.remissions_products (remission_id, product_id, quantity, full_delivered, quantity_for_return) FROM stdin; 25 5 20 f 20 25 12 30 f 30 26 5 20 f 20 26 12 30 f 30 27 5 20 f 20 27 12 30 f 30 28 5 20 f 20 28 12 30 f 30 \. -- -- Data for Name: returns; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.returns (return_id, client_id, return_date) FROM stdin; \. -- -- Data for Name: returns_products; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.returns_products (return_id, product_id, quantity, remission_id) FROM stdin; \. -- -- Data for Name: sale_order_status; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.sale_order_status (sale_order_status_id, name, description) FROM stdin; 1 Creada Orden de Venta creada 2 Adjunta Orden de Venta con los productos ya asignados 3 Despachada Orden de Venta despachada al cliente \. -- -- Data for Name: sale_orders; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.sale_orders (sale_order_id, internal_code, order_date, client_id, description, delivery_type_id, sale_order_status_id) FROM stdin; \. -- -- Data for Name: sale_orders_categories; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.sale_orders_categories (sale_order_id, category_id, quantity) FROM stdin; \. -- -- Data for Name: suppliers; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.suppliers (supplier_id, name, address, phonenumber1, phonenumber2, contact_name) FROM stdin; 24 test proveedor 1 carrera 34 # 12 1231231234 3453453457 proveedor 1 25 test proveedor 2 carrera 12 # 12 1122334455 2211334455 proveedor 2 26 test proveedor 3 calle 23 # 34 diag 12 123 123 proveedor 3 27 Bodega Bodega Bodega Bodega Bodega \. -- -- Data for Name: suppliers_input_types; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.suppliers_input_types (supplier_id, input_type_id) FROM stdin; \. -- -- Data for Name: turn_incidents; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.turn_incidents (turn_incident_id, turn_id, description, title) FROM stdin; \. -- -- Data for Name: turn_types; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.turn_types (turn_type_id, initial_hour, final_hour, description) FROM stdin; 1 06:00:00 14:00:00 Mañana (6am a 2pm) 3 22:00:00 06:00:00 Noche (10pm a 6am) 2 14:00:00 22:00:00 Tarde (2pm a 10pm) 4 06:00:00 18:00:00 Dia (6am a 6pm) 5 18:00:00 06:00:00 Noche (6pm a 6am) \. -- -- Data for Name: turns; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.turns (turn_id, line_id, start_time, end_time, turn_type_id, waste, residue, waste_desc, peletizado, original) FROM stdin; \. -- -- Data for Name: turns_operators; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.turns_operators (turn_id, operator_id) FROM stdin; \. -- -- Data for Name: units_measure; Type: TABLE DATA; Schema: public; Owner: vespot -- COPY public.units_measure (name, standar_code) FROM stdin; Metro m Pulgadas pl Kilogramos kg Paquete pkg \. -- -- Name: address_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.address_id_seq', 1, false); -- -- Name: addresses_address_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.addresses_address_id_seq', 7, true); -- -- Name: categories_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.categories_category_id_seq', 3, true); -- -- Name: clients_client_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.clients_client_id_seq', 6, true); -- -- Name: incidents_id_incident_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.incidents_id_incident_id_seq', 27, true); -- -- Name: input_types_input_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.input_types_input_type_id_seq', 45, true); -- -- Name: inputs_input_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.inputs_input_id_seq', 746, true); -- -- Name: invoices_invoice_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.invoices_invoice_id_seq', 1, false); -- -- Name: lines_line_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.lines_line_id_seq', 79, true); -- -- Name: machines_machine_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.machines_machine_id_seq', 11, true); -- -- Name: operators_operator_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.operators_operator_id_seq', 18, true); -- -- Name: preproducts_preproduct_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.preproducts_preproduct_id_seq', 25020, true); -- -- Name: products_product_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.products_product_id_seq', 117, true); -- -- Name: remission_remission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.remission_remission_id_seq', 28, true); -- -- Name: remissions_remission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.remissions_remission_id_seq', 1, false); -- -- Name: returns_return_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.returns_return_id_seq', 21, true); -- -- Name: sale_orders_sale_order_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.sale_orders_sale_order_id_seq', 1, false); -- -- Name: supplier_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.supplier_id_seq', 1, false); -- -- Name: suppliers_supplier_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.suppliers_supplier_id_seq', 27, true); -- -- Name: turn_incidents_turn_incident_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.turn_incidents_turn_incident_id_seq', 261, true); -- -- Name: turns_turn_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vespot -- SELECT pg_catalog.setval('public.turns_turn_id_seq', 1, false); -- -- Name: addresses addresses_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.addresses ADD CONSTRAINT addresses_pk PRIMARY KEY (address_id); -- -- Name: categories categories_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.categories ADD CONSTRAINT categories_pk PRIMARY KEY (category_id); -- -- Name: clients clients_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.clients ADD CONSTRAINT clients_pk PRIMARY KEY (client_id); -- -- Name: countries countries_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.countries ADD CONSTRAINT countries_pk PRIMARY KEY (country_id); -- -- Name: delivery_types delivery_types_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.delivery_types ADD CONSTRAINT delivery_types_pk PRIMARY KEY (delivery_type_id); -- -- Name: incidents_id incidents_id_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.incidents_id ADD CONSTRAINT incidents_id_pk PRIMARY KEY (incident_id); -- -- Name: input_types input_types_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.input_types ADD CONSTRAINT input_types_pk PRIMARY KEY (input_type_id); -- -- Name: inputs inputs_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.inputs ADD CONSTRAINT inputs_pk PRIMARY KEY (input_id); -- -- Name: invoices invoices_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.invoices ADD CONSTRAINT invoices_pk PRIMARY KEY (invoice_id); -- -- Name: invoices_products invoices_products_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.invoices_products ADD CONSTRAINT invoices_products_pk PRIMARY KEY (invoice_id, product_id, remission_id); -- -- Name: lines_machines lines_machines_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.lines_machines ADD CONSTRAINT lines_machines_pk PRIMARY KEY (line_id, machine_id); -- -- Name: lines lines_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.lines ADD CONSTRAINT lines_pk PRIMARY KEY (line_id); -- -- Name: machines machines_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.machines ADD CONSTRAINT machines_pk PRIMARY KEY (machine_id); -- -- Name: operators operators_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.operators ADD CONSTRAINT operators_pk PRIMARY KEY (operator_id); -- -- Name: preproducts preproducts_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.preproducts ADD CONSTRAINT preproducts_pk PRIMARY KEY (preproduct_id); -- -- Name: products_status product_status_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products_status ADD CONSTRAINT product_status_pk PRIMARY KEY (product_status_id); -- -- Name: products_inputs products_inputs_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products_inputs ADD CONSTRAINT products_inputs_pk PRIMARY KEY (product_id, input_id); -- -- Name: products products_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ADD CONSTRAINT products_pk PRIMARY KEY (product_id); -- -- Name: products_technical_data products_technical_data_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products_technical_data ADD CONSTRAINT products_technical_data_pk PRIMARY KEY (product_id); -- -- Name: remissions remissions_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.remissions ADD CONSTRAINT remissions_pk PRIMARY KEY (remission_id); -- -- Name: remissions_products remissions_products_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.remissions_products ADD CONSTRAINT remissions_products_pk PRIMARY KEY (remission_id, product_id); -- -- Name: returns returns_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.returns ADD CONSTRAINT returns_pk PRIMARY KEY (return_id); -- -- Name: returns_products returns_products_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.returns_products ADD CONSTRAINT returns_products_pk PRIMARY KEY (return_id, product_id, remission_id); -- -- Name: sale_order_status sale_order_status_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_order_status ADD CONSTRAINT sale_order_status_pk PRIMARY KEY (sale_order_status_id); -- -- Name: sale_orders_categories sale_orders_categories_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders_categories ADD CONSTRAINT sale_orders_categories_pk PRIMARY KEY (sale_order_id, category_id); -- -- Name: sale_orders sale_orders_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders ADD CONSTRAINT sale_orders_pk PRIMARY KEY (sale_order_id); -- -- Name: suppliers supplier_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.suppliers ADD CONSTRAINT supplier_pk PRIMARY KEY (supplier_id); -- -- Name: turn_incidents turn_incidents_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turn_incidents ADD CONSTRAINT turn_incidents_pk PRIMARY KEY (turn_incident_id); -- -- Name: turn_types turn_types_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turn_types ADD CONSTRAINT turn_types_pk PRIMARY KEY (turn_type_id); -- -- Name: turns_operators turns_operators_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns_operators ADD CONSTRAINT turns_operators_pk PRIMARY KEY (turn_id, operator_id); -- -- Name: turns turns_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns ADD CONSTRAINT turns_pk PRIMARY KEY (turn_id); -- -- Name: units_measure units_measure_pk; Type: CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.units_measure ADD CONSTRAINT units_measure_pk PRIMARY KEY (standar_code); -- -- Name: addresses addresses_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.addresses ADD CONSTRAINT addresses_fk FOREIGN KEY (country_id) REFERENCES public.countries(country_id); -- -- Name: addresses addresses_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.addresses ADD CONSTRAINT addresses_fk_1 FOREIGN KEY (client_id) REFERENCES public.clients(client_id); -- -- Name: categories categories_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.categories ADD CONSTRAINT categories_fk FOREIGN KEY (standar_code) REFERENCES public.units_measure(standar_code); -- -- Name: incidents_id incidents_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.incidents_id ADD CONSTRAINT incidents_id_fk FOREIGN KEY (turn_incidents_id) REFERENCES public.turn_incidents(turn_incident_id); -- -- Name: input_types input_types_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.input_types ADD CONSTRAINT input_types_fk FOREIGN KEY (standar_code) REFERENCES public.units_measure(standar_code); -- -- Name: inputs inputs_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.inputs ADD CONSTRAINT inputs_fk FOREIGN KEY (standar_code) REFERENCES public.units_measure(standar_code); -- -- Name: inputs inputs_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.inputs ADD CONSTRAINT inputs_fk1 FOREIGN KEY (supplier_id) REFERENCES public.suppliers(supplier_id); -- -- Name: inputs inputs_fk2; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.inputs ADD CONSTRAINT inputs_fk2 FOREIGN KEY (input_type_id) REFERENCES public.input_types(input_type_id); -- -- Name: invoices invoices_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.invoices ADD CONSTRAINT invoices_fk FOREIGN KEY (client_id) REFERENCES public.clients(client_id); -- -- Name: lines_machines lines_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.lines_machines ADD CONSTRAINT lines_fk FOREIGN KEY (line_id) REFERENCES public.lines(line_id); -- -- Name: lines_machines machines_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.lines_machines ADD CONSTRAINT machines_fk FOREIGN KEY (machine_id) REFERENCES public.machines(machine_id); -- -- Name: preproducts preproducts_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.preproducts ADD CONSTRAINT preproducts_fk1 FOREIGN KEY (turn_id) REFERENCES public.turns(turn_id); -- -- Name: preproducts preproducts_fk2; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.preproducts ADD CONSTRAINT preproducts_fk2 FOREIGN KEY (standar_code) REFERENCES public.units_measure(standar_code); -- -- Name: products products_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ADD CONSTRAINT products_fk FOREIGN KEY (sale_order_id) REFERENCES public.sale_orders(sale_order_id); -- -- Name: products products_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ADD CONSTRAINT products_fk1 FOREIGN KEY (category_id) REFERENCES public.categories(category_id); -- -- Name: products products_fk3; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ADD CONSTRAINT products_fk3 FOREIGN KEY (product_status_id) REFERENCES public.products_status(product_status_id); -- -- Name: products products_fk4; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ADD CONSTRAINT products_fk4 FOREIGN KEY (turn_id) REFERENCES public.turns(turn_id); -- -- Name: products products_fk5; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products ADD CONSTRAINT products_fk5 FOREIGN KEY (supplier_id) REFERENCES public.suppliers(supplier_id); -- -- Name: products_inputs products_inputs_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products_inputs ADD CONSTRAINT products_inputs_fk FOREIGN KEY (input_id) REFERENCES public.inputs(input_id); -- -- Name: products_inputs products_inputs_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products_inputs ADD CONSTRAINT products_inputs_fk_1 FOREIGN KEY (product_id) REFERENCES public.products(product_id); -- -- Name: products_technical_data products_technical_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.products_technical_data ADD CONSTRAINT products_technical_data_fk FOREIGN KEY (product_id) REFERENCES public.products(product_id); -- -- Name: remissions remissions_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.remissions ADD CONSTRAINT remissions_fk FOREIGN KEY (client_id) REFERENCES public.clients(client_id); -- -- Name: remissions remissions_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.remissions ADD CONSTRAINT remissions_fk_1 FOREIGN KEY (address_id) REFERENCES public.addresses(address_id); -- -- Name: returns returns_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.returns ADD CONSTRAINT returns_fk FOREIGN KEY (client_id) REFERENCES public.clients(client_id); -- -- Name: sale_orders_categories sale_orders_categories_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders_categories ADD CONSTRAINT sale_orders_categories_fk1 FOREIGN KEY (sale_order_id) REFERENCES public.sale_orders(sale_order_id); -- -- Name: sale_orders_categories sale_orders_categories_fk2; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders_categories ADD CONSTRAINT sale_orders_categories_fk2 FOREIGN KEY (category_id) REFERENCES public.categories(category_id); -- -- Name: sale_orders sale_orders_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders ADD CONSTRAINT sale_orders_fk1 FOREIGN KEY (client_id) REFERENCES public.clients(client_id); -- -- Name: sale_orders sale_orders_fk2; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders ADD CONSTRAINT sale_orders_fk2 FOREIGN KEY (delivery_type_id) REFERENCES public.delivery_types(delivery_type_id); -- -- Name: sale_orders sale_orders_fk3; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.sale_orders ADD CONSTRAINT sale_orders_fk3 FOREIGN KEY (sale_order_status_id) REFERENCES public.sale_order_status(sale_order_status_id); -- -- Name: suppliers_input_types suppliers_input_types_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.suppliers_input_types ADD CONSTRAINT suppliers_input_types_fk1 FOREIGN KEY (supplier_id) REFERENCES public.suppliers(supplier_id); -- -- Name: suppliers_input_types suppliers_input_types_fk2; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.suppliers_input_types ADD CONSTRAINT suppliers_input_types_fk2 FOREIGN KEY (input_type_id) REFERENCES public.input_types(input_type_id); -- -- Name: turn_incidents turn_incidents_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turn_incidents ADD CONSTRAINT turn_incidents_fk FOREIGN KEY (turn_id) REFERENCES public.turns(turn_id); -- -- Name: turns turns_lines_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns ADD CONSTRAINT turns_lines_fk FOREIGN KEY (line_id) REFERENCES public.lines(line_id); -- -- Name: turns_operators turns_operators_fk1; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns_operators ADD CONSTRAINT turns_operators_fk1 FOREIGN KEY (turn_id) REFERENCES public.turns(turn_id); -- -- Name: turns_operators turns_operators_fk2; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns_operators ADD CONSTRAINT turns_operators_fk2 FOREIGN KEY (operator_id) REFERENCES public.operators(operator_id); -- -- Name: turns turns_types_fk; Type: FK CONSTRAINT; Schema: public; Owner: vespot -- ALTER TABLE ONLY public.turns ADD CONSTRAINT turns_types_fk FOREIGN KEY (turn_type_id) REFERENCES public.turn_types(turn_type_id); -- -- PostgreSQL database dump complete --