Additional fixes

This commit is contained in:
Andrew 2023-03-26 16:58:57 +07:00
parent 8680f03b91
commit 8fabf37c9c
2 changed files with 449 additions and 4 deletions

411
dump-w12-202205161240.sql Normal file
View file

@ -0,0 +1,411 @@
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.2 (Debian 13.2-1.pgdg100+1)
-- Dumped by pg_dump version 13.3
-- Started on 2022-05-16 12:40:56
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;
--
-- TOC entry 3 (class 2615 OID 2200)
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--
CREATE SCHEMA public;
ALTER SCHEMA public OWNER TO postgres;
--
-- TOC entry 2985 (class 0 OID 0)
-- Dependencies: 3
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON SCHEMA public IS 'standard public schema';
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 207 (class 1259 OID 65577)
-- Name: images; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.images (
id integer NOT NULL,
filename character varying(255) NOT NULL,
user_id integer NOT NULL,
published boolean DEFAULT false,
description character varying(255) DEFAULT ''::character varying NOT NULL,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.images OWNER TO postgres;
--
-- TOC entry 205 (class 1259 OID 65573)
-- Name: images_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.images_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.images_id_seq OWNER TO postgres;
--
-- TOC entry 2986 (class 0 OID 0)
-- Dependencies: 205
-- Name: images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.images_id_seq OWNED BY public.images.id;
--
-- TOC entry 206 (class 1259 OID 65575)
-- Name: images_user_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.images_user_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.images_user_id_seq OWNER TO postgres;
--
-- TOC entry 2987 (class 0 OID 0)
-- Dependencies: 206
-- Name: images_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.images_user_id_seq OWNED BY public.images.user_id;
--
-- TOC entry 204 (class 1259 OID 65557)
-- Name: menu; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.menu (
id integer NOT NULL,
user_id integer NOT NULL,
data character varying DEFAULT '[]'::character varying
);
ALTER TABLE public.menu OWNER TO postgres;
--
-- TOC entry 202 (class 1259 OID 65553)
-- Name: menu_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.menu_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.menu_id_seq OWNER TO postgres;
--
-- TOC entry 2988 (class 0 OID 0)
-- Dependencies: 202
-- Name: menu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.menu_id_seq OWNED BY public.menu.id;
--
-- TOC entry 203 (class 1259 OID 65555)
-- Name: menu_user_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.menu_user_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.menu_user_id_seq OWNER TO postgres;
--
-- TOC entry 2989 (class 0 OID 0)
-- Dependencies: 203
-- Name: menu_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.menu_user_id_seq OWNED BY public.menu.user_id;
--
-- TOC entry 201 (class 1259 OID 65539)
-- Name: users; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.users (
id integer NOT NULL,
login character varying(255) NOT NULL,
password character varying(255) NOT NULL,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.users OWNER TO postgres;
--
-- TOC entry 200 (class 1259 OID 65537)
-- 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 TABLE public.users_id_seq OWNER TO postgres;
--
-- TOC entry 2990 (class 0 OID 0)
-- Dependencies: 200
-- 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 2827 (class 2604 OID 65580)
-- Name: images id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.images ALTER COLUMN id SET DEFAULT nextval('public.images_id_seq'::regclass);
--
-- TOC entry 2828 (class 2604 OID 65581)
-- Name: images user_id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.images ALTER COLUMN user_id SET DEFAULT nextval('public.images_user_id_seq'::regclass);
--
-- TOC entry 2824 (class 2604 OID 65560)
-- Name: menu id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.menu ALTER COLUMN id SET DEFAULT nextval('public.menu_id_seq'::regclass);
--
-- TOC entry 2825 (class 2604 OID 65561)
-- Name: menu user_id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.menu ALTER COLUMN user_id SET DEFAULT nextval('public.menu_user_id_seq'::regclass);
--
-- TOC entry 2822 (class 2604 OID 65542)
-- 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 2979 (class 0 OID 65577)
-- Dependencies: 207
-- Data for Name: images; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.images (id, filename, user_id, published, description, created_at) FROM stdin;
6 nuark_1652044993.jpg 19 t mgnh 2022-05-08 21:23:15.119316
7 nuark_1652045151.jpg 19 t gdfhfgh 2022-05-08 21:25:52.4471
8 nuark_1652639104.jpg 19 t wanted as Vaas 2022-05-15 18:25:04.598911
10 qwe_1652678225.jpg 48 t cat 2022-05-16 05:17:05.220491
\.
--
-- TOC entry 2976 (class 0 OID 65557)
-- Dependencies: 204
-- Data for Name: menu; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.menu (id, user_id, data) FROM stdin;
1 18 [{"url":"https:\\/\\/blog.nuark.xyz","name":"BNZ"}]
3 20 []
4 21 []
2 19 [{"url":"\\/","name":"\\u0433\\u043b\\u0430\\u0432\\u043d\\u0430\\u044f \\u0441\\u0442\\u0440\\u0430\\u043d\\u0438\\u0446\\u0430"}]
8 43 []
9 45 []
10 46 []
11 48 [{"url":"http:\\/\\/ya.ru","name":"yandex"}]
12 57 []
\.
--
-- TOC entry 2973 (class 0 OID 65539)
-- Dependencies: 201
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.users (id, login, password, created_at) FROM stdin;
18 admin admin 2022-05-08 17:21:07.794589
20 elena 123 2022-05-08 19:11:02.546991
21 test1 test 2022-05-08 19:11:09.72005
43 zxc cxz 2022-05-08 22:06:23.854415
45 ccc zzz 2022-05-08 22:06:23.877094
46 zzz 2fc48dea5c998bc2 2022-05-08 22:06:23.88868
19 nuark 8c536da62c2933d6 2022-05-08 19:10:55.25135
48 qwe 4e8364106aeb7960 2022-05-16 05:13:58.154593
57 bnm 123 2022-05-16 05:19:17.605845
\.
--
-- TOC entry 2991 (class 0 OID 0)
-- Dependencies: 205
-- Name: images_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.images_id_seq', 10, true);
--
-- TOC entry 2992 (class 0 OID 0)
-- Dependencies: 206
-- Name: images_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.images_user_id_seq', 1, false);
--
-- TOC entry 2993 (class 0 OID 0)
-- Dependencies: 202
-- Name: menu_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.menu_id_seq', 12, true);
--
-- TOC entry 2994 (class 0 OID 0)
-- Dependencies: 203
-- Name: menu_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.menu_user_id_seq', 1, false);
--
-- TOC entry 2995 (class 0 OID 0)
-- Dependencies: 200
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.users_id_seq', 57, true);
--
-- TOC entry 2839 (class 2606 OID 65583)
-- Name: images images_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.images
ADD CONSTRAINT images_pk PRIMARY KEY (id);
--
-- TOC entry 2837 (class 2606 OID 65567)
-- Name: menu menu_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.menu
ADD CONSTRAINT menu_pk PRIMARY KEY (id);
--
-- TOC entry 2833 (class 2606 OID 65548)
-- Name: users users_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pk PRIMARY KEY (id);
--
-- TOC entry 2835 (class 2606 OID 65552)
-- Name: users users_un; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_un UNIQUE (login);
--
-- TOC entry 2841 (class 2606 OID 65584)
-- Name: images images_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.images
ADD CONSTRAINT images_fk FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- TOC entry 2840 (class 2606 OID 65568)
-- Name: menu menu_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.menu
ADD CONSTRAINT menu_fk FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE CASCADE;
-- Completed on 2022-05-16 12:40:56
--
-- PostgreSQL database dump complete
--

42
w7/pnpm-lock.yaml generated
View file

@ -1,4 +1,4 @@
lockfileVersion: 5.3 lockfileVersion: 5.4
specifiers: specifiers:
body-parser: ^1.19.2 body-parser: ^1.19.2
@ -47,9 +47,20 @@ packages:
resolution: {integrity: sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==} resolution: {integrity: sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==}
dev: false dev: false
/@types/keyv/3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
'@types/node': 17.0.21
dev: true
/@types/node/17.0.21: /@types/node/17.0.21:
resolution: {integrity: sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==} resolution: {integrity: sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==}
dev: false
/@types/responselike/1.0.0:
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
dependencies:
'@types/node': 17.0.21
dev: true
/abbrev/1.1.1: /abbrev/1.1.1:
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
@ -121,6 +132,8 @@ packages:
qs: 6.9.7 qs: 6.9.7
raw-body: 2.4.3 raw-body: 2.4.3
type-is: 1.6.18 type-is: 1.6.18
transitivePeerDependencies:
- supports-color
dev: false dev: false
/boxen/5.1.2: /boxen/5.1.2:
@ -279,14 +292,25 @@ packages:
/debug/2.6.9: /debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies: dependencies:
ms: 2.0.0 ms: 2.0.0
dev: false dev: false
/debug/3.2.7: /debug/3.2.7_supports-color@5.5.0:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies: dependencies:
ms: 2.1.3 ms: 2.1.3
supports-color: 5.5.0
dev: true dev: true
/debug/4.3.3: /debug/4.3.3:
@ -431,6 +455,8 @@ packages:
type-is: 1.6.18 type-is: 1.6.18
utils-merge: 1.0.1 utils-merge: 1.0.1
vary: 1.1.2 vary: 1.1.2
transitivePeerDependencies:
- supports-color
dev: false dev: false
/fill-range/7.0.1: /fill-range/7.0.1:
@ -451,6 +477,8 @@ packages:
parseurl: 1.3.3 parseurl: 1.3.3
statuses: 1.5.0 statuses: 1.5.0
unpipe: 1.0.0 unpipe: 1.0.0
transitivePeerDependencies:
- supports-color
dev: false dev: false
/forwarded/0.2.0: /forwarded/0.2.0:
@ -505,6 +533,8 @@ packages:
dependencies: dependencies:
'@sindresorhus/is': 0.14.0 '@sindresorhus/is': 0.14.0
'@szmarczak/http-timer': 1.1.2 '@szmarczak/http-timer': 1.1.2
'@types/keyv': 3.1.4
'@types/responselike': 1.0.0
cacheable-request: 6.1.0 cacheable-request: 6.1.0
decompress-response: 3.3.0 decompress-response: 3.3.0
duplexer3: 0.1.4 duplexer3: 0.1.4
@ -772,7 +802,7 @@ packages:
requiresBuild: true requiresBuild: true
dependencies: dependencies:
chokidar: 3.5.3 chokidar: 3.5.3
debug: 3.2.7 debug: 3.2.7_supports-color@5.5.0
ignore-by-default: 1.0.1 ignore-by-default: 1.0.1
minimatch: 3.1.2 minimatch: 3.1.2
pstree.remy: 1.1.8 pstree.remy: 1.1.8
@ -985,6 +1015,8 @@ packages:
on-finished: 2.3.0 on-finished: 2.3.0
range-parser: 1.2.1 range-parser: 1.2.1
statuses: 1.5.0 statuses: 1.5.0
transitivePeerDependencies:
- supports-color
dev: false dev: false
/serve-static/1.14.2: /serve-static/1.14.2:
@ -995,6 +1027,8 @@ packages:
escape-html: 1.0.3 escape-html: 1.0.3
parseurl: 1.3.3 parseurl: 1.3.3
send: 0.17.2 send: 0.17.2
transitivePeerDependencies:
- supports-color
dev: false dev: false
/setprototypeof/1.2.0: /setprototypeof/1.2.0: