/
ihtiandr9
/
httpserver
Обзор
Документация
Войти
/
ihtiandr9
/
httpserver
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
class-stylesheet
cpp/src/mycomps.sql
280 строк
6 KB
Sergey Ryabchenkov(freevm)
update database
08 фев 2026, 15:31
08 фев 2026, 15:31
ff4f8e6
Код
Авторство
О чём код?
-- -- PostgreSQL database dump -- -- Dumped from database version 15.15 (Debian 15.15-0+deb12u1) -- Dumped by pg_dump version 17.7 (Debian 17.7-0+deb13u1) -- Started on 2026-02-08 14:40:26 +08 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; SET default_tablespace = ''; SET default_table_access_method = heap; -- -- Name: comp_configs; Type: TABLE; Schema: public; Owner: user -- CREATE TABLE public.comp_configs ( compose_date date NOT NULL, mb_ram integer NOT NULL, cpu character varying(25), code integer NOT NULL ); ALTER TABLE public.comp_configs OWNER TO "user"; -- -- Name: comp_configs_code_seq; Type: SEQUENCE; Schema: public; Owner: user -- CREATE SEQUENCE public.comp_configs_code_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER SEQUENCE public.comp_configs_code_seq OWNER TO "user"; -- -- TOC entry 3379 (class 0 OID 0) -- Dependencies: 215 -- Name: comp_configs_code_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: user -- ALTER SEQUENCE public.comp_configs_code_seq OWNED BY public.comp_configs.code; -- -- TOC entry 216 (class 1259 OID 24581) -- Name: computers; Type: TABLE; Schema: public; Owner: user -- CREATE TABLE public.computers ( name character varying(255) DEFAULT 'no name'::character varying NOT NULL, config integer, code bigint NOT NULL ); ALTER TABLE public.computers OWNER TO "user"; -- -- TOC entry 217 (class 1259 OID 24585) -- Name: comps_sequence; Type: SEQUENCE; Schema: public; Owner: user -- CREATE SEQUENCE public.comps_sequence START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER SEQUENCE public.comps_sequence OWNER TO "user"; -- -- TOC entry 3380 (class 0 OID 0) -- Dependencies: 217 -- Name: comps_sequence; Type: SEQUENCE OWNED BY; Schema: public; Owner: user -- ALTER SEQUENCE public.comps_sequence OWNED BY public.computers.code; -- -- TOC entry 218 (class 1259 OID 24586) -- Name: cpus; Type: TABLE; Schema: public; Owner: user -- CREATE TABLE public.cpus ( code character varying(25) NOT NULL, threads integer DEFAULT 1 NOT NULL, cores integer DEFAULT 1 NOT NULL ); ALTER TABLE public.cpus OWNER TO "user"; -- -- TOC entry 219 (class 1259 OID 24591) -- Name: report; Type: VIEW; Schema: public; Owner: user -- CREATE VIEW public.report AS SELECT comp.code, comp.name, config.cpu, config.mb_ram, config.compose_date FROM (public.computers comp LEFT JOIN public.comp_configs config ON ((comp.config = config.code))) ORDER BY comp.code; ALTER VIEW public.report OWNER TO "user"; -- -- TOC entry 3210 (class 2604 OID 24595) -- Name: comp_configs code; Type: DEFAULT; Schema: public; Owner: user -- ALTER TABLE ONLY public.comp_configs ALTER COLUMN code SET DEFAULT nextval('public.comp_configs_code_seq'::regclass); -- -- TOC entry 3212 (class 2604 OID 24596) -- Name: computers code; Type: DEFAULT; Schema: public; Owner: user -- ALTER TABLE ONLY public.computers ALTER COLUMN code SET DEFAULT nextval('public.comps_sequence'::regclass); -- -- TOC entry 3369 (class 0 OID 24577) -- Dependencies: 214 -- Data for Name: comp_configs; Type: TABLE DATA; Schema: public; Owner: user -- COPY public.comp_configs (compose_date, mb_ram, cpu, code) FROM stdin; 2024-06-27 16536 i7-2630QM 2 2023-01-27 768 Processor for Stretch 1 2025-06-06 16536 Processor for FreeVM 4 \. -- -- TOC entry 3371 (class 0 OID 24581) -- Dependencies: 216 -- Data for Name: computers; Type: TABLE DATA; Schema: public; Owner: user -- COPY public.computers (name, config, code) FROM stdin; Stretch 1 1 Asus Note 2 3 freevm 4 2 \. -- -- TOC entry 3373 (class 0 OID 24586) -- Dependencies: 218 -- Data for Name: cpus; Type: TABLE DATA; Schema: public; Owner: user -- COPY public.cpus (code, threads, cores) FROM stdin; i7-2630QM 8 4 processor for freevm 1 1 not defined 0 0 Processor for Stretch 1 1 Processor for FreeVM 1 1 \. -- -- TOC entry 3381 (class 0 OID 0) -- Dependencies: 215 -- Name: comp_configs_code_seq; Type: SEQUENCE SET; Schema: public; Owner: user -- SELECT pg_catalog.setval('public.comp_configs_code_seq', 4, true); -- -- TOC entry 3382 (class 0 OID 0) -- Dependencies: 217 -- Name: comps_sequence; Type: SEQUENCE SET; Schema: public; Owner: user -- SELECT pg_catalog.setval('public.comps_sequence', 2, true); -- -- TOC entry 3219 (class 2606 OID 24598) -- Name: computers code_pk; Type: CONSTRAINT; Schema: public; Owner: user -- ALTER TABLE ONLY public.computers ADD CONSTRAINT code_pk PRIMARY KEY (code); -- -- TOC entry 3216 (class 2606 OID 24600) -- Name: comp_configs config_pkey; Type: CONSTRAINT; Schema: public; Owner: user -- ALTER TABLE ONLY public.comp_configs ADD CONSTRAINT config_pkey PRIMARY KEY (code); -- -- TOC entry 3223 (class 2606 OID 24602) -- Name: cpus pk_code; Type: CONSTRAINT; Schema: public; Owner: user -- ALTER TABLE ONLY public.cpus ADD CONSTRAINT pk_code PRIMARY KEY (code); -- -- TOC entry 3220 (class 1259 OID 24603) -- Name: comp_name_idx; Type: INDEX; Schema: public; Owner: user -- CREATE INDEX comp_name_idx ON public.computers USING btree (name); -- -- TOC entry 3217 (class 1259 OID 24604) -- Name: cpu_code_fkey; Type: INDEX; Schema: public; Owner: user -- CREATE INDEX cpu_code_fkey ON public.comp_configs USING btree (cpu); -- -- TOC entry 3221 (class 1259 OID 24605) -- Name: fki_config_fk; Type: INDEX; Schema: public; Owner: user -- CREATE INDEX fki_config_fk ON public.computers USING btree (config); -- -- TOC entry 3225 (class 2606 OID 24606) -- Name: computers config_fk; Type: FK CONSTRAINT; Schema: public; Owner: user -- ALTER TABLE ONLY public.computers ADD CONSTRAINT config_fk FOREIGN KEY (config) REFERENCES public.comp_configs(code); -- -- TOC entry 3224 (class 2606 OID 24611) -- Name: comp_configs cpu_code; Type: FK CONSTRAINT; Schema: public; Owner: user -- ALTER TABLE ONLY public.comp_configs ADD CONSTRAINT cpu_code FOREIGN KEY (cpu) REFERENCES public.cpus(code); -- Completed on 2026-02-08 14:40:26 +08 -- -- PostgreSQL database dump complete --