Бэкап базы данных.sql 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173
  1. --
  2. -- PostgreSQL database dump
  3. --
  4. \restrict IepfNlcahchOJkqiArt6eq9reTwOgg5XT2eosSdEGejeCaicn6hfAoPRQV0Tz3t
  5. -- Dumped from database version 17.7
  6. -- Dumped by pg_dump version 17.7
  7. -- Started on 2026-04-20 18:02:05 MSK
  8. SET statement_timeout = 0;
  9. SET lock_timeout = 0;
  10. SET idle_in_transaction_session_timeout = 0;
  11. SET transaction_timeout = 0;
  12. SET client_encoding = 'UTF8';
  13. SET standard_conforming_strings = on;
  14. SELECT pg_catalog.set_config('search_path', '', false);
  15. SET check_function_bodies = false;
  16. SET xmloption = content;
  17. SET client_min_messages = warning;
  18. SET row_security = off;
  19. SET default_tablespace = '';
  20. SET default_table_access_method = heap;
  21. --
  22. -- TOC entry 227 (class 1259 OID 16436)
  23. -- Name: manufacturies; Type: TABLE; Schema: public; Owner: postgres
  24. --
  25. CREATE TABLE public.manufacturies (
  26. id integer NOT NULL,
  27. title character varying(250) NOT NULL
  28. );
  29. ALTER TABLE public.manufacturies OWNER TO postgres;
  30. --
  31. -- TOC entry 226 (class 1259 OID 16435)
  32. -- Name: manufacturies_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  33. --
  34. CREATE SEQUENCE public.manufacturies_id_seq
  35. AS integer
  36. START WITH 1
  37. INCREMENT BY 1
  38. NO MINVALUE
  39. NO MAXVALUE
  40. CACHE 1;
  41. ALTER SEQUENCE public.manufacturies_id_seq OWNER TO postgres;
  42. --
  43. -- TOC entry 4436 (class 0 OID 0)
  44. -- Dependencies: 226
  45. -- Name: manufacturies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  46. --
  47. ALTER SEQUENCE public.manufacturies_id_seq OWNED BY public.manufacturies.id;
  48. --
  49. -- TOC entry 223 (class 1259 OID 16426)
  50. -- Name: measure_units; Type: TABLE; Schema: public; Owner: postgres
  51. --
  52. CREATE TABLE public.measure_units (
  53. id integer NOT NULL,
  54. title character varying(250) NOT NULL
  55. );
  56. ALTER TABLE public.measure_units OWNER TO postgres;
  57. --
  58. -- TOC entry 222 (class 1259 OID 16425)
  59. -- Name: measure_units_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  60. --
  61. CREATE SEQUENCE public.measure_units_id_seq
  62. AS integer
  63. START WITH 1
  64. INCREMENT BY 1
  65. NO MINVALUE
  66. NO MAXVALUE
  67. CACHE 1;
  68. ALTER SEQUENCE public.measure_units_id_seq OWNER TO postgres;
  69. --
  70. -- TOC entry 4437 (class 0 OID 0)
  71. -- Dependencies: 222
  72. -- Name: measure_units_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  73. --
  74. ALTER SEQUENCE public.measure_units_id_seq OWNED BY public.measure_units.id;
  75. --
  76. -- TOC entry 240 (class 1259 OID 16541)
  77. -- Name: order_products; Type: TABLE; Schema: public; Owner: postgres
  78. --
  79. CREATE TABLE public.order_products (
  80. id integer NOT NULL,
  81. count integer NOT NULL,
  82. order_id integer NOT NULL,
  83. product_id integer NOT NULL
  84. );
  85. ALTER TABLE public.order_products OWNER TO postgres;
  86. --
  87. -- TOC entry 239 (class 1259 OID 16540)
  88. -- Name: order_products_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  89. --
  90. CREATE SEQUENCE public.order_products_id_seq
  91. AS integer
  92. START WITH 1
  93. INCREMENT BY 1
  94. NO MINVALUE
  95. NO MAXVALUE
  96. CACHE 1;
  97. ALTER SEQUENCE public.order_products_id_seq OWNER TO postgres;
  98. --
  99. -- TOC entry 4438 (class 0 OID 0)
  100. -- Dependencies: 239
  101. -- Name: order_products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  102. --
  103. ALTER SEQUENCE public.order_products_id_seq OWNED BY public.order_products.id;
  104. --
  105. -- TOC entry 234 (class 1259 OID 16502)
  106. -- Name: order_statuses; Type: TABLE; Schema: public; Owner: postgres
  107. --
  108. CREATE TABLE public.order_statuses (
  109. id integer NOT NULL,
  110. title character varying(250) NOT NULL
  111. );
  112. ALTER TABLE public.order_statuses OWNER TO postgres;
  113. --
  114. -- TOC entry 233 (class 1259 OID 16501)
  115. -- Name: order_statuses_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  116. --
  117. CREATE SEQUENCE public.order_statuses_id_seq
  118. AS integer
  119. START WITH 1
  120. INCREMENT BY 1
  121. NO MINVALUE
  122. NO MAXVALUE
  123. CACHE 1;
  124. ALTER SEQUENCE public.order_statuses_id_seq OWNER TO postgres;
  125. --
  126. -- TOC entry 4439 (class 0 OID 0)
  127. -- Dependencies: 233
  128. -- Name: order_statuses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  129. --
  130. ALTER SEQUENCE public.order_statuses_id_seq OWNED BY public.order_statuses.id;
  131. --
  132. -- TOC entry 238 (class 1259 OID 16516)
  133. -- Name: orders; Type: TABLE; Schema: public; Owner: postgres
  134. --
  135. CREATE TABLE public.orders (
  136. id integer NOT NULL,
  137. number character varying(250),
  138. article character varying(1000) NOT NULL,
  139. created_date date DEFAULT now() NOT NULL,
  140. delivery_date date NOT NULL,
  141. code character varying(100) NOT NULL,
  142. pick_up_point_id integer NOT NULL,
  143. status_id integer NOT NULL,
  144. user_id integer NOT NULL
  145. );
  146. ALTER TABLE public.orders OWNER TO postgres;
  147. --
  148. -- TOC entry 237 (class 1259 OID 16515)
  149. -- Name: orders_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  150. --
  151. CREATE SEQUENCE public.orders_id_seq
  152. AS integer
  153. START WITH 1
  154. INCREMENT BY 1
  155. NO MINVALUE
  156. NO MAXVALUE
  157. CACHE 1;
  158. ALTER SEQUENCE public.orders_id_seq OWNER TO postgres;
  159. --
  160. -- TOC entry 4440 (class 0 OID 0)
  161. -- Dependencies: 237
  162. -- Name: orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  163. --
  164. ALTER SEQUENCE public.orders_id_seq OWNED BY public.orders.id;
  165. --
  166. -- TOC entry 236 (class 1259 OID 16509)
  167. -- Name: pick_up_points; Type: TABLE; Schema: public; Owner: postgres
  168. --
  169. CREATE TABLE public.pick_up_points (
  170. id integer NOT NULL,
  171. title character varying(250) NOT NULL
  172. );
  173. ALTER TABLE public.pick_up_points OWNER TO postgres;
  174. --
  175. -- TOC entry 235 (class 1259 OID 16508)
  176. -- Name: pick_up_points_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  177. --
  178. CREATE SEQUENCE public.pick_up_points_id_seq
  179. AS integer
  180. START WITH 1
  181. INCREMENT BY 1
  182. NO MINVALUE
  183. NO MAXVALUE
  184. CACHE 1;
  185. ALTER SEQUENCE public.pick_up_points_id_seq OWNER TO postgres;
  186. --
  187. -- TOC entry 4441 (class 0 OID 0)
  188. -- Dependencies: 235
  189. -- Name: pick_up_points_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  190. --
  191. ALTER SEQUENCE public.pick_up_points_id_seq OWNED BY public.pick_up_points.id;
  192. --
  193. -- TOC entry 221 (class 1259 OID 16421)
  194. -- Name: prdocut_names; Type: TABLE; Schema: public; Owner: postgres
  195. --
  196. CREATE TABLE public.prdocut_names (
  197. title character varying(250) NOT NULL,
  198. id integer NOT NULL
  199. );
  200. ALTER TABLE public.prdocut_names OWNER TO postgres;
  201. --
  202. -- TOC entry 232 (class 1259 OID 16456)
  203. -- Name: prdocut_names_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  204. --
  205. CREATE SEQUENCE public.prdocut_names_id_seq
  206. AS integer
  207. START WITH 1
  208. INCREMENT BY 1
  209. NO MINVALUE
  210. NO MAXVALUE
  211. CACHE 1;
  212. ALTER SEQUENCE public.prdocut_names_id_seq OWNER TO postgres;
  213. --
  214. -- TOC entry 4442 (class 0 OID 0)
  215. -- Dependencies: 232
  216. -- Name: prdocut_names_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  217. --
  218. ALTER SEQUENCE public.prdocut_names_id_seq OWNED BY public.prdocut_names.id;
  219. --
  220. -- TOC entry 229 (class 1259 OID 16441)
  221. -- Name: product_categories; Type: TABLE; Schema: public; Owner: postgres
  222. --
  223. CREATE TABLE public.product_categories (
  224. id integer NOT NULL,
  225. title character varying(250) NOT NULL
  226. );
  227. ALTER TABLE public.product_categories OWNER TO postgres;
  228. --
  229. -- TOC entry 228 (class 1259 OID 16440)
  230. -- Name: product_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  231. --
  232. CREATE SEQUENCE public.product_categories_id_seq
  233. AS integer
  234. START WITH 1
  235. INCREMENT BY 1
  236. NO MINVALUE
  237. NO MAXVALUE
  238. CACHE 1;
  239. ALTER SEQUENCE public.product_categories_id_seq OWNER TO postgres;
  240. --
  241. -- TOC entry 4443 (class 0 OID 0)
  242. -- Dependencies: 228
  243. -- Name: product_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  244. --
  245. ALTER SEQUENCE public.product_categories_id_seq OWNED BY public.product_categories.id;
  246. --
  247. -- TOC entry 231 (class 1259 OID 16446)
  248. -- Name: products; Type: TABLE; Schema: public; Owner: postgres
  249. --
  250. CREATE TABLE public.products (
  251. id integer NOT NULL,
  252. article character varying NOT NULL,
  253. price numeric NOT NULL,
  254. sale numeric,
  255. count integer NOT NULL,
  256. description character varying,
  257. photo_path character varying,
  258. product_name_id integer NOT NULL,
  259. measure_unit_id integer NOT NULL,
  260. supplier_id integer NOT NULL,
  261. manufacture_id integer NOT NULL,
  262. product_category_id integer NOT NULL
  263. );
  264. ALTER TABLE public.products OWNER TO postgres;
  265. --
  266. -- TOC entry 230 (class 1259 OID 16445)
  267. -- Name: products_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  268. --
  269. CREATE SEQUENCE public.products_id_seq
  270. AS integer
  271. START WITH 1
  272. INCREMENT BY 1
  273. NO MINVALUE
  274. NO MAXVALUE
  275. CACHE 1;
  276. ALTER SEQUENCE public.products_id_seq OWNER TO postgres;
  277. --
  278. -- TOC entry 4444 (class 0 OID 0)
  279. -- Dependencies: 230
  280. -- Name: products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  281. --
  282. ALTER SEQUENCE public.products_id_seq OWNED BY public.products.id;
  283. --
  284. -- TOC entry 217 (class 1259 OID 16389)
  285. -- Name: roles; Type: TABLE; Schema: public; Owner: postgres
  286. --
  287. CREATE TABLE public.roles (
  288. title character varying(250) NOT NULL,
  289. id integer NOT NULL
  290. );
  291. ALTER TABLE public.roles OWNER TO postgres;
  292. --
  293. -- TOC entry 220 (class 1259 OID 16408)
  294. -- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  295. --
  296. CREATE SEQUENCE public.roles_id_seq
  297. AS integer
  298. START WITH 1
  299. INCREMENT BY 1
  300. NO MINVALUE
  301. NO MAXVALUE
  302. CACHE 1;
  303. ALTER SEQUENCE public.roles_id_seq OWNER TO postgres;
  304. --
  305. -- TOC entry 4445 (class 0 OID 0)
  306. -- Dependencies: 220
  307. -- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  308. --
  309. ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id;
  310. --
  311. -- TOC entry 225 (class 1259 OID 16431)
  312. -- Name: suppliers; Type: TABLE; Schema: public; Owner: postgres
  313. --
  314. CREATE TABLE public.suppliers (
  315. id integer NOT NULL,
  316. title character varying(250) NOT NULL
  317. );
  318. ALTER TABLE public.suppliers OWNER TO postgres;
  319. --
  320. -- TOC entry 224 (class 1259 OID 16430)
  321. -- Name: suppliers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  322. --
  323. CREATE SEQUENCE public.suppliers_id_seq
  324. AS integer
  325. START WITH 1
  326. INCREMENT BY 1
  327. NO MINVALUE
  328. NO MAXVALUE
  329. CACHE 1;
  330. ALTER SEQUENCE public.suppliers_id_seq OWNER TO postgres;
  331. --
  332. -- TOC entry 4446 (class 0 OID 0)
  333. -- Dependencies: 224
  334. -- Name: suppliers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  335. --
  336. ALTER SEQUENCE public.suppliers_id_seq OWNED BY public.suppliers.id;
  337. --
  338. -- TOC entry 219 (class 1259 OID 16398)
  339. -- Name: users; Type: TABLE; Schema: public; Owner: postgres
  340. --
  341. CREATE TABLE public.users (
  342. first_name character varying(250) NOT NULL,
  343. last_name character varying(250) NOT NULL,
  344. patronimyc character varying(250),
  345. login character varying(1000) NOT NULL,
  346. id integer NOT NULL,
  347. password character varying(1000) NOT NULL,
  348. role_id integer NOT NULL
  349. );
  350. ALTER TABLE public.users OWNER TO postgres;
  351. --
  352. -- TOC entry 218 (class 1259 OID 16397)
  353. -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  354. --
  355. CREATE SEQUENCE public.users_id_seq
  356. AS integer
  357. START WITH 1
  358. INCREMENT BY 1
  359. NO MINVALUE
  360. NO MAXVALUE
  361. CACHE 1;
  362. ALTER SEQUENCE public.users_id_seq OWNER TO postgres;
  363. --
  364. -- TOC entry 4447 (class 0 OID 0)
  365. -- Dependencies: 218
  366. -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  367. --
  368. ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
  369. --
  370. -- TOC entry 4215 (class 2604 OID 16439)
  371. -- Name: manufacturies id; Type: DEFAULT; Schema: public; Owner: postgres
  372. --
  373. ALTER TABLE ONLY public.manufacturies ALTER COLUMN id SET DEFAULT nextval('public.manufacturies_id_seq'::regclass);
  374. --
  375. -- TOC entry 4213 (class 2604 OID 16429)
  376. -- Name: measure_units id; Type: DEFAULT; Schema: public; Owner: postgres
  377. --
  378. ALTER TABLE ONLY public.measure_units ALTER COLUMN id SET DEFAULT nextval('public.measure_units_id_seq'::regclass);
  379. --
  380. -- TOC entry 4222 (class 2604 OID 16544)
  381. -- Name: order_products id; Type: DEFAULT; Schema: public; Owner: postgres
  382. --
  383. ALTER TABLE ONLY public.order_products ALTER COLUMN id SET DEFAULT nextval('public.order_products_id_seq'::regclass);
  384. --
  385. -- TOC entry 4218 (class 2604 OID 16505)
  386. -- Name: order_statuses id; Type: DEFAULT; Schema: public; Owner: postgres
  387. --
  388. ALTER TABLE ONLY public.order_statuses ALTER COLUMN id SET DEFAULT nextval('public.order_statuses_id_seq'::regclass);
  389. --
  390. -- TOC entry 4220 (class 2604 OID 16519)
  391. -- Name: orders id; Type: DEFAULT; Schema: public; Owner: postgres
  392. --
  393. ALTER TABLE ONLY public.orders ALTER COLUMN id SET DEFAULT nextval('public.orders_id_seq'::regclass);
  394. --
  395. -- TOC entry 4219 (class 2604 OID 16512)
  396. -- Name: pick_up_points id; Type: DEFAULT; Schema: public; Owner: postgres
  397. --
  398. ALTER TABLE ONLY public.pick_up_points ALTER COLUMN id SET DEFAULT nextval('public.pick_up_points_id_seq'::regclass);
  399. --
  400. -- TOC entry 4212 (class 2604 OID 16457)
  401. -- Name: prdocut_names id; Type: DEFAULT; Schema: public; Owner: postgres
  402. --
  403. ALTER TABLE ONLY public.prdocut_names ALTER COLUMN id SET DEFAULT nextval('public.prdocut_names_id_seq'::regclass);
  404. --
  405. -- TOC entry 4216 (class 2604 OID 16444)
  406. -- Name: product_categories id; Type: DEFAULT; Schema: public; Owner: postgres
  407. --
  408. ALTER TABLE ONLY public.product_categories ALTER COLUMN id SET DEFAULT nextval('public.product_categories_id_seq'::regclass);
  409. --
  410. -- TOC entry 4217 (class 2604 OID 16449)
  411. -- Name: products id; Type: DEFAULT; Schema: public; Owner: postgres
  412. --
  413. ALTER TABLE ONLY public.products ALTER COLUMN id SET DEFAULT nextval('public.products_id_seq'::regclass);
  414. --
  415. -- TOC entry 4210 (class 2604 OID 16409)
  416. -- Name: roles id; Type: DEFAULT; Schema: public; Owner: postgres
  417. --
  418. ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass);
  419. --
  420. -- TOC entry 4214 (class 2604 OID 16434)
  421. -- Name: suppliers id; Type: DEFAULT; Schema: public; Owner: postgres
  422. --
  423. ALTER TABLE ONLY public.suppliers ALTER COLUMN id SET DEFAULT nextval('public.suppliers_id_seq'::regclass);
  424. --
  425. -- TOC entry 4211 (class 2604 OID 16401)
  426. -- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
  427. --
  428. ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
  429. --
  430. -- TOC entry 4417 (class 0 OID 16436)
  431. -- Dependencies: 227
  432. -- Data for Name: manufacturies; Type: TABLE DATA; Schema: public; Owner: postgres
  433. --
  434. COPY public.manufacturies (id, title) FROM stdin;
  435. 1 Kari
  436. 2 Marco Tozzi
  437. 3 Рос
  438. 4 Rieker
  439. 5 Alessio Nesca
  440. 6 CROSBY
  441. \.
  442. --
  443. -- TOC entry 4413 (class 0 OID 16426)
  444. -- Dependencies: 223
  445. -- Data for Name: measure_units; Type: TABLE DATA; Schema: public; Owner: postgres
  446. --
  447. COPY public.measure_units (id, title) FROM stdin;
  448. 1 шт.
  449. \.
  450. --
  451. -- TOC entry 4430 (class 0 OID 16541)
  452. -- Dependencies: 240
  453. -- Data for Name: order_products; Type: TABLE DATA; Schema: public; Owner: postgres
  454. --
  455. COPY public.order_products (id, count, order_id, product_id) FROM stdin;
  456. \.
  457. --
  458. -- TOC entry 4424 (class 0 OID 16502)
  459. -- Dependencies: 234
  460. -- Data for Name: order_statuses; Type: TABLE DATA; Schema: public; Owner: postgres
  461. --
  462. COPY public.order_statuses (id, title) FROM stdin;
  463. 1 Завершен
  464. 2 Новый
  465. \.
  466. --
  467. -- TOC entry 4428 (class 0 OID 16516)
  468. -- Dependencies: 238
  469. -- Data for Name: orders; Type: TABLE DATA; Schema: public; Owner: postgres
  470. --
  471. COPY public.orders (id, number, article, created_date, delivery_date, code, pick_up_point_id, status_id, user_id) FROM stdin;
  472. 2 1 А112Т4, 2, F635R4, 2 2025-02-27 2025-04-20 901 1 1 4
  473. 3 2 H782T5, 1, G783F5, 1 2022-09-28 2025-04-21 902 11 1 1
  474. 4 3 J384T6, 10, D572U8, 10 2025-03-21 2025-04-22 903 2 1 2
  475. 5 4 F572H7, 5, D329H3, 4 2025-02-20 2025-04-23 904 11 1 3
  476. 6 5 А112Т4, 2, F635R4, 2 2025-03-17 2025-04-24 905 2 1 4
  477. 7 6 H782T5, 1, G783F5, 1 2025-03-01 2025-04-25 906 15 1 1
  478. 8 7 J384T6, 10, D572U8, 10 2025-02-28 2025-04-26 907 3 1 2
  479. 9 8 F572H7, 5, D329H3, 4 2025-03-31 2025-04-27 908 19 2 3
  480. 10 9 B320R5, 5, G432E4, 1 2025-04-02 2025-04-28 909 5 2 4
  481. 11 10 S213E3, 5, E482R4, 5 2025-04-03 2025-04-29 910 19 2 4
  482. \.
  483. --
  484. -- TOC entry 4426 (class 0 OID 16509)
  485. -- Dependencies: 236
  486. -- Data for Name: pick_up_points; Type: TABLE DATA; Schema: public; Owner: postgres
  487. --
  488. COPY public.pick_up_points (id, title) FROM stdin;
  489. 1 420151, г. Лесной, ул. Вишневая, 32
  490. 2 125061, г. Лесной, ул. Подгорная, 8
  491. 3 630370, г. Лесной, ул. Шоссейная, 24
  492. 4 400562, г. Лесной, ул. Зеленая, 32
  493. 5 614510, г. Лесной, ул. Маяковского, 47
  494. 6 410542, г. Лесной, ул. Светлая, 46
  495. 7 620839, г. Лесной, ул. Цветочная, 8
  496. 8 443890, г. Лесной, ул. Коммунистическая, 1
  497. 9 603379, г. Лесной, ул. Спортивная, 46
  498. 10 603721, г. Лесной, ул. Гоголя, 41
  499. 11 410172, г. Лесной, ул. Северная, 13
  500. 12 614611, г. Лесной, ул. Молодежная, 50
  501. 13 454311, г.Лесной, ул. Новая, 19
  502. 14 660007, г.Лесной, ул. Октябрьская, 19
  503. 15 603036, г. Лесной, ул. Садовая, 4
  504. 16 394060, г.Лесной, ул. Фрунзе, 43
  505. 17 410661, г. Лесной, ул. Школьная, 50
  506. 18 625590, г. Лесной, ул. Коммунистическая, 20
  507. 19 625683, г. Лесной, ул. 8 Марта
  508. 20 450983, г.Лесной, ул. Комсомольская, 26
  509. 21 394782, г. Лесной, ул. Чехова, 3
  510. 22 603002, г. Лесной, ул. Дзержинского, 28
  511. 23 450558, г. Лесной, ул. Набережная, 30
  512. 24 344288, г. Лесной, ул. Чехова, 1
  513. 25 614164, г.Лесной,  ул. Степная, 30
  514. 26 394242, г. Лесной, ул. Коммунистическая, 43
  515. 27 660540, г. Лесной, ул. Солнечная, 25
  516. 28 125837, г. Лесной, ул. Шоссейная, 40
  517. 29 125703, г. Лесной, ул. Партизанская, 49
  518. 30 625283, г. Лесной, ул. Победы, 46
  519. 31 614753, г. Лесной, ул. Полевая, 35
  520. 32 426030, г. Лесной, ул. Маяковского, 44
  521. 33 450375, г. Лесной ул. Клубная, 44
  522. 34 625560, г. Лесной, ул. Некрасова, 12
  523. 35 630201, г. Лесной, ул. Комсомольская, 17
  524. 36 190949, г. Лесной, ул. Мичурина, 26
  525. \.
  526. --
  527. -- TOC entry 4411 (class 0 OID 16421)
  528. -- Dependencies: 221
  529. -- Data for Name: prdocut_names; Type: TABLE DATA; Schema: public; Owner: postgres
  530. --
  531. COPY public.prdocut_names (title, id) FROM stdin;
  532. Ботинки 1
  533. Туфли 2
  534. Кроссовки 3
  535. Полуботинки 4
  536. Кеды 5
  537. Тапочки 6
  538. Сапоги 7
  539. \.
  540. --
  541. -- TOC entry 4419 (class 0 OID 16441)
  542. -- Dependencies: 229
  543. -- Data for Name: product_categories; Type: TABLE DATA; Schema: public; Owner: postgres
  544. --
  545. COPY public.product_categories (id, title) FROM stdin;
  546. 1 Женская обувь
  547. 2 Мужская обувь
  548. \.
  549. --
  550. -- TOC entry 4421 (class 0 OID 16446)
  551. -- Dependencies: 231
  552. -- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: postgres
  553. --
  554. 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;
  555. 1 А112Т4 4990 3 6 Женские 1 демисезонные kari 1.jpg 1 1 1 1 1
  556. 2 F635R4 3244 2 13 1 Marco Tozzi женские демисезонные, размер 39, цвет бежевый 2.jpg 1 1 2 2 1
  557. 3 H782T5 4499 4 5 2 kari мужские классика MYZ21AW-450A, размер 43, цвет: черный 3.jpg 2 1 1 1 2
  558. 4 G783F5 5900 2 8 Мужские 1 Рос-Обувь кожаные с натуральным мехом 4.jpg 1 1 1 3 2
  559. 5 J384T6 3800 2 16 B3430/14 4 мужские Rieker 5.jpg 1 1 2 4 2
  560. 6 D572U8 4100 3 6 129615-4 3 мужские 6.jpg 3 1 2 3 2
  561. 7 F572H7 2700 2 14 2 Marco Tozzi женские летние, размер 39, цвет черный 7.jpg 2 1 1 2 1
  562. 8 D329H3 1890 4 4 4 Alessio Nesca женские 3-30797-47, размер 37, цвет: бордовый 8.jpg 4 1 2 5 1
  563. 9 B320R5 4300 2 6 2 Rieker женские демисезонные, размер 41, цвет коричневый 9.jpg 2 1 1 4 1
  564. 10 G432E4 2800 3 15 2 kari женские TR-YR-413017, размер 37, цвет: черный 10.jpg 2 1 1 1 1
  565. 12 E482R4 1800 2 14 4 kari женские MYZ20S-149, размер 41, цвет: черный 4 1 1 1 1
  566. 13 S634B5 5500 3 0 5 Caprice мужские демисезонные, размер 42, цвет черный 5 1 2 6 2
  567. 14 K345R4 2100 2 3 407700/01-02 4 мужские 6 4 1 2 6 2
  568. 15 O754F4 5400 4 18 2 женские демисезонные Rieker артикул 55073-68/37 2 1 2 4 1
  569. 16 G531F4 6600 12 9 1 женские зимние ROMER арт. 893167-01 Черный 1 1 1 1 1
  570. 17 J542F5 500 13 0 6 мужские Арт.70701-55-67син р.41 6 1 1 1 2
  571. 18 B431R5 2700 2 5 Мужские кожаные 1/мужские 1 1 1 2 4 2
  572. 19 P764G4 6800 15 15 2 женские, ARGO, размер 38 2 1 1 6 1
  573. 20 C436G5 10200 15 9 1 женские, ARGO, размер 40 1 1 1 5 1
  574. 21 F427R5 11800 15 11 1 на молнии с декоративной пряжкой FRAU 1 1 2 4 1
  575. 22 N457T5 4600 3 13 4 1 черные зимние, мех 4 1 1 6 1
  576. 23 D364R4 12400 16 5 2 Luiza Belly женские Kate-lazo черные из натуральной замши 2 1 1 1 1
  577. 24 S326R5 9900 17 15 Мужские кожаные 6 "Профиль С.Дали"  6 1 2 6 2
  578. 25 L754R4 1700 2 7 4 kari женские WB2020SS-26, размер 38, цвет: черный 4 1 1 1 1
  579. 26 M542T5 2800 18 3 3 мужские TOFA 3 1 2 4 2
  580. 27 D268G5 4399 3 12 2 Rieker женские демисезонные, размер 36, цвет коричневый 2 1 2 4 1
  581. 28 T324F5 4699 2 5 Сапоги замша Цвет: синий 7 1 1 6 1
  582. 29 K358H6 599 20 2 6 мужские син р.41 6 1 1 4 2
  583. 30 H535R5 2300 2 7 Женские 1 демисезонные 1 1 2 4 1
  584. 11 S213E3 2156 3 6 407700/01-01 4 мужские 6 4 1 2 6 2
  585. \.
  586. --
  587. -- TOC entry 4407 (class 0 OID 16389)
  588. -- Dependencies: 217
  589. -- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: postgres
  590. --
  591. COPY public.roles (title, id) FROM stdin;
  592. Администратор 1
  593. Менеджер 2
  594. Авторизированный клиент 3
  595. \.
  596. --
  597. -- TOC entry 4415 (class 0 OID 16431)
  598. -- Dependencies: 225
  599. -- Data for Name: suppliers; Type: TABLE DATA; Schema: public; Owner: postgres
  600. --
  601. COPY public.suppliers (id, title) FROM stdin;
  602. 1 Kari
  603. 2 Обувь для вас
  604. \.
  605. --
  606. -- TOC entry 4409 (class 0 OID 16398)
  607. -- Dependencies: 219
  608. -- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
  609. --
  610. COPY public.users (first_name, last_name, patronimyc, login, id, password, role_id) FROM stdin;
  611. Весения Никифорова Николаевна 94d5ous@gmail.com 1 uzWC67 1
  612. Руслан Сазонов Германович uth4iz@mail.com 2 2L6KZG 1
  613. Серафим Одинцов Артёмович yzls62@outlook.com 3 JlFRCZ 1
  614. Михаил Степанов Артёмович 1diph5e@tutanota.com 4 8ntwUp 2
  615. Петр Ворсин Евгеньевич tjde7c@yahoo.com 5 YOyhfR 2
  616. Елена Старикова Павловна wpmrc3do@tutanota.com 6 RSbvHv 2
  617. Анна Михайлюк Вячеславовна 5d4zbu@tutanota.com 7 rwVDh9 3
  618. Елена Ситдикова Анатольевна ptec8ym@yahoo.com 8 LdNyos 3
  619. Петр Ворсин Евгеньевич 1qz4kw@mail.com 9 gynQMT 3
  620. Елена Старикова Павловна 4np6se@mail.com 10 AtnDjr 3
  621. \.
  622. --
  623. -- TOC entry 4448 (class 0 OID 0)
  624. -- Dependencies: 226
  625. -- Name: manufacturies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  626. --
  627. SELECT pg_catalog.setval('public.manufacturies_id_seq', 6, true);
  628. --
  629. -- TOC entry 4449 (class 0 OID 0)
  630. -- Dependencies: 222
  631. -- Name: measure_units_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  632. --
  633. SELECT pg_catalog.setval('public.measure_units_id_seq', 1, true);
  634. --
  635. -- TOC entry 4450 (class 0 OID 0)
  636. -- Dependencies: 239
  637. -- Name: order_products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  638. --
  639. SELECT pg_catalog.setval('public.order_products_id_seq', 1, false);
  640. --
  641. -- TOC entry 4451 (class 0 OID 0)
  642. -- Dependencies: 233
  643. -- Name: order_statuses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  644. --
  645. SELECT pg_catalog.setval('public.order_statuses_id_seq', 2, true);
  646. --
  647. -- TOC entry 4452 (class 0 OID 0)
  648. -- Dependencies: 237
  649. -- Name: orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  650. --
  651. SELECT pg_catalog.setval('public.orders_id_seq', 11, true);
  652. --
  653. -- TOC entry 4453 (class 0 OID 0)
  654. -- Dependencies: 235
  655. -- Name: pick_up_points_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  656. --
  657. SELECT pg_catalog.setval('public.pick_up_points_id_seq', 36, true);
  658. --
  659. -- TOC entry 4454 (class 0 OID 0)
  660. -- Dependencies: 232
  661. -- Name: prdocut_names_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  662. --
  663. SELECT pg_catalog.setval('public.prdocut_names_id_seq', 7, true);
  664. --
  665. -- TOC entry 4455 (class 0 OID 0)
  666. -- Dependencies: 228
  667. -- Name: product_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  668. --
  669. SELECT pg_catalog.setval('public.product_categories_id_seq', 2, true);
  670. --
  671. -- TOC entry 4456 (class 0 OID 0)
  672. -- Dependencies: 230
  673. -- Name: products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  674. --
  675. SELECT pg_catalog.setval('public.products_id_seq', 30, true);
  676. --
  677. -- TOC entry 4457 (class 0 OID 0)
  678. -- Dependencies: 220
  679. -- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  680. --
  681. SELECT pg_catalog.setval('public.roles_id_seq', 3, true);
  682. --
  683. -- TOC entry 4458 (class 0 OID 0)
  684. -- Dependencies: 224
  685. -- Name: suppliers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  686. --
  687. SELECT pg_catalog.setval('public.suppliers_id_seq', 2, true);
  688. --
  689. -- TOC entry 4459 (class 0 OID 0)
  690. -- Dependencies: 218
  691. -- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  692. --
  693. SELECT pg_catalog.setval('public.users_id_seq', 10, true);
  694. --
  695. -- TOC entry 4236 (class 2606 OID 16471)
  696. -- Name: manufacturies manufacturies_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  697. --
  698. ALTER TABLE ONLY public.manufacturies
  699. ADD CONSTRAINT manufacturies_pk PRIMARY KEY (id);
  700. --
  701. -- TOC entry 4232 (class 2606 OID 16469)
  702. -- Name: measure_units measure_units_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  703. --
  704. ALTER TABLE ONLY public.measure_units
  705. ADD CONSTRAINT measure_units_pk PRIMARY KEY (id);
  706. --
  707. -- TOC entry 4250 (class 2606 OID 16546)
  708. -- Name: order_products order_products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
  709. --
  710. ALTER TABLE ONLY public.order_products
  711. ADD CONSTRAINT order_products_pkey PRIMARY KEY (id);
  712. --
  713. -- TOC entry 4244 (class 2606 OID 16507)
  714. -- Name: order_statuses order_statuses_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  715. --
  716. ALTER TABLE ONLY public.order_statuses
  717. ADD CONSTRAINT order_statuses_pk PRIMARY KEY (id);
  718. --
  719. -- TOC entry 4248 (class 2606 OID 16524)
  720. -- Name: orders orders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
  721. --
  722. ALTER TABLE ONLY public.orders
  723. ADD CONSTRAINT orders_pkey PRIMARY KEY (id);
  724. --
  725. -- TOC entry 4246 (class 2606 OID 16514)
  726. -- Name: pick_up_points pick_up_points_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  727. --
  728. ALTER TABLE ONLY public.pick_up_points
  729. ADD CONSTRAINT pick_up_points_pk PRIMARY KEY (id);
  730. --
  731. -- TOC entry 4230 (class 2606 OID 16462)
  732. -- Name: prdocut_names prdocut_names_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  733. --
  734. ALTER TABLE ONLY public.prdocut_names
  735. ADD CONSTRAINT prdocut_names_pk PRIMARY KEY (id);
  736. --
  737. -- TOC entry 4238 (class 2606 OID 16473)
  738. -- Name: product_categories product_categories_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  739. --
  740. ALTER TABLE ONLY public.product_categories
  741. ADD CONSTRAINT product_categories_pk PRIMARY KEY (id);
  742. --
  743. -- TOC entry 4240 (class 2606 OID 16453)
  744. -- Name: products products_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  745. --
  746. ALTER TABLE ONLY public.products
  747. ADD CONSTRAINT products_pk PRIMARY KEY (id);
  748. --
  749. -- TOC entry 4242 (class 2606 OID 16455)
  750. -- Name: products products_unique; Type: CONSTRAINT; Schema: public; Owner: postgres
  751. --
  752. ALTER TABLE ONLY public.products
  753. ADD CONSTRAINT products_unique UNIQUE (article);
  754. --
  755. -- TOC entry 4224 (class 2606 OID 16414)
  756. -- Name: roles roles_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  757. --
  758. ALTER TABLE ONLY public.roles
  759. ADD CONSTRAINT roles_pk PRIMARY KEY (id);
  760. --
  761. -- TOC entry 4234 (class 2606 OID 16475)
  762. -- Name: suppliers suppliers_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  763. --
  764. ALTER TABLE ONLY public.suppliers
  765. ADD CONSTRAINT suppliers_pk PRIMARY KEY (id);
  766. --
  767. -- TOC entry 4226 (class 2606 OID 16405)
  768. -- Name: users users_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
  769. --
  770. ALTER TABLE ONLY public.users
  771. ADD CONSTRAINT users_pk PRIMARY KEY (id);
  772. --
  773. -- TOC entry 4228 (class 2606 OID 16407)
  774. -- Name: users users_unique; Type: CONSTRAINT; Schema: public; Owner: postgres
  775. --
  776. ALTER TABLE ONLY public.users
  777. ADD CONSTRAINT users_unique UNIQUE (login);
  778. --
  779. -- TOC entry 4260 (class 2606 OID 16547)
  780. -- Name: order_products order_products_order_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  781. --
  782. ALTER TABLE ONLY public.order_products
  783. ADD CONSTRAINT order_products_order_id_fkey FOREIGN KEY (order_id) REFERENCES public.orders(id);
  784. --
  785. -- TOC entry 4261 (class 2606 OID 16552)
  786. -- Name: order_products order_products_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  787. --
  788. ALTER TABLE ONLY public.order_products
  789. ADD CONSTRAINT order_products_product_id_fkey FOREIGN KEY (product_id) REFERENCES public.products(id);
  790. --
  791. -- TOC entry 4257 (class 2606 OID 16525)
  792. -- Name: orders orders_pick_up_point_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  793. --
  794. ALTER TABLE ONLY public.orders
  795. ADD CONSTRAINT orders_pick_up_point_id_fkey FOREIGN KEY (pick_up_point_id) REFERENCES public.pick_up_points(id);
  796. --
  797. -- TOC entry 4258 (class 2606 OID 16530)
  798. -- Name: orders orders_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  799. --
  800. ALTER TABLE ONLY public.orders
  801. ADD CONSTRAINT orders_status_id_fkey FOREIGN KEY (status_id) REFERENCES public.order_statuses(id);
  802. --
  803. -- TOC entry 4259 (class 2606 OID 16535)
  804. -- Name: orders orders_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  805. --
  806. ALTER TABLE ONLY public.orders
  807. ADD CONSTRAINT orders_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
  808. --
  809. -- TOC entry 4252 (class 2606 OID 16491)
  810. -- Name: products products_manufacture_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  811. --
  812. ALTER TABLE ONLY public.products
  813. ADD CONSTRAINT products_manufacture_id_fkey FOREIGN KEY (manufacture_id) REFERENCES public.manufacturies(id) NOT VALID;
  814. --
  815. -- TOC entry 4253 (class 2606 OID 16481)
  816. -- Name: products products_measure_unit_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  817. --
  818. ALTER TABLE ONLY public.products
  819. ADD CONSTRAINT products_measure_unit_id_fkey FOREIGN KEY (measure_unit_id) REFERENCES public.measure_units(id) NOT VALID;
  820. --
  821. -- TOC entry 4254 (class 2606 OID 16496)
  822. -- Name: products products_product_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  823. --
  824. ALTER TABLE ONLY public.products
  825. ADD CONSTRAINT products_product_category_id_fkey FOREIGN KEY (product_category_id) REFERENCES public.product_categories(id) NOT VALID;
  826. --
  827. -- TOC entry 4255 (class 2606 OID 16476)
  828. -- Name: products products_product_name_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  829. --
  830. ALTER TABLE ONLY public.products
  831. ADD CONSTRAINT products_product_name_id_fkey FOREIGN KEY (product_name_id) REFERENCES public.prdocut_names(id) NOT VALID;
  832. --
  833. -- TOC entry 4256 (class 2606 OID 16486)
  834. -- Name: products products_supplier_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  835. --
  836. ALTER TABLE ONLY public.products
  837. ADD CONSTRAINT products_supplier_id_fkey FOREIGN KEY (supplier_id) REFERENCES public.suppliers(id) NOT VALID;
  838. --
  839. -- TOC entry 4251 (class 2606 OID 16415)
  840. -- Name: users user_role_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  841. --
  842. ALTER TABLE ONLY public.users
  843. ADD CONSTRAINT user_role_fk FOREIGN KEY (role_id) REFERENCES public.roles(id) NOT VALID;
  844. -- Completed on 2026-04-20 18:02:05 MSK
  845. --
  846. -- PostgreSQL database dump complete
  847. --
  848. \unrestrict IepfNlcahchOJkqiArt6eq9reTwOgg5XT2eosSdEGejeCaicn6hfAoPRQV0Tz3t