Browse Source

add local db

danila.staroverov 2 years ago
parent
commit
6f75aa173d
2 changed files with 351 additions and 0 deletions
  1. 269 0
      sharix_open_local_schema.sql
  2. 82 0
      sharix_open_local_testdata.sql

+ 269 - 0
sharix_open_local_schema.sql

@@ -0,0 +1,269 @@
+--
+-- PostgreSQL database dump
+--
+
+-- Dumped from database version 12.7
+-- Dumped by pg_dump version 12.7
+
+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: current_cars; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE public.current_cars (
+    id integer NOT NULL,
+    resource_id integer NOT NULL,
+    user_id integer NOT NULL,
+    order_status character(1),
+    order_id character(1),
+    current_token name NOT NULL,
+    doors_output character(1) NOT NULL,
+    engine_input character(1) NOT NULL,
+    central_lock_input character(1) NOT NULL,
+    ignition_input character(1) NOT NULL,
+    doors_input character(1) NOT NULL,
+    input4 name,
+    controller_status character(1) NOT NULL,
+    signal_gsm integer NOT NULL,
+    operator_gsm name NOT NULL,
+    signal_gps integer NOT NULL,
+    location character varying(30),
+    speed real NOT NULL,
+    direction character(1) NOT NULL,
+    address name NOT NULL,
+    battery_level integer NOT NULL,
+    board_voltage real NOT NULL
+);
+
+
+ALTER TABLE public.current_cars OWNER TO postgres;
+
+--
+-- Name: current_cars_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+--
+
+CREATE SEQUENCE public.current_cars_id_seq
+    AS integer
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.current_cars_id_seq OWNER TO postgres;
+
+--
+-- Name: current_cars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
+--
+
+ALTER SEQUENCE public.current_cars_id_seq OWNED BY public.current_cars.id;
+
+
+--
+-- Name: current_timetable; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE public.current_timetable (
+    id integer NOT NULL,
+    order_id integer NOT NULL,
+    service_type_id integer NOT NULL,
+    provider_id integer,
+    resource_id integer NOT NULL,
+    time_start_predicted timestamp with time zone,
+    time_finished_predicted timestamp with time zone,
+    gap integer
+);
+
+
+ALTER TABLE public.current_timetable OWNER TO postgres;
+
+--
+-- Name: current_timetable_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+--
+
+CREATE SEQUENCE public.current_timetable_id_seq
+    AS integer
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.current_timetable_id_seq OWNER TO postgres;
+
+--
+-- Name: current_timetable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
+--
+
+ALTER SEQUENCE public.current_timetable_id_seq OWNED BY public.current_timetable.id;
+
+
+--
+-- Name: order_list_log; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE public.order_list_log (
+    id integer NOT NULL,
+    payment_transaction_id integer NOT NULL,
+    service_id integer NOT NULL,
+    service_type_id integer NOT NULL,
+    time_placed timestamp with time zone NOT NULL,
+    time_start timestamp with time zone NOT NULL,
+    time_finish_predicted timestamp with time zone,
+    time_finish_real timestamp with time zone NOT NULL,
+    order_place_start character varying(255) NOT NULL,
+    order_place_predicted character varying(255) NOT NULL,
+    order_place_real character varying(255) NOT NULL,
+    price money NOT NULL,
+    provider integer NOT NULL,
+    receiver integer NOT NULL,
+    client integer NOT NULL
+);
+
+
+ALTER TABLE public.order_list_log OWNER TO postgres;
+
+--
+-- Name: order_list_log_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+--
+
+CREATE SEQUENCE public.order_list_log_id_seq
+    AS integer
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.order_list_log_id_seq OWNER TO postgres;
+
+--
+-- Name: order_list_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
+--
+
+ALTER SEQUENCE public.order_list_log_id_seq OWNED BY public.order_list_log.id;
+
+
+--
+-- Name: tickets; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE public.tickets (
+    id integer NOT NULL,
+    type character(1) NOT NULL,
+    id_reporter integer NOT NULL,
+    id_asignee integer,
+    time_created timestamp with time zone NOT NULL,
+    time_assigned timestamp with time zone,
+    time_changed timestamp with time zone,
+    time_closed timestamp with time zone,
+    status character(1) NOT NULL,
+    description text
+);
+
+
+ALTER TABLE public.tickets OWNER TO postgres;
+
+--
+-- Name: tickets_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+--
+
+CREATE SEQUENCE public.tickets_id_seq
+    AS integer
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.tickets_id_seq OWNER TO postgres;
+
+--
+-- Name: tickets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
+--
+
+ALTER SEQUENCE public.tickets_id_seq OWNED BY public.tickets.id;
+
+
+--
+-- Name: current_cars id; Type: DEFAULT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.current_cars ALTER COLUMN id SET DEFAULT nextval('public.current_cars_id_seq'::regclass);
+
+
+--
+-- Name: current_timetable id; Type: DEFAULT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.current_timetable ALTER COLUMN id SET DEFAULT nextval('public.current_timetable_id_seq'::regclass);
+
+
+--
+-- Name: order_list_log id; Type: DEFAULT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.order_list_log ALTER COLUMN id SET DEFAULT nextval('public.order_list_log_id_seq'::regclass);
+
+
+--
+-- Name: tickets id; Type: DEFAULT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.tickets ALTER COLUMN id SET DEFAULT nextval('public.tickets_id_seq'::regclass);
+
+
+--
+-- Name: current_cars current_cars_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.current_cars
+    ADD CONSTRAINT current_cars_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: current_timetable current_timetable_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.current_timetable
+    ADD CONSTRAINT current_timetable_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: order_list_log order_list_log_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.order_list_log
+    ADD CONSTRAINT order_list_log_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: tickets tickets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY public.tickets
+    ADD CONSTRAINT tickets_pkey PRIMARY KEY (id);
+
+
+--
+-- PostgreSQL database dump complete
+--
+

+ 82 - 0
sharix_open_local_testdata.sql

@@ -0,0 +1,82 @@
+--
+-- PostgreSQL database dump
+--
+
+-- Dumped from database version 12.7
+-- Dumped by pg_dump version 12.7
+
+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;
+
+--
+-- Data for Name: current_cars; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+COPY public.current_cars (id, resource_id, user_id, order_status, order_id, current_token, doors_output, engine_input, central_lock_input, ignition_input, doors_input, input4, controller_status, signal_gsm, operator_gsm, signal_gps, location, speed, direction, address, battery_level, board_voltage) FROM stdin;
+\.
+
+
+--
+-- Data for Name: current_timetable; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+COPY public.current_timetable (id, order_id, service_type_id, provider_id, resource_id, time_start_predicted, time_finished_predicted, gap) FROM stdin;
+\.
+
+
+--
+-- Data for Name: order_list_log; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+COPY public.order_list_log (id, payment_transaction_id, service_id, service_type_id, time_placed, time_start, time_finish_predicted, time_finish_real, order_place_start, order_place_predicted, order_place_real, price, provider, receiver, client) FROM stdin;
+\.
+
+
+--
+-- Data for Name: tickets; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+COPY public.tickets (id, type, id_reporter, id_asignee, time_created, time_assigned, time_changed, time_closed, status, description) FROM stdin;
+\.
+
+
+--
+-- Name: current_cars_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
+--
+
+SELECT pg_catalog.setval('public.current_cars_id_seq', 1, false);
+
+
+--
+-- Name: current_timetable_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
+--
+
+SELECT pg_catalog.setval('public.current_timetable_id_seq', 1, false);
+
+
+--
+-- Name: order_list_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
+--
+
+SELECT pg_catalog.setval('public.order_list_log_id_seq', 1, false);
+
+
+--
+-- Name: tickets_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
+--
+
+SELECT pg_catalog.setval('public.tickets_id_seq', 1, false);
+
+
+--
+-- PostgreSQL database dump complete
+--
+