|
@@ -21,25 +21,25 @@ SET default_tablespace = '';
|
|
|
SET default_table_access_method = heap;
|
|
|
|
|
|
--
|
|
|
--- Name: client; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: client; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.client (
|
|
|
id integer NOT NULL,
|
|
|
- userid integer,
|
|
|
- requirements name,
|
|
|
- status character(1),
|
|
|
+ user_id integer NOT NULL,
|
|
|
+ requirements name NOT NULL,
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
ticket_status integer,
|
|
|
- id_metaservice integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1)
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.client OWNER TO sharix;
|
|
|
+ALTER TABLE public.client OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: client_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: client_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.client_id_seq
|
|
@@ -51,92 +51,70 @@ CREATE SEQUENCE public.client_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.client_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.client_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: client_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: client_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.client_id_seq OWNED BY public.client.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: company; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: company; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.company (
|
|
|
- id integer NOT NULL,
|
|
|
- legalname character varying(255),
|
|
|
- representative integer,
|
|
|
- inn integer,
|
|
|
- kpp integer,
|
|
|
- ogrn integer,
|
|
|
- bank_name integer,
|
|
|
- bik integer,
|
|
|
- ks integer,
|
|
|
- rs integer,
|
|
|
- address integer,
|
|
|
- requirements name,
|
|
|
- status character(1),
|
|
|
- ticket_status integer,
|
|
|
+ id character varying(10) NOT NULL,
|
|
|
+ legal_name character varying(255) NOT NULL,
|
|
|
+ provider_id integer NOT NULL,
|
|
|
+ kpp character varying(9) NOT NULL,
|
|
|
+ ogrn character varying(13) NOT NULL,
|
|
|
+ bank_name character varying(255) NOT NULL,
|
|
|
+ bik character varying(9) NOT NULL,
|
|
|
+ ks integer NOT NULL,
|
|
|
+ rs integer NOT NULL,
|
|
|
+ address character varying(255) NOT NULL,
|
|
|
id_metaservice integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1)
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
+ requirements name,
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
+ ticket_status integer
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.company OWNER TO sharix;
|
|
|
-
|
|
|
---
|
|
|
--- Name: company_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
---
|
|
|
-
|
|
|
-CREATE SEQUENCE public.company_id_seq
|
|
|
- AS integer
|
|
|
- START WITH 1
|
|
|
- INCREMENT BY 1
|
|
|
- NO MINVALUE
|
|
|
- NO MAXVALUE
|
|
|
- CACHE 1;
|
|
|
-
|
|
|
-
|
|
|
-ALTER TABLE public.company_id_seq OWNER TO sharix;
|
|
|
-
|
|
|
---
|
|
|
--- Name: company_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
---
|
|
|
-
|
|
|
-ALTER SEQUENCE public.company_id_seq OWNED BY public.company.id;
|
|
|
-
|
|
|
+ALTER TABLE public.company OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: current_orders; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: current_orders; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.current_orders (
|
|
|
id integer NOT NULL,
|
|
|
- service_id integer,
|
|
|
- service_type_id integer,
|
|
|
- state integer,
|
|
|
- id_metaservice integer,
|
|
|
- time_placed timestamp with time zone,
|
|
|
- time_start timestamp with time zone,
|
|
|
- time_finish_predicted timestamp with time zone,
|
|
|
- time_finish_real timestamp with time zone,
|
|
|
- provider integer,
|
|
|
- receiver integer,
|
|
|
- client integer,
|
|
|
- predicted_price integer,
|
|
|
- real_price integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1)
|
|
|
+ service_id integer NOT NULL,
|
|
|
+ service_type_id integer NOT NULL,
|
|
|
+ state integer NOT NULL,
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ time_created timestamp with time zone 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 NOT NULL,
|
|
|
+ time_finish_real timestamp with time zone NOT NULL,
|
|
|
+ provider_id integer NOT NULL,
|
|
|
+ receiver_id integer NOT NULL,
|
|
|
+ client_id integer NOT NULL,
|
|
|
+ predicted_price numeric(10,2) NOT NULL,
|
|
|
+ real_price numeric(10,2) NOT NULL,
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.current_orders OWNER TO sharix;
|
|
|
+ALTER TABLE public.current_orders OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: current_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: current_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.current_orders_id_seq
|
|
@@ -148,24 +126,24 @@ CREATE SEQUENCE public.current_orders_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.current_orders_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.current_orders_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: current_orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: current_orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.current_orders_id_seq OWNED BY public.current_orders.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: current_timetable; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: current_timetable; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.current_timetable (
|
|
|
id integer NOT NULL,
|
|
|
- order_id integer,
|
|
|
- service_type_id integer,
|
|
|
- provider_id integer,
|
|
|
+ order_id integer NOT NULL,
|
|
|
+ service_type_id integer NOT NULL,
|
|
|
+ provider_id integer NOT NULL,
|
|
|
resource_id integer,
|
|
|
time_start_predicted timestamp with time zone,
|
|
|
time_finished_predicted timestamp with time zone,
|
|
@@ -173,10 +151,10 @@ CREATE TABLE public.current_timetable (
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.current_timetable OWNER TO sharix;
|
|
|
+ALTER TABLE public.current_timetable OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: current_timetable_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: current_timetable_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.current_timetable_id_seq
|
|
@@ -188,40 +166,41 @@ CREATE SEQUENCE public.current_timetable_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.current_timetable_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.current_timetable_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: current_timetable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- 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: documents; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: documents; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.documents (
|
|
|
id integer NOT NULL,
|
|
|
- id_metaservice integer,
|
|
|
- doctype character varying(2),
|
|
|
- datalink character varying(255),
|
|
|
- userid integer,
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ doctype character varying(2) NOT NULL,
|
|
|
+ expire_date date NOT NULL,
|
|
|
+ datalink name,
|
|
|
+ user_id integer NOT NULL,
|
|
|
company_id integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1),
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
check_level character(1),
|
|
|
- checked_by integer,
|
|
|
+ check_by integer,
|
|
|
check_date timestamp with time zone,
|
|
|
status character(1),
|
|
|
ticket_status integer
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.documents OWNER TO sharix;
|
|
|
+ALTER TABLE public.documents OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: documents_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: documents_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.documents_id_seq
|
|
@@ -233,10 +212,10 @@ CREATE SEQUENCE public.documents_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.documents_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.documents_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: documents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: documents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.documents_id_seq OWNED BY public.documents.id;
|
|
@@ -289,48 +268,77 @@ ALTER SEQUENCE public.order_list_log_id_seq OWNED BY public.order_list_log.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: orders; Type: TABLE; Schema: public; Owner: drive
|
|
|
+-- Name: orders; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.orders (
|
|
|
- id integer DEFAULT 0 NOT NULL,
|
|
|
- car text,
|
|
|
- model text,
|
|
|
- color text,
|
|
|
- rate text,
|
|
|
- customer text,
|
|
|
- organization text,
|
|
|
- start integer,
|
|
|
- final integer,
|
|
|
- adress text
|
|
|
+ id integer NOT NULL,
|
|
|
+ service_id integer NOT NULL,
|
|
|
+ service_type_id integer NOT NULL,
|
|
|
+ state integer NOT NULL,
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ time_created timestamp with time zone 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 NOT NULL,
|
|
|
+ time_finish_real timestamp with time zone NOT NULL,
|
|
|
+ provider_id integer NOT NULL,
|
|
|
+ receiver_id integer NOT NULL,
|
|
|
+ client_id integer NOT NULL,
|
|
|
+ predicted_price numeric(10,2) NOT NULL,
|
|
|
+ real_price numeric(10,2) NOT NULL,
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.orders OWNER TO drive;
|
|
|
+ALTER TABLE public.orders OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: permissions; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: orders_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.orders_id_seq
|
|
|
+ AS integer
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.orders_id_seq OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER SEQUENCE public.orders_id_seq OWNED BY public.orders.id;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: permissions; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.permissions (
|
|
|
id integer NOT NULL,
|
|
|
- id_metaservice integer,
|
|
|
- id_permission name,
|
|
|
- user_id integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1),
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ id_permission integer NOT NULL,
|
|
|
+ user_id integer NOT NULL,
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
check_level character(1),
|
|
|
- checked_by integer,
|
|
|
- check_date timestamp with time zone,
|
|
|
+ check_by integer,
|
|
|
+ check_date timestamp with time zone NOT NULL,
|
|
|
status character(1),
|
|
|
ticket_status integer
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.permissions OWNER TO sharix;
|
|
|
+ALTER TABLE public.permissions OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.permissions_id_seq
|
|
@@ -342,39 +350,39 @@ CREATE SEQUENCE public.permissions_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.permissions_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.permissions_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.permissions_id_seq OWNED BY public.permissions.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: provider; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: provider; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.provider (
|
|
|
id integer NOT NULL,
|
|
|
- type integer,
|
|
|
- company integer,
|
|
|
- userid integer,
|
|
|
- id_metaservice integer,
|
|
|
- requirements name,
|
|
|
- status character(1),
|
|
|
+ type integer NOT NULL,
|
|
|
+ id_company integer NOT NULL,
|
|
|
+ user_id integer NOT NULL,
|
|
|
+ requirements name NOT NULL,
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
ticket_status integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1),
|
|
|
- location_type name,
|
|
|
- default_location name
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
+ location_type name NOT NULL,
|
|
|
+ default_location name NOT NULL
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.provider OWNER TO sharix;
|
|
|
+ALTER TABLE public.provider OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: provider_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: provider_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.provider_id_seq
|
|
@@ -386,17 +394,17 @@ CREATE SEQUENCE public.provider_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.provider_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.provider_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: provider_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: provider_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.provider_id_seq OWNED BY public.provider.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: relationship; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: relationship; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.relationship (
|
|
@@ -405,18 +413,18 @@ CREATE TABLE public.relationship (
|
|
|
user_id_whom integer,
|
|
|
neg_type character(1),
|
|
|
id_metaservice integer,
|
|
|
- is_visible character(1),
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
requirements name,
|
|
|
- status integer,
|
|
|
- ticket_status integer,
|
|
|
- is_global character(1)
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
+ ticket_status integer
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.relationship OWNER TO sharix;
|
|
|
+ALTER TABLE public.relationship OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: relationship_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: relationship_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.relationship_id_seq
|
|
@@ -428,39 +436,39 @@ CREATE SEQUENCE public.relationship_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.relationship_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.relationship_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: relationship_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: relationship_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.relationship_id_seq OWNED BY public.relationship.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: resources; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: resource; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
-CREATE TABLE public.resources (
|
|
|
+CREATE TABLE public.resource (
|
|
|
id integer NOT NULL,
|
|
|
- type_id integer,
|
|
|
- user_id integer,
|
|
|
- requirements name,
|
|
|
- status character(1),
|
|
|
+ type_id integer NOT NULL,
|
|
|
+ user_id integer NOT NULL,
|
|
|
+ requirements name NOT NULL,
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
ticket_status integer,
|
|
|
- id_metaservice integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1)
|
|
|
+ id_metaservice integer NOT NULL,
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.resources OWNER TO sharix;
|
|
|
+ALTER TABLE public.resource OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: resources_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: resource_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
-CREATE SEQUENCE public.resources_id_seq
|
|
|
+CREATE SEQUENCE public.resource_id_seq
|
|
|
AS integer
|
|
|
START WITH 1
|
|
|
INCREMENT BY 1
|
|
@@ -469,42 +477,41 @@ CREATE SEQUENCE public.resources_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.resources_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.resource_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: resources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: resource_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
-ALTER SEQUENCE public.resources_id_seq OWNED BY public.resources.id;
|
|
|
+ALTER SEQUENCE public.resource_id_seq OWNED BY public.resource.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: service; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: service; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.service (
|
|
|
id integer NOT NULL,
|
|
|
- servicetype_id integer,
|
|
|
- id_provider integer,
|
|
|
- resource_id integer,
|
|
|
- requirements name,
|
|
|
+ servicetype_id integer NOT NULL,
|
|
|
+ id_provider integer NOT NULL,
|
|
|
+ resourse_id integer NOT NULL,
|
|
|
+ price_alg character varying(255) NOT NULL,
|
|
|
+ price_km integer NOT NULL,
|
|
|
+ price_min integer NOT NULL,
|
|
|
+ price_amount integer NOT NULL,
|
|
|
id_metaservice integer,
|
|
|
- price_alg character(1),
|
|
|
- price_km integer,
|
|
|
- price_min integer,
|
|
|
- price_amount integer,
|
|
|
- service_status character(1),
|
|
|
- status character(1),
|
|
|
- ticket_status integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1)
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
+ requirements name,
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
+ ticket_status integer
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.service OWNER TO sharix;
|
|
|
+ALTER TABLE public.service OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: service_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: service_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.service_id_seq
|
|
@@ -516,38 +523,37 @@ CREATE SEQUENCE public.service_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.service_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.service_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: service_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: service_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.service_id_seq OWNED BY public.service.id;
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: servicetype; Type: TABLE; Schema: public; Owner: sharix
|
|
|
+-- Name: servicetype; Type: TABLE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE TABLE public.servicetype (
|
|
|
id integer NOT NULL,
|
|
|
- codename character varying(255),
|
|
|
- caption character varying(255),
|
|
|
- description text,
|
|
|
- requirements name,
|
|
|
- pricetype integer,
|
|
|
- status character(1),
|
|
|
- ticket_status integer,
|
|
|
+ caption character varying(255) NOT NULL,
|
|
|
+ description text NOT NULL,
|
|
|
+ pricetype integer NOT NULL,
|
|
|
id_metaservice integer,
|
|
|
- is_visible character(1),
|
|
|
- is_global character(1)
|
|
|
+ is_global character(1) NOT NULL,
|
|
|
+ is_visible character(1) NOT NULL,
|
|
|
+ requirements name,
|
|
|
+ status character(1) DEFAULT 'A'::bpchar,
|
|
|
+ ticket_status integer
|
|
|
);
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.servicetype OWNER TO sharix;
|
|
|
+ALTER TABLE public.servicetype OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: servicetype_id_seq; Type: SEQUENCE; Schema: public; Owner: sharix
|
|
|
+-- Name: servicetype_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
CREATE SEQUENCE public.servicetype_id_seq
|
|
@@ -559,10 +565,10 @@ CREATE SEQUENCE public.servicetype_id_seq
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
|
-ALTER TABLE public.servicetype_id_seq OWNER TO sharix;
|
|
|
+ALTER TABLE public.servicetype_id_seq OWNER TO postgres;
|
|
|
|
|
|
--
|
|
|
--- Name: servicetype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sharix
|
|
|
+-- Name: servicetype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER SEQUENCE public.servicetype_id_seq OWNED BY public.servicetype.id;
|
|
@@ -625,35 +631,28 @@ CREATE TABLE public.users (
|
|
|
ALTER TABLE public.users OWNER TO drive;
|
|
|
|
|
|
--
|
|
|
--- Name: client id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: client id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.client ALTER COLUMN id SET DEFAULT nextval('public.client_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: company id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
---
|
|
|
-
|
|
|
-ALTER TABLE ONLY public.company ALTER COLUMN id SET DEFAULT nextval('public.company_id_seq'::regclass);
|
|
|
-
|
|
|
-
|
|
|
---
|
|
|
--- Name: current_orders id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: current_orders id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.current_orders ALTER COLUMN id SET DEFAULT nextval('public.current_orders_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: current_timetable id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- 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: documents id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: documents id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.documents ALTER COLUMN id SET DEFAULT nextval('public.documents_id_seq'::regclass);
|
|
@@ -667,42 +666,49 @@ ALTER TABLE ONLY public.order_list_log ALTER COLUMN id SET DEFAULT nextval('publ
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: permissions id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: orders id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders ALTER COLUMN id SET DEFAULT nextval('public.orders_id_seq'::regclass);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: permissions id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.permissions ALTER COLUMN id SET DEFAULT nextval('public.permissions_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: provider id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: provider id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.provider ALTER COLUMN id SET DEFAULT nextval('public.provider_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: relationship id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: relationship id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.relationship ALTER COLUMN id SET DEFAULT nextval('public.relationship_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: resources id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: resource id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
-ALTER TABLE ONLY public.resources ALTER COLUMN id SET DEFAULT nextval('public.resources_id_seq'::regclass);
|
|
|
+ALTER TABLE ONLY public.resource ALTER COLUMN id SET DEFAULT nextval('public.resource_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: service id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: service id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.service ALTER COLUMN id SET DEFAULT nextval('public.service_id_seq'::regclass);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: servicetype id; Type: DEFAULT; Schema: public; Owner: sharix
|
|
|
+-- Name: servicetype id; Type: DEFAULT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.servicetype ALTER COLUMN id SET DEFAULT nextval('public.servicetype_id_seq'::regclass);
|
|
@@ -716,7 +722,7 @@ ALTER TABLE ONLY public.tickets ALTER COLUMN id SET DEFAULT nextval('public.tick
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: client client_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: client client_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.client
|
|
@@ -724,7 +730,7 @@ ALTER TABLE ONLY public.client
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: company company_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: company company_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.company
|
|
@@ -732,7 +738,7 @@ ALTER TABLE ONLY public.company
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: current_orders current_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: current_orders current_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.current_orders
|
|
@@ -740,7 +746,7 @@ ALTER TABLE ONLY public.current_orders
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: current_timetable current_timetable_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: current_timetable current_timetable_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.current_timetable
|
|
@@ -748,7 +754,7 @@ ALTER TABLE ONLY public.current_timetable
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: documents documents_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: documents documents_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.documents
|
|
@@ -764,7 +770,15 @@ ALTER TABLE ONLY public.order_list_log
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: permissions permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: orders orders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.orders
|
|
|
+ ADD CONSTRAINT orders_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: permissions permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.permissions
|
|
@@ -772,7 +786,7 @@ ALTER TABLE ONLY public.permissions
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: provider provider_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: provider provider_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.provider
|
|
@@ -780,7 +794,7 @@ ALTER TABLE ONLY public.provider
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: relationship relationship_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: relationship relationship_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.relationship
|
|
@@ -788,15 +802,15 @@ ALTER TABLE ONLY public.relationship
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: resources resources_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: resource resource_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
-ALTER TABLE ONLY public.resources
|
|
|
- ADD CONSTRAINT resources_pkey PRIMARY KEY (id);
|
|
|
+ALTER TABLE ONLY public.resource
|
|
|
+ ADD CONSTRAINT resource_pkey PRIMARY KEY (id);
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: service service_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: service service_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.service
|
|
@@ -804,7 +818,7 @@ ALTER TABLE ONLY public.service
|
|
|
|
|
|
|
|
|
--
|
|
|
--- Name: servicetype servicetype_pkey; Type: CONSTRAINT; Schema: public; Owner: sharix
|
|
|
+-- Name: servicetype servicetype_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
--
|
|
|
|
|
|
ALTER TABLE ONLY public.servicetype
|