|
|
@@ -0,0 +1,1173 @@
|
|
|
+--
|
|
|
+-- PostgreSQL database dump
|
|
|
+--
|
|
|
+
|
|
|
+\restrict IepfNlcahchOJkqiArt6eq9reTwOgg5XT2eosSdEGejeCaicn6hfAoPRQV0Tz3t
|
|
|
+
|
|
|
+-- Dumped from database version 17.7
|
|
|
+-- Dumped by pg_dump version 17.7
|
|
|
+
|
|
|
+-- Started on 2026-04-20 18:02:05 MSK
|
|
|
+
|
|
|
+SET statement_timeout = 0;
|
|
|
+SET lock_timeout = 0;
|
|
|
+SET idle_in_transaction_session_timeout = 0;
|
|
|
+SET transaction_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;
|
|
|
+
|
|
|
+SET default_tablespace = '';
|
|
|
+
|
|
|
+SET default_table_access_method = heap;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 227 (class 1259 OID 16436)
|
|
|
+-- Name: manufacturies; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.manufacturies (
|
|
|
+ id integer NOT NULL,
|
|
|
+ title character varying(250) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.manufacturies OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 226 (class 1259 OID 16435)
|
|
|
+-- Name: manufacturies_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.manufacturies_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.manufacturies_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4436 (class 0 OID 0)
|
|
|
+-- Dependencies: 226
|
|
|
+-- Name: manufacturies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.manufacturies_id_seq OWNED BY public.manufacturies.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 223 (class 1259 OID 16426)
|
|
|
+-- Name: measure_units; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.measure_units (
|
|
|
+ id integer NOT NULL,
|
|
|
+ title character varying(250) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.measure_units OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 222 (class 1259 OID 16425)
|
|
|
+-- Name: measure_units_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.measure_units_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.measure_units_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4437 (class 0 OID 0)
|
|
|
+-- Dependencies: 222
|
|
|
+-- Name: measure_units_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.measure_units_id_seq OWNED BY public.measure_units.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 240 (class 1259 OID 16541)
|
|
|
+-- Name: order_products; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.order_products (
|
|
|
+ id integer NOT NULL,
|
|
|
+ count integer NOT NULL,
|
|
|
+ order_id integer NOT NULL,
|
|
|
+ product_id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.order_products OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 239 (class 1259 OID 16540)
|
|
|
+-- Name: order_products_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.order_products_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.order_products_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4438 (class 0 OID 0)
|
|
|
+-- Dependencies: 239
|
|
|
+-- Name: order_products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.order_products_id_seq OWNED BY public.order_products.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 234 (class 1259 OID 16502)
|
|
|
+-- Name: order_statuses; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.order_statuses (
|
|
|
+ id integer NOT NULL,
|
|
|
+ title character varying(250) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.order_statuses OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 233 (class 1259 OID 16501)
|
|
|
+-- Name: order_statuses_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.order_statuses_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.order_statuses_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4439 (class 0 OID 0)
|
|
|
+-- Dependencies: 233
|
|
|
+-- Name: order_statuses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.order_statuses_id_seq OWNED BY public.order_statuses.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 238 (class 1259 OID 16516)
|
|
|
+-- Name: orders; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.orders (
|
|
|
+ id integer NOT NULL,
|
|
|
+ number character varying(250),
|
|
|
+ article character varying(1000) NOT NULL,
|
|
|
+ created_date date DEFAULT now() NOT NULL,
|
|
|
+ delivery_date date NOT NULL,
|
|
|
+ code character varying(100) NOT NULL,
|
|
|
+ pick_up_point_id integer NOT NULL,
|
|
|
+ status_id integer NOT NULL,
|
|
|
+ user_id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.orders OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 237 (class 1259 OID 16515)
|
|
|
+-- Name: orders_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.orders_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.orders_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4440 (class 0 OID 0)
|
|
|
+-- Dependencies: 237
|
|
|
+-- Name: orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.orders_id_seq OWNED BY public.orders.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 236 (class 1259 OID 16509)
|
|
|
+-- Name: pick_up_points; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.pick_up_points (
|
|
|
+ id integer NOT NULL,
|
|
|
+ title character varying(250) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.pick_up_points OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 235 (class 1259 OID 16508)
|
|
|
+-- Name: pick_up_points_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.pick_up_points_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.pick_up_points_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4441 (class 0 OID 0)
|
|
|
+-- Dependencies: 235
|
|
|
+-- Name: pick_up_points_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.pick_up_points_id_seq OWNED BY public.pick_up_points.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 221 (class 1259 OID 16421)
|
|
|
+-- Name: prdocut_names; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.prdocut_names (
|
|
|
+ title character varying(250) NOT NULL,
|
|
|
+ id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.prdocut_names OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 232 (class 1259 OID 16456)
|
|
|
+-- Name: prdocut_names_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.prdocut_names_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.prdocut_names_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4442 (class 0 OID 0)
|
|
|
+-- Dependencies: 232
|
|
|
+-- Name: prdocut_names_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.prdocut_names_id_seq OWNED BY public.prdocut_names.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 229 (class 1259 OID 16441)
|
|
|
+-- Name: product_categories; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.product_categories (
|
|
|
+ id integer NOT NULL,
|
|
|
+ title character varying(250) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.product_categories OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 228 (class 1259 OID 16440)
|
|
|
+-- Name: product_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.product_categories_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.product_categories_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4443 (class 0 OID 0)
|
|
|
+-- Dependencies: 228
|
|
|
+-- Name: product_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.product_categories_id_seq OWNED BY public.product_categories.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 231 (class 1259 OID 16446)
|
|
|
+-- Name: products; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.products (
|
|
|
+ id integer NOT NULL,
|
|
|
+ article character varying NOT NULL,
|
|
|
+ price numeric NOT NULL,
|
|
|
+ sale numeric,
|
|
|
+ count integer NOT NULL,
|
|
|
+ description character varying,
|
|
|
+ photo_path character varying,
|
|
|
+ product_name_id integer NOT NULL,
|
|
|
+ measure_unit_id integer NOT NULL,
|
|
|
+ supplier_id integer NOT NULL,
|
|
|
+ manufacture_id integer NOT NULL,
|
|
|
+ product_category_id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.products OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 230 (class 1259 OID 16445)
|
|
|
+-- Name: products_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.products_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.products_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4444 (class 0 OID 0)
|
|
|
+-- Dependencies: 230
|
|
|
+-- Name: products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.products_id_seq OWNED BY public.products.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 217 (class 1259 OID 16389)
|
|
|
+-- Name: roles; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.roles (
|
|
|
+ title character varying(250) NOT NULL,
|
|
|
+ id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.roles OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 220 (class 1259 OID 16408)
|
|
|
+-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.roles_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.roles_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4445 (class 0 OID 0)
|
|
|
+-- Dependencies: 220
|
|
|
+-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 225 (class 1259 OID 16431)
|
|
|
+-- Name: suppliers; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.suppliers (
|
|
|
+ id integer NOT NULL,
|
|
|
+ title character varying(250) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.suppliers OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 224 (class 1259 OID 16430)
|
|
|
+-- Name: suppliers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.suppliers_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.suppliers_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4446 (class 0 OID 0)
|
|
|
+-- Dependencies: 224
|
|
|
+-- Name: suppliers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.suppliers_id_seq OWNED BY public.suppliers.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 219 (class 1259 OID 16398)
|
|
|
+-- Name: users; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.users (
|
|
|
+ first_name character varying(250) NOT NULL,
|
|
|
+ last_name character varying(250) NOT NULL,
|
|
|
+ patronimyc character varying(250),
|
|
|
+ login character varying(1000) NOT NULL,
|
|
|
+ id integer NOT NULL,
|
|
|
+ password character varying(1000) NOT NULL,
|
|
|
+ role_id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.users OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 218 (class 1259 OID 16397)
|
|
|
+-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.users_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER SEQUENCE public.users_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4447 (class 0 OID 0)
|
|
|
+-- Dependencies: 218
|
|
|
+-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4215 (class 2604 OID 16439)
|
|
|
+-- Name: manufacturies id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.manufacturies ALTER COLUMN id SET DEFAULT nextval('public.manufacturies_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4213 (class 2604 OID 16429)
|
|
|
+-- Name: measure_units id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.measure_units ALTER COLUMN id SET DEFAULT nextval('public.measure_units_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4222 (class 2604 OID 16544)
|
|
|
+-- Name: order_products id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.order_products ALTER COLUMN id SET DEFAULT nextval('public.order_products_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4218 (class 2604 OID 16505)
|
|
|
+-- Name: order_statuses id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.order_statuses ALTER COLUMN id SET DEFAULT nextval('public.order_statuses_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4220 (class 2604 OID 16519)
|
|
|
+-- Name: orders id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders ALTER COLUMN id SET DEFAULT nextval('public.orders_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4219 (class 2604 OID 16512)
|
|
|
+-- Name: pick_up_points id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.pick_up_points ALTER COLUMN id SET DEFAULT nextval('public.pick_up_points_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4212 (class 2604 OID 16457)
|
|
|
+-- Name: prdocut_names id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.prdocut_names ALTER COLUMN id SET DEFAULT nextval('public.prdocut_names_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4216 (class 2604 OID 16444)
|
|
|
+-- Name: product_categories id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.product_categories ALTER COLUMN id SET DEFAULT nextval('public.product_categories_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4217 (class 2604 OID 16449)
|
|
|
+-- Name: products id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products ALTER COLUMN id SET DEFAULT nextval('public.products_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4210 (class 2604 OID 16409)
|
|
|
+-- Name: roles id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4214 (class 2604 OID 16434)
|
|
|
+-- Name: suppliers id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.suppliers ALTER COLUMN id SET DEFAULT nextval('public.suppliers_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4211 (class 2604 OID 16401)
|
|
|
+-- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4417 (class 0 OID 16436)
|
|
|
+-- Dependencies: 227
|
|
|
+-- Data for Name: manufacturies; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.manufacturies (id, title) FROM stdin;
|
|
|
+1 Kari
|
|
|
+2 Marco Tozzi
|
|
|
+3 Рос
|
|
|
+4 Rieker
|
|
|
+5 Alessio Nesca
|
|
|
+6 CROSBY
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4413 (class 0 OID 16426)
|
|
|
+-- Dependencies: 223
|
|
|
+-- Data for Name: measure_units; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.measure_units (id, title) FROM stdin;
|
|
|
+1 шт.
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4430 (class 0 OID 16541)
|
|
|
+-- Dependencies: 240
|
|
|
+-- Data for Name: order_products; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.order_products (id, count, order_id, product_id) FROM stdin;
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4424 (class 0 OID 16502)
|
|
|
+-- Dependencies: 234
|
|
|
+-- Data for Name: order_statuses; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.order_statuses (id, title) FROM stdin;
|
|
|
+1 Завершен
|
|
|
+2 Новый
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4428 (class 0 OID 16516)
|
|
|
+-- Dependencies: 238
|
|
|
+-- Data for Name: orders; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.orders (id, number, article, created_date, delivery_date, code, pick_up_point_id, status_id, user_id) FROM stdin;
|
|
|
+2 1 А112Т4, 2, F635R4, 2 2025-02-27 2025-04-20 901 1 1 4
|
|
|
+3 2 H782T5, 1, G783F5, 1 2022-09-28 2025-04-21 902 11 1 1
|
|
|
+4 3 J384T6, 10, D572U8, 10 2025-03-21 2025-04-22 903 2 1 2
|
|
|
+5 4 F572H7, 5, D329H3, 4 2025-02-20 2025-04-23 904 11 1 3
|
|
|
+6 5 А112Т4, 2, F635R4, 2 2025-03-17 2025-04-24 905 2 1 4
|
|
|
+7 6 H782T5, 1, G783F5, 1 2025-03-01 2025-04-25 906 15 1 1
|
|
|
+8 7 J384T6, 10, D572U8, 10 2025-02-28 2025-04-26 907 3 1 2
|
|
|
+9 8 F572H7, 5, D329H3, 4 2025-03-31 2025-04-27 908 19 2 3
|
|
|
+10 9 B320R5, 5, G432E4, 1 2025-04-02 2025-04-28 909 5 2 4
|
|
|
+11 10 S213E3, 5, E482R4, 5 2025-04-03 2025-04-29 910 19 2 4
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4426 (class 0 OID 16509)
|
|
|
+-- Dependencies: 236
|
|
|
+-- Data for Name: pick_up_points; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.pick_up_points (id, title) FROM stdin;
|
|
|
+1 420151, г. Лесной, ул. Вишневая, 32
|
|
|
+2 125061, г. Лесной, ул. Подгорная, 8
|
|
|
+3 630370, г. Лесной, ул. Шоссейная, 24
|
|
|
+4 400562, г. Лесной, ул. Зеленая, 32
|
|
|
+5 614510, г. Лесной, ул. Маяковского, 47
|
|
|
+6 410542, г. Лесной, ул. Светлая, 46
|
|
|
+7 620839, г. Лесной, ул. Цветочная, 8
|
|
|
+8 443890, г. Лесной, ул. Коммунистическая, 1
|
|
|
+9 603379, г. Лесной, ул. Спортивная, 46
|
|
|
+10 603721, г. Лесной, ул. Гоголя, 41
|
|
|
+11 410172, г. Лесной, ул. Северная, 13
|
|
|
+12 614611, г. Лесной, ул. Молодежная, 50
|
|
|
+13 454311, г.Лесной, ул. Новая, 19
|
|
|
+14 660007, г.Лесной, ул. Октябрьская, 19
|
|
|
+15 603036, г. Лесной, ул. Садовая, 4
|
|
|
+16 394060, г.Лесной, ул. Фрунзе, 43
|
|
|
+17 410661, г. Лесной, ул. Школьная, 50
|
|
|
+18 625590, г. Лесной, ул. Коммунистическая, 20
|
|
|
+19 625683, г. Лесной, ул. 8 Марта
|
|
|
+20 450983, г.Лесной, ул. Комсомольская, 26
|
|
|
+21 394782, г. Лесной, ул. Чехова, 3
|
|
|
+22 603002, г. Лесной, ул. Дзержинского, 28
|
|
|
+23 450558, г. Лесной, ул. Набережная, 30
|
|
|
+24 344288, г. Лесной, ул. Чехова, 1
|
|
|
+25 614164, г.Лесной, ул. Степная, 30
|
|
|
+26 394242, г. Лесной, ул. Коммунистическая, 43
|
|
|
+27 660540, г. Лесной, ул. Солнечная, 25
|
|
|
+28 125837, г. Лесной, ул. Шоссейная, 40
|
|
|
+29 125703, г. Лесной, ул. Партизанская, 49
|
|
|
+30 625283, г. Лесной, ул. Победы, 46
|
|
|
+31 614753, г. Лесной, ул. Полевая, 35
|
|
|
+32 426030, г. Лесной, ул. Маяковского, 44
|
|
|
+33 450375, г. Лесной ул. Клубная, 44
|
|
|
+34 625560, г. Лесной, ул. Некрасова, 12
|
|
|
+35 630201, г. Лесной, ул. Комсомольская, 17
|
|
|
+36 190949, г. Лесной, ул. Мичурина, 26
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4411 (class 0 OID 16421)
|
|
|
+-- Dependencies: 221
|
|
|
+-- Data for Name: prdocut_names; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.prdocut_names (title, id) FROM stdin;
|
|
|
+Ботинки 1
|
|
|
+Туфли 2
|
|
|
+Кроссовки 3
|
|
|
+Полуботинки 4
|
|
|
+Кеды 5
|
|
|
+Тапочки 6
|
|
|
+Сапоги 7
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4419 (class 0 OID 16441)
|
|
|
+-- Dependencies: 229
|
|
|
+-- Data for Name: product_categories; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.product_categories (id, title) FROM stdin;
|
|
|
+1 Женская обувь
|
|
|
+2 Мужская обувь
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4421 (class 0 OID 16446)
|
|
|
+-- Dependencies: 231
|
|
|
+-- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.products (id, article, price, sale, count, description, photo_path, product_name_id, measure_unit_id, supplier_id, manufacture_id, product_category_id) FROM stdin;
|
|
|
+1 А112Т4 4990 3 6 Женские 1 демисезонные kari 1.jpg 1 1 1 1 1
|
|
|
+2 F635R4 3244 2 13 1 Marco Tozzi женские демисезонные, размер 39, цвет бежевый 2.jpg 1 1 2 2 1
|
|
|
+3 H782T5 4499 4 5 2 kari мужские классика MYZ21AW-450A, размер 43, цвет: черный 3.jpg 2 1 1 1 2
|
|
|
+4 G783F5 5900 2 8 Мужские 1 Рос-Обувь кожаные с натуральным мехом 4.jpg 1 1 1 3 2
|
|
|
+5 J384T6 3800 2 16 B3430/14 4 мужские Rieker 5.jpg 1 1 2 4 2
|
|
|
+6 D572U8 4100 3 6 129615-4 3 мужские 6.jpg 3 1 2 3 2
|
|
|
+7 F572H7 2700 2 14 2 Marco Tozzi женские летние, размер 39, цвет черный 7.jpg 2 1 1 2 1
|
|
|
+8 D329H3 1890 4 4 4 Alessio Nesca женские 3-30797-47, размер 37, цвет: бордовый 8.jpg 4 1 2 5 1
|
|
|
+9 B320R5 4300 2 6 2 Rieker женские демисезонные, размер 41, цвет коричневый 9.jpg 2 1 1 4 1
|
|
|
+10 G432E4 2800 3 15 2 kari женские TR-YR-413017, размер 37, цвет: черный 10.jpg 2 1 1 1 1
|
|
|
+12 E482R4 1800 2 14 4 kari женские MYZ20S-149, размер 41, цвет: черный 4 1 1 1 1
|
|
|
+13 S634B5 5500 3 0 5 Caprice мужские демисезонные, размер 42, цвет черный 5 1 2 6 2
|
|
|
+14 K345R4 2100 2 3 407700/01-02 4 мужские 6 4 1 2 6 2
|
|
|
+15 O754F4 5400 4 18 2 женские демисезонные Rieker артикул 55073-68/37 2 1 2 4 1
|
|
|
+16 G531F4 6600 12 9 1 женские зимние ROMER арт. 893167-01 Черный 1 1 1 1 1
|
|
|
+17 J542F5 500 13 0 6 мужские Арт.70701-55-67син р.41 6 1 1 1 2
|
|
|
+18 B431R5 2700 2 5 Мужские кожаные 1/мужские 1 1 1 2 4 2
|
|
|
+19 P764G4 6800 15 15 2 женские, ARGO, размер 38 2 1 1 6 1
|
|
|
+20 C436G5 10200 15 9 1 женские, ARGO, размер 40 1 1 1 5 1
|
|
|
+21 F427R5 11800 15 11 1 на молнии с декоративной пряжкой FRAU 1 1 2 4 1
|
|
|
+22 N457T5 4600 3 13 4 1 черные зимние, мех 4 1 1 6 1
|
|
|
+23 D364R4 12400 16 5 2 Luiza Belly женские Kate-lazo черные из натуральной замши 2 1 1 1 1
|
|
|
+24 S326R5 9900 17 15 Мужские кожаные 6 "Профиль С.Дали" 6 1 2 6 2
|
|
|
+25 L754R4 1700 2 7 4 kari женские WB2020SS-26, размер 38, цвет: черный 4 1 1 1 1
|
|
|
+26 M542T5 2800 18 3 3 мужские TOFA 3 1 2 4 2
|
|
|
+27 D268G5 4399 3 12 2 Rieker женские демисезонные, размер 36, цвет коричневый 2 1 2 4 1
|
|
|
+28 T324F5 4699 2 5 Сапоги замша Цвет: синий 7 1 1 6 1
|
|
|
+29 K358H6 599 20 2 6 мужские син р.41 6 1 1 4 2
|
|
|
+30 H535R5 2300 2 7 Женские 1 демисезонные 1 1 2 4 1
|
|
|
+11 S213E3 2156 3 6 407700/01-01 4 мужские 6 4 1 2 6 2
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4407 (class 0 OID 16389)
|
|
|
+-- Dependencies: 217
|
|
|
+-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.roles (title, id) FROM stdin;
|
|
|
+Администратор 1
|
|
|
+Менеджер 2
|
|
|
+Авторизированный клиент 3
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4415 (class 0 OID 16431)
|
|
|
+-- Dependencies: 225
|
|
|
+-- Data for Name: suppliers; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.suppliers (id, title) FROM stdin;
|
|
|
+1 Kari
|
|
|
+2 Обувь для вас
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4409 (class 0 OID 16398)
|
|
|
+-- Dependencies: 219
|
|
|
+-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+COPY public.users (first_name, last_name, patronimyc, login, id, password, role_id) FROM stdin;
|
|
|
+Весения Никифорова Николаевна 94d5ous@gmail.com 1 uzWC67 1
|
|
|
+Руслан Сазонов Германович uth4iz@mail.com 2 2L6KZG 1
|
|
|
+Серафим Одинцов Артёмович yzls62@outlook.com 3 JlFRCZ 1
|
|
|
+Михаил Степанов Артёмович 1diph5e@tutanota.com 4 8ntwUp 2
|
|
|
+Петр Ворсин Евгеньевич tjde7c@yahoo.com 5 YOyhfR 2
|
|
|
+Елена Старикова Павловна wpmrc3do@tutanota.com 6 RSbvHv 2
|
|
|
+Анна Михайлюк Вячеславовна 5d4zbu@tutanota.com 7 rwVDh9 3
|
|
|
+Елена Ситдикова Анатольевна ptec8ym@yahoo.com 8 LdNyos 3
|
|
|
+Петр Ворсин Евгеньевич 1qz4kw@mail.com 9 gynQMT 3
|
|
|
+Елена Старикова Павловна 4np6se@mail.com 10 AtnDjr 3
|
|
|
+\.
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4448 (class 0 OID 0)
|
|
|
+-- Dependencies: 226
|
|
|
+-- Name: manufacturies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.manufacturies_id_seq', 6, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4449 (class 0 OID 0)
|
|
|
+-- Dependencies: 222
|
|
|
+-- Name: measure_units_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.measure_units_id_seq', 1, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4450 (class 0 OID 0)
|
|
|
+-- Dependencies: 239
|
|
|
+-- Name: order_products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.order_products_id_seq', 1, false);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4451 (class 0 OID 0)
|
|
|
+-- Dependencies: 233
|
|
|
+-- Name: order_statuses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.order_statuses_id_seq', 2, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4452 (class 0 OID 0)
|
|
|
+-- Dependencies: 237
|
|
|
+-- Name: orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.orders_id_seq', 11, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4453 (class 0 OID 0)
|
|
|
+-- Dependencies: 235
|
|
|
+-- Name: pick_up_points_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.pick_up_points_id_seq', 36, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4454 (class 0 OID 0)
|
|
|
+-- Dependencies: 232
|
|
|
+-- Name: prdocut_names_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.prdocut_names_id_seq', 7, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4455 (class 0 OID 0)
|
|
|
+-- Dependencies: 228
|
|
|
+-- Name: product_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.product_categories_id_seq', 2, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4456 (class 0 OID 0)
|
|
|
+-- Dependencies: 230
|
|
|
+-- Name: products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.products_id_seq', 30, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4457 (class 0 OID 0)
|
|
|
+-- Dependencies: 220
|
|
|
+-- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.roles_id_seq', 3, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4458 (class 0 OID 0)
|
|
|
+-- Dependencies: 224
|
|
|
+-- Name: suppliers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.suppliers_id_seq', 2, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4459 (class 0 OID 0)
|
|
|
+-- Dependencies: 218
|
|
|
+-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+SELECT pg_catalog.setval('public.users_id_seq', 10, true);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4236 (class 2606 OID 16471)
|
|
|
+-- Name: manufacturies manufacturies_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.manufacturies
|
|
|
+ ADD CONSTRAINT manufacturies_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4232 (class 2606 OID 16469)
|
|
|
+-- Name: measure_units measure_units_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.measure_units
|
|
|
+ ADD CONSTRAINT measure_units_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4250 (class 2606 OID 16546)
|
|
|
+-- Name: order_products order_products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.order_products
|
|
|
+ ADD CONSTRAINT order_products_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4244 (class 2606 OID 16507)
|
|
|
+-- Name: order_statuses order_statuses_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.order_statuses
|
|
|
+ ADD CONSTRAINT order_statuses_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4248 (class 2606 OID 16524)
|
|
|
+-- Name: orders orders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders
|
|
|
+ ADD CONSTRAINT orders_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4246 (class 2606 OID 16514)
|
|
|
+-- Name: pick_up_points pick_up_points_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.pick_up_points
|
|
|
+ ADD CONSTRAINT pick_up_points_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4230 (class 2606 OID 16462)
|
|
|
+-- Name: prdocut_names prdocut_names_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.prdocut_names
|
|
|
+ ADD CONSTRAINT prdocut_names_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4238 (class 2606 OID 16473)
|
|
|
+-- Name: product_categories product_categories_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.product_categories
|
|
|
+ ADD CONSTRAINT product_categories_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4240 (class 2606 OID 16453)
|
|
|
+-- Name: products products_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4242 (class 2606 OID 16455)
|
|
|
+-- Name: products products_unique; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_unique UNIQUE (article);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4224 (class 2606 OID 16414)
|
|
|
+-- Name: roles roles_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.roles
|
|
|
+ ADD CONSTRAINT roles_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4234 (class 2606 OID 16475)
|
|
|
+-- Name: suppliers suppliers_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.suppliers
|
|
|
+ ADD CONSTRAINT suppliers_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4226 (class 2606 OID 16405)
|
|
|
+-- Name: users users_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.users
|
|
|
+ ADD CONSTRAINT users_pk PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4228 (class 2606 OID 16407)
|
|
|
+-- Name: users users_unique; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.users
|
|
|
+ ADD CONSTRAINT users_unique UNIQUE (login);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4260 (class 2606 OID 16547)
|
|
|
+-- Name: order_products order_products_order_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.order_products
|
|
|
+ ADD CONSTRAINT order_products_order_id_fkey FOREIGN KEY (order_id) REFERENCES public.orders(id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4261 (class 2606 OID 16552)
|
|
|
+-- Name: order_products order_products_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.order_products
|
|
|
+ ADD CONSTRAINT order_products_product_id_fkey FOREIGN KEY (product_id) REFERENCES public.products(id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4257 (class 2606 OID 16525)
|
|
|
+-- Name: orders orders_pick_up_point_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders
|
|
|
+ ADD CONSTRAINT orders_pick_up_point_id_fkey FOREIGN KEY (pick_up_point_id) REFERENCES public.pick_up_points(id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4258 (class 2606 OID 16530)
|
|
|
+-- Name: orders orders_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders
|
|
|
+ ADD CONSTRAINT orders_status_id_fkey FOREIGN KEY (status_id) REFERENCES public.order_statuses(id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4259 (class 2606 OID 16535)
|
|
|
+-- Name: orders orders_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders
|
|
|
+ ADD CONSTRAINT orders_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4252 (class 2606 OID 16491)
|
|
|
+-- Name: products products_manufacture_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_manufacture_id_fkey FOREIGN KEY (manufacture_id) REFERENCES public.manufacturies(id) NOT VALID;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4253 (class 2606 OID 16481)
|
|
|
+-- Name: products products_measure_unit_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_measure_unit_id_fkey FOREIGN KEY (measure_unit_id) REFERENCES public.measure_units(id) NOT VALID;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4254 (class 2606 OID 16496)
|
|
|
+-- Name: products products_product_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_product_category_id_fkey FOREIGN KEY (product_category_id) REFERENCES public.product_categories(id) NOT VALID;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4255 (class 2606 OID 16476)
|
|
|
+-- Name: products products_product_name_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_product_name_id_fkey FOREIGN KEY (product_name_id) REFERENCES public.prdocut_names(id) NOT VALID;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4256 (class 2606 OID 16486)
|
|
|
+-- Name: products products_supplier_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.products
|
|
|
+ ADD CONSTRAINT products_supplier_id_fkey FOREIGN KEY (supplier_id) REFERENCES public.suppliers(id) NOT VALID;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- TOC entry 4251 (class 2606 OID 16415)
|
|
|
+-- Name: users user_role_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.users
|
|
|
+ ADD CONSTRAINT user_role_fk FOREIGN KEY (role_id) REFERENCES public.roles(id) NOT VALID;
|
|
|
+
|
|
|
+
|
|
|
+-- Completed on 2026-04-20 18:02:05 MSK
|
|
|
+
|
|
|
+--
|
|
|
+-- PostgreSQL database dump complete
|
|
|
+--
|
|
|
+
|
|
|
+\unrestrict IepfNlcahchOJkqiArt6eq9reTwOgg5XT2eosSdEGejeCaicn6hfAoPRQV0Tz3t
|
|
|
+
|