|
@@ -20,6 +20,43 @@ SET default_tablespace = '';
|
|
|
|
|
|
SET default_table_access_method = heap;
|
|
|
|
|
|
+--
|
|
|
+-- Name: cars_log; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE public.cars_log (
|
|
|
+ id integer NOT NULL,
|
|
|
+ resource_id integer NOT NULL,
|
|
|
+ time_log_created timestamp with time zone NOT NULL,
|
|
|
+ operation character(1) NOT NULL,
|
|
|
+ user_id integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.cars_log OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: cars_log_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.cars_log_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.cars_log_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: cars_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.cars_log_id_seq OWNED BY public.cars_log.id;
|
|
|
+
|
|
|
+
|
|
|
--
|
|
|
-- Name: client; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
@@ -86,6 +123,60 @@ CREATE TABLE public.company (
|
|
|
|
|
|
ALTER TABLE public.company OWNER TO postgres;
|
|
|
|
|
|
+--
|
|
|
+-- 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 numeric(3,1) 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_orders; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
@@ -630,6 +721,13 @@ CREATE TABLE public.users (
|
|
|
|
|
|
ALTER TABLE public.users OWNER TO drive;
|
|
|
|
|
|
+--
|
|
|
+-- Name: cars_log id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.cars_log ALTER COLUMN id SET DEFAULT nextval('public.cars_log_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
--
|
|
|
-- Name: client id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
@@ -637,6 +735,13 @@ ALTER TABLE public.users OWNER TO drive;
|
|
|
ALTER TABLE ONLY public.client ALTER COLUMN id SET DEFAULT nextval('public.client_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
+--
|
|
|
+-- 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_orders id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
@@ -721,6 +826,14 @@ ALTER TABLE ONLY public.servicetype ALTER COLUMN id SET DEFAULT nextval('public.
|
|
|
ALTER TABLE ONLY public.tickets ALTER COLUMN id SET DEFAULT nextval('public.tickets_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
+--
|
|
|
+-- Name: cars_log cars_log_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.cars_log
|
|
|
+ ADD CONSTRAINT cars_log_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
--
|
|
|
-- Name: client client_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
@@ -737,6 +850,14 @@ ALTER TABLE ONLY public.company
|
|
|
ADD CONSTRAINT company_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
+--
|
|
|
+-- 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_orders current_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|