--
-- PostgreSQL database dump
--

-- Dumped from database version 9.2.15
-- Dumped by pg_dump version 9.5.4

-- Started on 2016-10-28 16:08:16 EEST

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

--
-- TOC entry 1 (class 3079 OID 12648)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- TOC entry 3556 (class 0 OID 0)
-- Dependencies: 1
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


SET search_path = public, pg_catalog;

SET default_with_oids = false;

--
-- TOC entry 178 (class 1259 OID 25655)
-- Name: artbox_comment; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE artbox_comment (
    artbox_comment_id integer NOT NULL,
    text text NOT NULL,
    user_id integer,
    username character varying(255),
    email character varying(255),
    date_add integer NOT NULL,
    date_update integer NOT NULL,
    date_delete integer,
    status integer DEFAULT 1 NOT NULL,
    artbox_comment_pid integer,
    related_id integer,
    ip character varying(255) NOT NULL,
    info text,
    entity character varying(255) DEFAULT ''::character varying NOT NULL,
    entity_id integer DEFAULT 1 NOT NULL
);


--
-- TOC entry 179 (class 1259 OID 25664)
-- Name: artbox_comment_artbox_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE artbox_comment_artbox_comment_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3557 (class 0 OID 0)
-- Dependencies: 179
-- Name: artbox_comment_artbox_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE artbox_comment_artbox_comment_id_seq OWNED BY artbox_comment.artbox_comment_id;


--
-- TOC entry 180 (class 1259 OID 25666)
-- Name: artbox_comment_rating; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE artbox_comment_rating (
    artbox_comment_rating_id integer NOT NULL,
    date_add integer NOT NULL,
    date_update integer NOT NULL,
    user_id integer,
    value double precision,
    model character varying(255) NOT NULL,
    model_id integer NOT NULL
);


--
-- TOC entry 181 (class 1259 OID 25669)
-- Name: artbox_comment_rating_artbox_comment_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE artbox_comment_rating_artbox_comment_rating_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3558 (class 0 OID 0)
-- Dependencies: 181
-- Name: artbox_comment_rating_artbox_comment_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE artbox_comment_rating_artbox_comment_rating_id_seq OWNED BY artbox_comment_rating.artbox_comment_rating_id;


--
-- TOC entry 182 (class 1259 OID 25671)
-- Name: artbox_like; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE artbox_like (
    artbox_like_id integer NOT NULL,
    artbox_comment_id integer NOT NULL,
    user_id integer,
    date_add integer NOT NULL,
    is_like integer DEFAULT 1 NOT NULL
);


--
-- TOC entry 183 (class 1259 OID 25675)
-- Name: artbox_like_artbox_like_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE artbox_like_artbox_like_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3559 (class 0 OID 0)
-- Dependencies: 183
-- Name: artbox_like_artbox_like_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE artbox_like_artbox_like_id_seq OWNED BY artbox_like.artbox_like_id;


--
-- TOC entry 184 (class 1259 OID 25677)
-- Name: article_to_rating; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE article_to_rating (
    article_to_rating_id integer NOT NULL,
    articles_id integer NOT NULL,
    value double precision DEFAULT 0
);


--
-- TOC entry 185 (class 1259 OID 25681)
-- Name: article_to_rating_article_to_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE article_to_rating_article_to_rating_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3560 (class 0 OID 0)
-- Dependencies: 185
-- Name: article_to_rating_article_to_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE article_to_rating_article_to_rating_id_seq OWNED BY article_to_rating.article_to_rating_id;


--
-- TOC entry 186 (class 1259 OID 25683)
-- Name: articles; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE articles (
    id integer NOT NULL,
    image character varying(255) NOT NULL,
    date integer
);


--
-- TOC entry 187 (class 1259 OID 25689)
-- Name: articles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE articles_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3561 (class 0 OID 0)
-- Dependencies: 187
-- Name: articles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE articles_id_seq OWNED BY articles.id;


--
-- TOC entry 260 (class 1259 OID 28413)
-- Name: articles_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE articles_lang (
    articles_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255) NOT NULL,
    body text NOT NULL,
    meta_title character varying(255),
    meta_keywords character varying(255),
    meta_description character varying(255),
    seo_text text,
    h1 character varying(255),
    body_preview text,
    alias character varying(255)
);


--
-- TOC entry 169 (class 1259 OID 25051)
-- Name: auth_assignment; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE auth_assignment (
    item_name character varying(64) NOT NULL,
    created_at integer,
    user_id integer
);


--
-- TOC entry 170 (class 1259 OID 25054)
-- Name: auth_item; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE auth_item (
    name character varying(64) NOT NULL,
    type integer NOT NULL,
    description text,
    rule_name character varying(64),
    data text,
    created_at integer,
    updated_at integer
);


--
-- TOC entry 171 (class 1259 OID 25060)
-- Name: auth_item_child; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE auth_item_child (
    parent character varying(64) NOT NULL,
    child character varying(64) NOT NULL
);


--
-- TOC entry 172 (class 1259 OID 25063)
-- Name: auth_rule; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE auth_rule (
    name character varying(64) NOT NULL,
    data text,
    created_at integer,
    updated_at integer
);


--
-- TOC entry 188 (class 1259 OID 25691)
-- Name: banner; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE banner (
    banner_id integer NOT NULL,
    url character varying(255),
    status smallint
);


--
-- TOC entry 189 (class 1259 OID 25697)
-- Name: banner_banner_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE banner_banner_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3562 (class 0 OID 0)
-- Dependencies: 189
-- Name: banner_banner_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE banner_banner_id_seq OWNED BY banner.banner_id;


--
-- TOC entry 262 (class 1259 OID 28496)
-- Name: banner_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE banner_lang (
    banner_id integer NOT NULL,
    language_id integer NOT NULL,
    alt character varying(255),
    title character varying(255),
    image character varying(255)
);


--
-- TOC entry 190 (class 1259 OID 25699)
-- Name: bg; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE bg (
    id integer NOT NULL,
    url character varying(250) NOT NULL,
    image character varying(250) NOT NULL
);


--
-- TOC entry 191 (class 1259 OID 25705)
-- Name: bg_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE bg_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3563 (class 0 OID 0)
-- Dependencies: 191
-- Name: bg_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE bg_id_seq OWNED BY bg.id;


--
-- TOC entry 263 (class 1259 OID 28513)
-- Name: bg_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE bg_lang (
    bg_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255) NOT NULL
);


--
-- TOC entry 192 (class 1259 OID 25716)
-- Name: brand; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE brand (
    brand_id integer NOT NULL,
    image character varying(255),
    in_menu boolean,
    remote_id character varying(255)
);


--
-- TOC entry 193 (class 1259 OID 25722)
-- Name: brand_brand_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE brand_brand_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3564 (class 0 OID 0)
-- Dependencies: 193
-- Name: brand_brand_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE brand_brand_id_seq OWNED BY brand.brand_id;


--
-- TOC entry 264 (class 1259 OID 28533)
-- Name: brand_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE brand_lang (
    brand_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    meta_title character varying(255),
    meta_robots character varying(255),
    meta_desc character varying(255),
    seo_text text,
    alias character varying(255)
);


--
-- TOC entry 194 (class 1259 OID 25724)
-- Name: category; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE category (
    category_id integer NOT NULL,
    parent_id integer DEFAULT 0 NOT NULL,
    path integer[],
    depth integer DEFAULT 0 NOT NULL,
    image character varying(255),
    product_unit_id integer,
    remote_id character varying(255)
);


--
-- TOC entry 195 (class 1259 OID 25733)
-- Name: category_category_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE category_category_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3565 (class 0 OID 0)
-- Dependencies: 195
-- Name: category_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE category_category_id_seq OWNED BY category.category_id;


--
-- TOC entry 265 (class 1259 OID 28550)
-- Name: category_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE category_lang (
    category_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    meta_title character varying(255),
    meta_robots character varying(255),
    meta_desc character varying(255),
    seo_text text,
    h1 character varying(255),
    alias character varying(255)
);


--
-- TOC entry 259 (class 1259 OID 28345)
-- Name: certificate; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE certificate (
    certificate_id integer NOT NULL,
    name character varying(255) NOT NULL,
    link character varying(255)
);


--
-- TOC entry 258 (class 1259 OID 28343)
-- Name: certificate_certificate_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE certificate_certificate_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3566 (class 0 OID 0)
-- Dependencies: 258
-- Name: certificate_certificate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE certificate_certificate_id_seq OWNED BY certificate.certificate_id;


--
-- TOC entry 196 (class 1259 OID 25745)
-- Name: customer; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE customer (
    id integer NOT NULL,
    username character varying(255) NOT NULL,
    password_hash character varying(255) NOT NULL,
    name character varying(255),
    surname character varying(255),
    phone character varying(255),
    gender character varying(32),
    birth_day integer,
    birth_month integer,
    birth_year integer,
    body text,
    group_id integer,
    email character varying(255),
    auth_key character varying(32),
    password_reset_token character varying(255),
    status smallint,
    created_at integer,
    updated_at integer,
    role character varying(255)
);


--
-- TOC entry 197 (class 1259 OID 25752)
-- Name: customer_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE customer_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3567 (class 0 OID 0)
-- Dependencies: 197
-- Name: customer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE customer_id_seq OWNED BY customer.id;


--
-- TOC entry 198 (class 1259 OID 25754)
-- Name: event; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE event (
    event_id integer NOT NULL,
    image character varying(255),
    created_at integer,
    updated_at integer,
    end_at integer
);


--
-- TOC entry 199 (class 1259 OID 25760)
-- Name: event_event_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE event_event_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3568 (class 0 OID 0)
-- Dependencies: 199
-- Name: event_event_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE event_event_id_seq OWNED BY event.event_id;


--
-- TOC entry 266 (class 1259 OID 28588)
-- Name: event_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE event_lang (
    event_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    body text NOT NULL,
    meta_title character varying(255),
    description character varying(255),
    seo_text text,
    h1 character varying(255),
    alias character varying(255)
);


--
-- TOC entry 200 (class 1259 OID 25762)
-- Name: feedback; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE feedback (
    feedback_id integer NOT NULL,
    name character varying(255),
    phone character varying(255) NOT NULL,
    date_add integer,
    ip character varying(255)
);


--
-- TOC entry 201 (class 1259 OID 25768)
-- Name: feedback_feedback_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE feedback_feedback_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3569 (class 0 OID 0)
-- Dependencies: 201
-- Name: feedback_feedback_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE feedback_feedback_id_seq OWNED BY feedback.feedback_id;


--
-- TOC entry 173 (class 1259 OID 25136)
-- Name: language; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE language (
    language_id integer NOT NULL,
    url character varying(255) NOT NULL,
    local character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    "default" boolean DEFAULT false NOT NULL,
    date_create integer NOT NULL,
    date_update integer NOT NULL,
    status boolean DEFAULT false NOT NULL
);


--
-- TOC entry 174 (class 1259 OID 25143)
-- Name: language_language_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE language_language_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3570 (class 0 OID 0)
-- Dependencies: 174
-- Name: language_language_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE language_language_id_seq OWNED BY language.language_id;


--
-- TOC entry 175 (class 1259 OID 25145)
-- Name: migration; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE migration (
    version character varying(180) NOT NULL,
    apply_time integer
);


--
-- TOC entry 202 (class 1259 OID 25778)
-- Name: orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE orders (
    id integer NOT NULL,
    user_id integer,
    name character varying(255) NOT NULL,
    phone character varying(255),
    phone2 character varying(255),
    email character varying(255),
    adress character varying(255),
    body text,
    total double precision,
    date_time timestamp(0) without time zone,
    date_dedline date,
    reserve character varying(255),
    status character varying(255),
    comment text,
    label integer,
    pay integer,
    numbercard integer,
    delivery integer,
    declaration character varying(255),
    stock character varying(255),
    consignment character varying(255),
    payment character varying(255),
    insurance character varying(255),
    amount_imposed double precision,
    shipping_by character varying(255),
    city character varying(255)
);


--
-- TOC entry 203 (class 1259 OID 25784)
-- Name: orders_delivery; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE orders_delivery (
    id integer NOT NULL,
    parent_id integer,
    value integer,
    sort integer
);


--
-- TOC entry 204 (class 1259 OID 25790)
-- Name: orders_delivery_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE orders_delivery_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3571 (class 0 OID 0)
-- Dependencies: 204
-- Name: orders_delivery_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE orders_delivery_id_seq OWNED BY orders_delivery.id;


--
-- TOC entry 267 (class 1259 OID 28613)
-- Name: orders_delivery_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE orders_delivery_lang (
    orders_delivery_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255) NOT NULL,
    text text NOT NULL
);


--
-- TOC entry 205 (class 1259 OID 25792)
-- Name: orders_id_seq1; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE orders_id_seq1
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3572 (class 0 OID 0)
-- Dependencies: 205
-- Name: orders_id_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE orders_id_seq1 OWNED BY orders.id;


--
-- TOC entry 206 (class 1259 OID 25794)
-- Name: orders_label; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE orders_label (
    id integer NOT NULL,
    label character varying(255)
);


--
-- TOC entry 207 (class 1259 OID 25800)
-- Name: orders_label_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE orders_label_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3573 (class 0 OID 0)
-- Dependencies: 207
-- Name: orders_label_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE orders_label_id_seq OWNED BY orders_label.id;


--
-- TOC entry 268 (class 1259 OID 28650)
-- Name: orders_label_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE orders_label_lang (
    orders_label_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL
);


--
-- TOC entry 208 (class 1259 OID 25802)
-- Name: orders_products; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE orders_products (
    id integer NOT NULL,
    order_id integer NOT NULL,
    mod_id integer,
    product_name character varying(255),
    name character varying(255),
    sku character varying(255),
    price double precision,
    count integer,
    sum_cost double precision
);


--
-- TOC entry 209 (class 1259 OID 25808)
-- Name: orders_products_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE orders_products_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3574 (class 0 OID 0)
-- Dependencies: 209
-- Name: orders_products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE orders_products_id_seq OWNED BY orders_products.id;


--
-- TOC entry 210 (class 1259 OID 25810)
-- Name: page; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE page (
    id integer NOT NULL,
    in_menu boolean DEFAULT false NOT NULL
);


--
-- TOC entry 211 (class 1259 OID 25816)
-- Name: page_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE page_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3575 (class 0 OID 0)
-- Dependencies: 211
-- Name: page_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE page_id_seq OWNED BY page.id;


--
-- TOC entry 261 (class 1259 OID 28456)
-- Name: page_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE page_lang (
    page_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255) NOT NULL,
    body text NOT NULL,
    meta_title character varying(255),
    meta_keywords character varying(255),
    meta_description character varying(255),
    seo_text text,
    h1 character varying(255),
    alias character varying(255)
);


--
-- TOC entry 212 (class 1259 OID 25818)
-- Name: product; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product (
    product_id integer NOT NULL,
    brand_id integer,
    video text,
    is_top boolean DEFAULT false,
    akciya boolean DEFAULT false,
    is_new boolean DEFAULT false,
    remote_id character varying(255)
);


--
-- TOC entry 213 (class 1259 OID 25827)
-- Name: product_category; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_category (
    product_id integer NOT NULL,
    category_id integer NOT NULL
);


--
-- TOC entry 257 (class 1259 OID 28326)
-- Name: product_certificate; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_certificate (
    product_certificate_id integer NOT NULL,
    product_id integer NOT NULL,
    link character varying(100)
);


--
-- TOC entry 256 (class 1259 OID 28324)
-- Name: product_certificate_product_certificate_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_certificate_product_certificate_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3576 (class 0 OID 0)
-- Dependencies: 256
-- Name: product_certificate_product_certificate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_certificate_product_certificate_id_seq OWNED BY product_certificate.product_certificate_id;


--
-- TOC entry 214 (class 1259 OID 25830)
-- Name: product_image; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_image (
    product_variant_id integer,
    image character varying(255),
    alt character varying(255),
    title character varying(255),
    product_id integer NOT NULL,
    product_image_id integer NOT NULL
);


--
-- TOC entry 215 (class 1259 OID 25836)
-- Name: product_image_product_image_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_image_product_image_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3577 (class 0 OID 0)
-- Dependencies: 215
-- Name: product_image_product_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_image_product_image_id_seq OWNED BY product_image.product_image_id;


--
-- TOC entry 269 (class 1259 OID 28683)
-- Name: product_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_lang (
    product_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    alias character varying(255)
);


--
-- TOC entry 216 (class 1259 OID 25838)
-- Name: product_option; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_option (
    product_id integer NOT NULL,
    option_id integer NOT NULL
);


--
-- TOC entry 217 (class 1259 OID 25841)
-- Name: product_product_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_product_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3578 (class 0 OID 0)
-- Dependencies: 217
-- Name: product_product_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_product_id_seq OWNED BY product.product_id;


--
-- TOC entry 255 (class 1259 OID 28309)
-- Name: product_spec; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_spec (
    product_spec_id integer NOT NULL,
    product_id integer NOT NULL,
    tech_spec_link character varying(100),
    tech_char_link character varying(100)
);


--
-- TOC entry 270 (class 1259 OID 28700)
-- Name: product_spec_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_spec_lang (
    product_spec_id integer NOT NULL,
    language_id integer NOT NULL,
    tech_spec_text text,
    instruction text
);


--
-- TOC entry 254 (class 1259 OID 28307)
-- Name: product_spec_product_spec_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_spec_product_spec_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3579 (class 0 OID 0)
-- Dependencies: 254
-- Name: product_spec_product_spec_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_spec_product_spec_id_seq OWNED BY product_spec.product_spec_id;


--
-- TOC entry 218 (class 1259 OID 25843)
-- Name: product_stock; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_stock (
    product_id integer NOT NULL,
    stock_id integer NOT NULL,
    quantity integer NOT NULL,
    product_variant_id integer NOT NULL
);


--
-- TOC entry 219 (class 1259 OID 25846)
-- Name: stock; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE stock (
    stock_id integer NOT NULL,
    remote_id character varying(255)
);


--
-- TOC entry 220 (class 1259 OID 25849)
-- Name: product_stock_product_stock_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_stock_product_stock_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3580 (class 0 OID 0)
-- Dependencies: 220
-- Name: product_stock_product_stock_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_stock_product_stock_id_seq OWNED BY stock.stock_id;


--
-- TOC entry 253 (class 1259 OID 28276)
-- Name: product_to_project; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_to_project (
    product_to_project_id integer NOT NULL,
    product_variant_id integer NOT NULL,
    project_id integer NOT NULL
);


--
-- TOC entry 252 (class 1259 OID 28274)
-- Name: product_to_project_product_to_project_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_to_project_product_to_project_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3581 (class 0 OID 0)
-- Dependencies: 252
-- Name: product_to_project_product_to_project_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_to_project_product_to_project_id_seq OWNED BY product_to_project.product_to_project_id;


--
-- TOC entry 221 (class 1259 OID 25851)
-- Name: product_to_rating; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_to_rating (
    product_to_rating_id integer NOT NULL,
    product_id integer NOT NULL,
    value double precision DEFAULT 0
);


--
-- TOC entry 222 (class 1259 OID 25855)
-- Name: product_to_rating_product_to_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_to_rating_product_to_rating_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3582 (class 0 OID 0)
-- Dependencies: 222
-- Name: product_to_rating_product_to_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_to_rating_product_to_rating_id_seq OWNED BY product_to_rating.product_to_rating_id;


--
-- TOC entry 223 (class 1259 OID 25857)
-- Name: product_unit; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_unit (
    product_unit_id integer NOT NULL,
    is_default boolean
);


--
-- TOC entry 271 (class 1259 OID 28723)
-- Name: product_unit_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_unit_lang (
    product_unit_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    short character varying(255)
);


--
-- TOC entry 224 (class 1259 OID 25860)
-- Name: product_unit_product_unit_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_unit_product_unit_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3583 (class 0 OID 0)
-- Dependencies: 224
-- Name: product_unit_product_unit_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_unit_product_unit_id_seq OWNED BY product_unit.product_unit_id;


--
-- TOC entry 225 (class 1259 OID 25862)
-- Name: product_variant; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_variant (
    product_variant_id integer NOT NULL,
    product_id integer NOT NULL,
    sku character varying(255) NOT NULL,
    price double precision,
    price_old double precision,
    stock double precision,
    product_unit_id integer,
    remote_id character varying(255)
);


--
-- TOC entry 272 (class 1259 OID 28741)
-- Name: product_variant_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_variant_lang (
    product_variant_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL
);


--
-- TOC entry 226 (class 1259 OID 25868)
-- Name: product_variant_option; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE product_variant_option (
    product_variant_id integer NOT NULL,
    option_id integer NOT NULL
);


--
-- TOC entry 227 (class 1259 OID 25871)
-- Name: product_variant_product_variant_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE product_variant_product_variant_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3584 (class 0 OID 0)
-- Dependencies: 227
-- Name: product_variant_product_variant_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE product_variant_product_variant_id_seq OWNED BY product_variant.product_variant_id;


--
-- TOC entry 249 (class 1259 OID 27421)
-- Name: project; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE project (
    project_id integer NOT NULL,
    date_add integer NOT NULL
);


--
-- TOC entry 251 (class 1259 OID 27432)
-- Name: project_image; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE project_image (
    project_image_id integer NOT NULL,
    project_id integer NOT NULL,
    image character varying(255),
    alt character varying(255),
    title character varying(255)
);


--
-- TOC entry 250 (class 1259 OID 27430)
-- Name: project_image_project_image_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE project_image_project_image_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3585 (class 0 OID 0)
-- Dependencies: 250
-- Name: project_image_project_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE project_image_project_image_id_seq OWNED BY project_image.project_image_id;


--
-- TOC entry 273 (class 1259 OID 28757)
-- Name: project_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE project_lang (
    project_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255) NOT NULL,
    description text,
    alias character varying(255)
);


--
-- TOC entry 248 (class 1259 OID 27419)
-- Name: project_project_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE project_project_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3586 (class 0 OID 0)
-- Dependencies: 248
-- Name: project_project_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE project_project_id_seq OWNED BY project.project_id;


--
-- TOC entry 228 (class 1259 OID 25885)
-- Name: seo; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE seo (
    seo_id integer NOT NULL,
    url character varying(255) NOT NULL
);


--
-- TOC entry 229 (class 1259 OID 25891)
-- Name: seo_category; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE seo_category (
    seo_category_id integer NOT NULL,
    controller character varying(100),
    status smallint
);


--
-- TOC entry 275 (class 1259 OID 28813)
-- Name: seo_category_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE seo_category_lang (
    seo_category_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255)
);


--
-- TOC entry 230 (class 1259 OID 25894)
-- Name: seo_category_seo_category_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE seo_category_seo_category_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3587 (class 0 OID 0)
-- Dependencies: 230
-- Name: seo_category_seo_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE seo_category_seo_category_id_seq OWNED BY seo_category.seo_category_id;


--
-- TOC entry 231 (class 1259 OID 25896)
-- Name: seo_dynamic; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE seo_dynamic (
    seo_dynamic_id integer NOT NULL,
    seo_category_id integer,
    action character varying(200),
    fields character varying(255),
    status smallint,
    param character varying(255)
);


--
-- TOC entry 276 (class 1259 OID 28827)
-- Name: seo_dynamic_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE seo_dynamic_lang (
    seo_dynamic_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255),
    title text,
    h1 character varying(255),
    key character varying(255),
    meta character varying(255),
    description text,
    seo_text text
);


--
-- TOC entry 232 (class 1259 OID 25902)
-- Name: seo_dynamic_seo_dynamic_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE seo_dynamic_seo_dynamic_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3588 (class 0 OID 0)
-- Dependencies: 232
-- Name: seo_dynamic_seo_dynamic_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE seo_dynamic_seo_dynamic_id_seq OWNED BY seo_dynamic.seo_dynamic_id;


--
-- TOC entry 274 (class 1259 OID 28796)
-- Name: seo_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE seo_lang (
    seo_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255),
    description text,
    h1 character varying(255),
    meta character varying(255),
    seo_text text
);


--
-- TOC entry 233 (class 1259 OID 25904)
-- Name: seo_seo_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE seo_seo_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3589 (class 0 OID 0)
-- Dependencies: 233
-- Name: seo_seo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE seo_seo_id_seq OWNED BY seo.seo_id;


--
-- TOC entry 234 (class 1259 OID 25906)
-- Name: service; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE service (
    service_id integer NOT NULL,
    image character varying(255),
    created_at integer,
    updated_at integer
);


--
-- TOC entry 277 (class 1259 OID 28895)
-- Name: service_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE service_lang (
    service_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    body text NOT NULL,
    seo_text text,
    meta_title character varying(255),
    description character varying(255),
    h1 character varying(255),
    alias character varying(255)
);


--
-- TOC entry 235 (class 1259 OID 25912)
-- Name: service_service_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE service_service_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3590 (class 0 OID 0)
-- Dependencies: 235
-- Name: service_service_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE service_service_id_seq OWNED BY service.service_id;


--
-- TOC entry 236 (class 1259 OID 25914)
-- Name: share; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE share (
    id integer NOT NULL,
    user_id integer,
    product_id integer,
    date_time timestamp without time zone,
    date date
);


--
-- TOC entry 237 (class 1259 OID 25917)
-- Name: share_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE share_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3591 (class 0 OID 0)
-- Dependencies: 237
-- Name: share_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE share_id_seq OWNED BY share.id;


--
-- TOC entry 238 (class 1259 OID 25919)
-- Name: slider; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE slider (
    slider_id integer NOT NULL,
    speed integer,
    duration integer,
    title character varying(200),
    status smallint,
    width integer,
    height integer
);


--
-- TOC entry 239 (class 1259 OID 25922)
-- Name: slider_image; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE slider_image (
    slider_image_id integer NOT NULL,
    slider_id integer NOT NULL,
    image character varying(255),
    url character varying(255),
    status smallint,
    sort integer
);


--
-- TOC entry 278 (class 1259 OID 28929)
-- Name: slider_image_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE slider_image_lang (
    slider_image_id integer NOT NULL,
    language_id integer NOT NULL,
    title character varying(255),
    alt character varying(255)
);


--
-- TOC entry 240 (class 1259 OID 25928)
-- Name: slider_image_slider_image_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE slider_image_slider_image_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3592 (class 0 OID 0)
-- Dependencies: 240
-- Name: slider_image_slider_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE slider_image_slider_image_id_seq OWNED BY slider_image.slider_image_id;


--
-- TOC entry 241 (class 1259 OID 25930)
-- Name: slider_slider_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE slider_slider_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3593 (class 0 OID 0)
-- Dependencies: 241
-- Name: slider_slider_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE slider_slider_id_seq OWNED BY slider.slider_id;


--
-- TOC entry 281 (class 1259 OID 29090)
-- Name: stock_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE stock_lang (
    stock_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL
);


--
-- TOC entry 242 (class 1259 OID 25932)
-- Name: tax_group; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE tax_group (
    tax_group_id integer NOT NULL,
    is_filter boolean DEFAULT false,
    level integer,
    sort integer DEFAULT 0,
    display boolean DEFAULT true,
    is_menu boolean,
    remote_id character varying(255)
);


--
-- TOC entry 279 (class 1259 OID 28963)
-- Name: tax_group_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE tax_group_lang (
    tax_group_id integer NOT NULL,
    language_id integer NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    alias character varying(255)
);


--
-- TOC entry 243 (class 1259 OID 25942)
-- Name: tax_group_tax_group_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE tax_group_tax_group_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3594 (class 0 OID 0)
-- Dependencies: 243
-- Name: tax_group_tax_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE tax_group_tax_group_id_seq OWNED BY tax_group.tax_group_id;


--
-- TOC entry 244 (class 1259 OID 25944)
-- Name: tax_group_to_category; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE tax_group_to_category (
    tax_group_to_category_id integer NOT NULL,
    tax_group_id integer NOT NULL,
    category_id integer NOT NULL
);


--
-- TOC entry 245 (class 1259 OID 25947)
-- Name: tax_group_to_category_tax_group_to_category_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE tax_group_to_category_tax_group_to_category_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3595 (class 0 OID 0)
-- Dependencies: 245
-- Name: tax_group_to_category_tax_group_to_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE tax_group_to_category_tax_group_to_category_id_seq OWNED BY tax_group_to_category.tax_group_to_category_id;


--
-- TOC entry 246 (class 1259 OID 25952)
-- Name: tax_option; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE tax_option (
    tax_option_id bigint NOT NULL,
    tax_group_id integer NOT NULL,
    parent_id integer DEFAULT 0 NOT NULL,
    depth integer,
    sort integer DEFAULT 0,
    path_int integer[],
    image character varying(255),
    remote_id character varying(255)
);


--
-- TOC entry 280 (class 1259 OID 28997)
-- Name: tax_option_lang; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE tax_option_lang (
    tax_option_id integer NOT NULL,
    language_id integer NOT NULL,
    value character varying(255) NOT NULL,
    alias character varying(255)
);


--
-- TOC entry 247 (class 1259 OID 25961)
-- Name: tax_option_tax_option_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE tax_option_tax_option_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3596 (class 0 OID 0)
-- Dependencies: 247
-- Name: tax_option_tax_option_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE tax_option_tax_option_id_seq OWNED BY tax_option.tax_option_id;


--
-- TOC entry 176 (class 1259 OID 25311)
-- Name: user; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE "user" (
    id integer NOT NULL,
    username character varying(255) NOT NULL,
    auth_key character varying(32) NOT NULL,
    password_hash character varying(255) NOT NULL,
    password_reset_token character varying(255),
    email character varying(255) NOT NULL,
    status smallint DEFAULT 10 NOT NULL,
    created_at integer NOT NULL,
    updated_at integer NOT NULL
);


--
-- TOC entry 177 (class 1259 OID 25318)
-- Name: user_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE user_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- TOC entry 3597 (class 0 OID 0)
-- Dependencies: 177
-- Name: user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE user_id_seq OWNED BY "user".id;


--
-- TOC entry 3148 (class 2604 OID 25997)
-- Name: artbox_comment_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment ALTER COLUMN artbox_comment_id SET DEFAULT nextval('artbox_comment_artbox_comment_id_seq'::regclass);


--
-- TOC entry 3149 (class 2604 OID 25998)
-- Name: artbox_comment_rating_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment_rating ALTER COLUMN artbox_comment_rating_id SET DEFAULT nextval('artbox_comment_rating_artbox_comment_rating_id_seq'::regclass);


--
-- TOC entry 3151 (class 2604 OID 25999)
-- Name: artbox_like_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_like ALTER COLUMN artbox_like_id SET DEFAULT nextval('artbox_like_artbox_like_id_seq'::regclass);


--
-- TOC entry 3153 (class 2604 OID 26000)
-- Name: article_to_rating_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY article_to_rating ALTER COLUMN article_to_rating_id SET DEFAULT nextval('article_to_rating_article_to_rating_id_seq'::regclass);


--
-- TOC entry 3154 (class 2604 OID 26001)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY articles ALTER COLUMN id SET DEFAULT nextval('articles_id_seq'::regclass);


--
-- TOC entry 3155 (class 2604 OID 26002)
-- Name: banner_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY banner ALTER COLUMN banner_id SET DEFAULT nextval('banner_banner_id_seq'::regclass);


--
-- TOC entry 3156 (class 2604 OID 26003)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY bg ALTER COLUMN id SET DEFAULT nextval('bg_id_seq'::regclass);


--
-- TOC entry 3157 (class 2604 OID 26005)
-- Name: brand_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY brand ALTER COLUMN brand_id SET DEFAULT nextval('brand_brand_id_seq'::regclass);


--
-- TOC entry 3160 (class 2604 OID 26006)
-- Name: category_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY category ALTER COLUMN category_id SET DEFAULT nextval('category_category_id_seq'::regclass);


--
-- TOC entry 3200 (class 2604 OID 28348)
-- Name: certificate_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY certificate ALTER COLUMN certificate_id SET DEFAULT nextval('certificate_certificate_id_seq'::regclass);


--
-- TOC entry 3161 (class 2604 OID 26008)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY customer ALTER COLUMN id SET DEFAULT nextval('customer_id_seq'::regclass);


--
-- TOC entry 3162 (class 2604 OID 26009)
-- Name: event_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY event ALTER COLUMN event_id SET DEFAULT nextval('event_event_id_seq'::regclass);


--
-- TOC entry 3163 (class 2604 OID 26010)
-- Name: feedback_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY feedback ALTER COLUMN feedback_id SET DEFAULT nextval('feedback_feedback_id_seq'::regclass);


--
-- TOC entry 3141 (class 2604 OID 25320)
-- Name: language_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY language ALTER COLUMN language_id SET DEFAULT nextval('language_language_id_seq'::regclass);


--
-- TOC entry 3164 (class 2604 OID 26012)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders ALTER COLUMN id SET DEFAULT nextval('orders_id_seq1'::regclass);


--
-- TOC entry 3165 (class 2604 OID 26013)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_delivery ALTER COLUMN id SET DEFAULT nextval('orders_delivery_id_seq'::regclass);


--
-- TOC entry 3166 (class 2604 OID 26014)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_label ALTER COLUMN id SET DEFAULT nextval('orders_label_id_seq'::regclass);


--
-- TOC entry 3167 (class 2604 OID 26015)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_products ALTER COLUMN id SET DEFAULT nextval('orders_products_id_seq'::regclass);


--
-- TOC entry 3168 (class 2604 OID 26016)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY page ALTER COLUMN id SET DEFAULT nextval('page_id_seq'::regclass);


--
-- TOC entry 3173 (class 2604 OID 26017)
-- Name: product_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product ALTER COLUMN product_id SET DEFAULT nextval('product_product_id_seq'::regclass);


--
-- TOC entry 3199 (class 2604 OID 28329)
-- Name: product_certificate_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_certificate ALTER COLUMN product_certificate_id SET DEFAULT nextval('product_certificate_product_certificate_id_seq'::regclass);


--
-- TOC entry 3174 (class 2604 OID 26018)
-- Name: product_image_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_image ALTER COLUMN product_image_id SET DEFAULT nextval('product_image_product_image_id_seq'::regclass);


--
-- TOC entry 3198 (class 2604 OID 28312)
-- Name: product_spec_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_spec ALTER COLUMN product_spec_id SET DEFAULT nextval('product_spec_product_spec_id_seq'::regclass);


--
-- TOC entry 3197 (class 2604 OID 28279)
-- Name: product_to_project_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_project ALTER COLUMN product_to_project_id SET DEFAULT nextval('product_to_project_product_to_project_id_seq'::regclass);


--
-- TOC entry 3177 (class 2604 OID 26019)
-- Name: product_to_rating_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_rating ALTER COLUMN product_to_rating_id SET DEFAULT nextval('product_to_rating_product_to_rating_id_seq'::regclass);


--
-- TOC entry 3178 (class 2604 OID 26020)
-- Name: product_unit_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_unit ALTER COLUMN product_unit_id SET DEFAULT nextval('product_unit_product_unit_id_seq'::regclass);


--
-- TOC entry 3179 (class 2604 OID 26021)
-- Name: product_variant_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant ALTER COLUMN product_variant_id SET DEFAULT nextval('product_variant_product_variant_id_seq'::regclass);


--
-- TOC entry 3195 (class 2604 OID 27424)
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY project ALTER COLUMN project_id SET DEFAULT nextval('project_project_id_seq'::regclass);


--
-- TOC entry 3196 (class 2604 OID 27435)
-- Name: project_image_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY project_image ALTER COLUMN project_image_id SET DEFAULT nextval('project_image_project_image_id_seq'::regclass);


--
-- TOC entry 3180 (class 2604 OID 26024)
-- Name: seo_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo ALTER COLUMN seo_id SET DEFAULT nextval('seo_seo_id_seq'::regclass);


--
-- TOC entry 3181 (class 2604 OID 26025)
-- Name: seo_category_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_category ALTER COLUMN seo_category_id SET DEFAULT nextval('seo_category_seo_category_id_seq'::regclass);


--
-- TOC entry 3182 (class 2604 OID 26026)
-- Name: seo_dynamic_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_dynamic ALTER COLUMN seo_dynamic_id SET DEFAULT nextval('seo_dynamic_seo_dynamic_id_seq'::regclass);


--
-- TOC entry 3183 (class 2604 OID 26027)
-- Name: service_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY service ALTER COLUMN service_id SET DEFAULT nextval('service_service_id_seq'::regclass);


--
-- TOC entry 3184 (class 2604 OID 26028)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY share ALTER COLUMN id SET DEFAULT nextval('share_id_seq'::regclass);


--
-- TOC entry 3185 (class 2604 OID 26029)
-- Name: slider_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider ALTER COLUMN slider_id SET DEFAULT nextval('slider_slider_id_seq'::regclass);


--
-- TOC entry 3186 (class 2604 OID 26030)
-- Name: slider_image_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider_image ALTER COLUMN slider_image_id SET DEFAULT nextval('slider_image_slider_image_id_seq'::regclass);


--
-- TOC entry 3175 (class 2604 OID 26031)
-- Name: stock_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY stock ALTER COLUMN stock_id SET DEFAULT nextval('product_stock_product_stock_id_seq'::regclass);


--
-- TOC entry 3190 (class 2604 OID 26032)
-- Name: tax_group_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group ALTER COLUMN tax_group_id SET DEFAULT nextval('tax_group_tax_group_id_seq'::regclass);


--
-- TOC entry 3191 (class 2604 OID 26033)
-- Name: tax_group_to_category_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group_to_category ALTER COLUMN tax_group_to_category_id SET DEFAULT nextval('tax_group_to_category_tax_group_to_category_id_seq'::regclass);


--
-- TOC entry 3194 (class 2604 OID 26034)
-- Name: tax_option_id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_option ALTER COLUMN tax_option_id SET DEFAULT nextval('tax_option_tax_option_id_seq'::regclass);


--
-- TOC entry 3144 (class 2604 OID 25321)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY "user" ALTER COLUMN id SET DEFAULT nextval('user_id_seq'::regclass);


--
-- TOC entry 3221 (class 2606 OID 26041)
-- Name: artbox_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment
    ADD CONSTRAINT artbox_comment_pkey PRIMARY KEY (artbox_comment_id);


--
-- TOC entry 3223 (class 2606 OID 26043)
-- Name: artbox_comment_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment_rating
    ADD CONSTRAINT artbox_comment_rating_pkey PRIMARY KEY (artbox_comment_rating_id);


--
-- TOC entry 3225 (class 2606 OID 26045)
-- Name: artbox_like_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_like
    ADD CONSTRAINT artbox_like_pkey PRIMARY KEY (artbox_like_id);


--
-- TOC entry 3228 (class 2606 OID 26047)
-- Name: article_to_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY article_to_rating
    ADD CONSTRAINT article_to_rating_pkey PRIMARY KEY (article_to_rating_id);


--
-- TOC entry 3230 (class 2606 OID 26049)
-- Name: articles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY articles
    ADD CONSTRAINT articles_pkey PRIMARY KEY (id);


--
-- TOC entry 3205 (class 2606 OID 25333)
-- Name: auth_item_child_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_item_child
    ADD CONSTRAINT auth_item_child_pkey PRIMARY KEY (parent, child);


--
-- TOC entry 3202 (class 2606 OID 25335)
-- Name: auth_item_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_item
    ADD CONSTRAINT auth_item_pkey PRIMARY KEY (name);


--
-- TOC entry 3207 (class 2606 OID 25337)
-- Name: auth_rule_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_rule
    ADD CONSTRAINT auth_rule_pkey PRIMARY KEY (name);


--
-- TOC entry 3232 (class 2606 OID 26051)
-- Name: banner_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY banner
    ADD CONSTRAINT banner_pkey PRIMARY KEY (banner_id);


--
-- TOC entry 3234 (class 2606 OID 26053)
-- Name: bg_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY bg
    ADD CONSTRAINT bg_pkey PRIMARY KEY (id);


--
-- TOC entry 3236 (class 2606 OID 26057)
-- Name: brand_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY brand
    ADD CONSTRAINT brand_pkey PRIMARY KEY (brand_id);


--
-- TOC entry 3239 (class 2606 OID 26059)
-- Name: category_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY category
    ADD CONSTRAINT category_pkey PRIMARY KEY (category_id);


--
-- TOC entry 3324 (class 2606 OID 28353)
-- Name: certificate_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY certificate
    ADD CONSTRAINT certificate_pkey PRIMARY KEY (certificate_id);


--
-- TOC entry 3242 (class 2606 OID 26063)
-- Name: customer_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY customer
    ADD CONSTRAINT customer_pkey PRIMARY KEY (id);


--
-- TOC entry 3244 (class 2606 OID 26065)
-- Name: event_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY event
    ADD CONSTRAINT event_pkey PRIMARY KEY (event_id);


--
-- TOC entry 3246 (class 2606 OID 26067)
-- Name: feedback_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY feedback
    ADD CONSTRAINT feedback_pkey PRIMARY KEY (feedback_id);


--
-- TOC entry 3209 (class 2606 OID 25359)
-- Name: language_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY language
    ADD CONSTRAINT language_pkey PRIMARY KEY (language_id);


--
-- TOC entry 3211 (class 2606 OID 25361)
-- Name: migration_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY migration
    ADD CONSTRAINT migration_pkey PRIMARY KEY (version);


--
-- TOC entry 3250 (class 2606 OID 26071)
-- Name: orders_delivery_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_delivery
    ADD CONSTRAINT orders_delivery_pkey PRIMARY KEY (id);


--
-- TOC entry 3252 (class 2606 OID 26073)
-- Name: orders_label_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_label
    ADD CONSTRAINT orders_label_pkey PRIMARY KEY (id);


--
-- TOC entry 3248 (class 2606 OID 26075)
-- Name: orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders
    ADD CONSTRAINT orders_pkey PRIMARY KEY (id);


--
-- TOC entry 3255 (class 2606 OID 26077)
-- Name: orders_products_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_products
    ADD CONSTRAINT orders_products_pkey PRIMARY KEY (id);


--
-- TOC entry 3257 (class 2606 OID 26079)
-- Name: page_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY page
    ADD CONSTRAINT page_pkey PRIMARY KEY (id);


--
-- TOC entry 3322 (class 2606 OID 28331)
-- Name: product_certificate_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_certificate
    ADD CONSTRAINT product_certificate_pkey PRIMARY KEY (product_certificate_id);


--
-- TOC entry 3265 (class 2606 OID 26087)
-- Name: product_image_id_pk; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_image
    ADD CONSTRAINT product_image_id_pk PRIMARY KEY (product_image_id);


--
-- TOC entry 3267 (class 2606 OID 26089)
-- Name: product_option_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_option
    ADD CONSTRAINT product_option_pkey PRIMARY KEY (product_id, option_id);


--
-- TOC entry 3260 (class 2606 OID 26091)
-- Name: product_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product
    ADD CONSTRAINT product_pkey PRIMARY KEY (product_id);


--
-- TOC entry 3320 (class 2606 OID 28317)
-- Name: product_spec_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_spec
    ADD CONSTRAINT product_spec_pkey PRIMARY KEY (product_spec_id);


--
-- TOC entry 3317 (class 2606 OID 28281)
-- Name: product_to_project_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_project
    ADD CONSTRAINT product_to_project_pkey PRIMARY KEY (product_to_project_id);


--
-- TOC entry 3274 (class 2606 OID 26093)
-- Name: product_to_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_rating
    ADD CONSTRAINT product_to_rating_pkey PRIMARY KEY (product_to_rating_id);


--
-- TOC entry 3276 (class 2606 OID 26095)
-- Name: product_unit_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_unit
    ADD CONSTRAINT product_unit_pkey PRIMARY KEY (product_unit_id);


--
-- TOC entry 3283 (class 2606 OID 26097)
-- Name: product_variant_option_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant_option
    ADD CONSTRAINT product_variant_option_pkey PRIMARY KEY (product_variant_id, option_id);


--
-- TOC entry 3278 (class 2606 OID 26099)
-- Name: product_variant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant
    ADD CONSTRAINT product_variant_pkey PRIMARY KEY (product_variant_id);


--
-- TOC entry 3315 (class 2606 OID 27440)
-- Name: project_image_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY project_image
    ADD CONSTRAINT project_image_pkey PRIMARY KEY (project_image_id);


--
-- TOC entry 3313 (class 2606 OID 27429)
-- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_pkey PRIMARY KEY (project_id);


--
-- TOC entry 3287 (class 2606 OID 26105)
-- Name: seo_category_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_category
    ADD CONSTRAINT seo_category_pkey PRIMARY KEY (seo_category_id);


--
-- TOC entry 3289 (class 2606 OID 26107)
-- Name: seo_dynamic_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_dynamic
    ADD CONSTRAINT seo_dynamic_pkey PRIMARY KEY (seo_dynamic_id);


--
-- TOC entry 3285 (class 2606 OID 26109)
-- Name: seo_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo
    ADD CONSTRAINT seo_pkey PRIMARY KEY (seo_id);


--
-- TOC entry 3291 (class 2606 OID 26111)
-- Name: service_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY service
    ADD CONSTRAINT service_pkey PRIMARY KEY (service_id);


--
-- TOC entry 3295 (class 2606 OID 26113)
-- Name: share_id_pk; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY share
    ADD CONSTRAINT share_id_pk PRIMARY KEY (id);


--
-- TOC entry 3299 (class 2606 OID 26115)
-- Name: slider_image_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider_image
    ADD CONSTRAINT slider_image_pkey PRIMARY KEY (slider_image_id);


--
-- TOC entry 3297 (class 2606 OID 26117)
-- Name: slider_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider
    ADD CONSTRAINT slider_pkey PRIMARY KEY (slider_id);


--
-- TOC entry 3272 (class 2606 OID 26119)
-- Name: stock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY stock
    ADD CONSTRAINT stock_pkey PRIMARY KEY (stock_id);


--
-- TOC entry 3302 (class 2606 OID 26121)
-- Name: tax_group_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group
    ADD CONSTRAINT tax_group_pkey PRIMARY KEY (tax_group_id);


--
-- TOC entry 3306 (class 2606 OID 26123)
-- Name: tax_group_to_category_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group_to_category
    ADD CONSTRAINT tax_group_to_category_pkey PRIMARY KEY (tax_group_to_category_id);


--
-- TOC entry 3308 (class 2606 OID 26125)
-- Name: tax_option_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_option
    ADD CONSTRAINT tax_option_pkey PRIMARY KEY (tax_option_id);


--
-- TOC entry 3213 (class 2606 OID 25429)
-- Name: user_email_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY "user"
    ADD CONSTRAINT user_email_key UNIQUE (email);


--
-- TOC entry 3215 (class 2606 OID 25431)
-- Name: user_password_reset_token_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY "user"
    ADD CONSTRAINT user_password_reset_token_key UNIQUE (password_reset_token);


--
-- TOC entry 3217 (class 2606 OID 25433)
-- Name: user_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY "user"
    ADD CONSTRAINT user_pkey PRIMARY KEY (id);


--
-- TOC entry 3219 (class 2606 OID 25435)
-- Name: user_username_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY "user"
    ADD CONSTRAINT user_username_key UNIQUE (username);


--
-- TOC entry 3226 (class 1259 OID 26136)
-- Name: artbox_like_unique; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX artbox_like_unique ON artbox_like USING btree (artbox_comment_id, user_id, is_like);


--
-- TOC entry 3325 (class 1259 OID 29035)
-- Name: articles_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX articles_lang_alias ON articles_lang USING btree (alias);


--
-- TOC entry 3326 (class 1259 OID 28419)
-- Name: articles_lang_article_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX articles_lang_article_language_key ON articles_lang USING btree (articles_id, language_id);


--
-- TOC entry 3329 (class 1259 OID 28502)
-- Name: banner_lang_banner_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX banner_lang_banner_language_key ON banner_lang USING btree (banner_id, language_id);


--
-- TOC entry 3330 (class 1259 OID 28516)
-- Name: bg_lang_bg_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX bg_lang_bg_language_key ON bg_lang USING btree (bg_id, language_id);


--
-- TOC entry 3331 (class 1259 OID 29036)
-- Name: brand_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX brand_lang_alias ON brand_lang USING btree (alias);


--
-- TOC entry 3332 (class 1259 OID 28539)
-- Name: brand_lang_brand_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX brand_lang_brand_language_key ON brand_lang USING btree (brand_id, language_id);


--
-- TOC entry 3237 (class 1259 OID 29110)
-- Name: brand_remote_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX brand_remote_id_uindex ON brand USING btree (remote_id);


--
-- TOC entry 3333 (class 1259 OID 29037)
-- Name: category_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX category_lang_alias ON category_lang USING btree (alias);


--
-- TOC entry 3334 (class 1259 OID 28556)
-- Name: category_lang_category_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX category_lang_category_language_key ON category_lang USING btree (category_id, language_id);


--
-- TOC entry 3240 (class 1259 OID 29119)
-- Name: category_remote_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX category_remote_id_uindex ON category USING btree (remote_id);


--
-- TOC entry 3335 (class 1259 OID 29038)
-- Name: event_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX event_lang_alias ON event_lang USING btree (alias);


--
-- TOC entry 3336 (class 1259 OID 28594)
-- Name: event_lang_event_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX event_lang_event_language_key ON event_lang USING btree (event_id, language_id);


--
-- TOC entry 3253 (class 1259 OID 29219)
-- Name: fki_orders_products_product_variant_product_variant_id_fk; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_orders_products_product_variant_product_variant_id_fk ON orders_products USING btree (mod_id);


--
-- TOC entry 3258 (class 1259 OID 26138)
-- Name: fki_product_brand_fk; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_brand_fk ON product USING btree (brand_id);


--
-- TOC entry 3262 (class 1259 OID 26139)
-- Name: fki_product_id_fk; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_id_fk ON product_image USING btree (product_id);


--
-- TOC entry 3268 (class 1259 OID 26140)
-- Name: fki_product_stock_product_id_fkey; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_stock_product_id_fkey ON product_stock USING btree (product_id);


--
-- TOC entry 3269 (class 1259 OID 26141)
-- Name: fki_product_stock_product_variant_id_fkey; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_stock_product_variant_id_fkey ON product_stock USING btree (product_variant_id);


--
-- TOC entry 3270 (class 1259 OID 26142)
-- Name: fki_product_stock_stock_id_fkey; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_stock_stock_id_fkey ON product_stock USING btree (stock_id);


--
-- TOC entry 3263 (class 1259 OID 26143)
-- Name: fki_product_variant_id_fkey; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_variant_id_fkey ON product_image USING btree (product_variant_id);


--
-- TOC entry 3281 (class 1259 OID 26144)
-- Name: fki_product_variant_option_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_product_variant_option_id ON product_variant_option USING btree (option_id);


--
-- TOC entry 3292 (class 1259 OID 26146)
-- Name: fki_share_product_id_fkey; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_share_product_id_fkey ON share USING btree (product_id);


--
-- TOC entry 3293 (class 1259 OID 26147)
-- Name: fki_share_user_id_fkey; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fki_share_user_id_fkey ON share USING btree (user_id);


--
-- TOC entry 3203 (class 1259 OID 25448)
-- Name: idx-auth_item-type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "idx-auth_item-type" ON auth_item USING btree (type);


--
-- TOC entry 3337 (class 1259 OID 28619)
-- Name: orders_delivery_lang_orders_delivery_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX orders_delivery_lang_orders_delivery_language_key ON orders_delivery_lang USING btree (orders_delivery_id, language_id);


--
-- TOC entry 3338 (class 1259 OID 28653)
-- Name: orders_label_lang_orders_label_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX orders_label_lang_orders_label_language_key ON orders_label_lang USING btree (orders_label_id, language_id);


--
-- TOC entry 3327 (class 1259 OID 29039)
-- Name: page_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX page_lang_alias ON page_lang USING btree (alias);


--
-- TOC entry 3328 (class 1259 OID 28462)
-- Name: page_lang_page_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX page_lang_page_language_key ON page_lang USING btree (page_id, language_id);


--
-- TOC entry 3339 (class 1259 OID 29040)
-- Name: product_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_lang_alias ON product_lang USING btree (alias);


--
-- TOC entry 3340 (class 1259 OID 28689)
-- Name: product_lang_product_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_lang_product_language_key ON product_lang USING btree (product_id, language_id);


--
-- TOC entry 3261 (class 1259 OID 29128)
-- Name: product_remote_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_remote_id_uindex ON product USING btree (remote_id);


--
-- TOC entry 3341 (class 1259 OID 28706)
-- Name: product_spec_lang_product_spec_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_spec_lang_product_spec_language_key ON product_spec_lang USING btree (product_spec_id, language_id);


--
-- TOC entry 3318 (class 1259 OID 28292)
-- Name: product_to_project_product_variant_id_project_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_to_project_product_variant_id_project_id_uindex ON product_to_project USING btree (product_variant_id, project_id);


--
-- TOC entry 3342 (class 1259 OID 28729)
-- Name: product_unit_lang_product_unit_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_unit_lang_product_unit_language_key ON product_unit_lang USING btree (product_unit_id, language_id);


--
-- TOC entry 3343 (class 1259 OID 28744)
-- Name: product_variant_lang_product_variant_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_variant_lang_product_variant_language_key ON product_variant_lang USING btree (product_variant_id, language_id);


--
-- TOC entry 3279 (class 1259 OID 26148)
-- Name: product_variant_product_id_index; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX product_variant_product_id_index ON product_variant USING btree (product_id);


--
-- TOC entry 3280 (class 1259 OID 29138)
-- Name: product_variant_remote_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX product_variant_remote_id_uindex ON product_variant USING btree (remote_id);


--
-- TOC entry 3344 (class 1259 OID 29041)
-- Name: project_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX project_lang_alias ON project_lang USING btree (alias);


--
-- TOC entry 3345 (class 1259 OID 28763)
-- Name: project_lang_project_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX project_lang_project_language_key ON project_lang USING btree (project_id, language_id);


--
-- TOC entry 3347 (class 1259 OID 28816)
-- Name: seo_category_lang_seo_category_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX seo_category_lang_seo_category_language_key ON seo_category_lang USING btree (seo_category_id, language_id);


--
-- TOC entry 3348 (class 1259 OID 28833)
-- Name: seo_dynamic_lang_seo_dynamic_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX seo_dynamic_lang_seo_dynamic_language_key ON seo_dynamic_lang USING btree (seo_dynamic_id, language_id);


--
-- TOC entry 3346 (class 1259 OID 28802)
-- Name: seo_lang_seo_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX seo_lang_seo_language_key ON seo_lang USING btree (seo_id, language_id);


--
-- TOC entry 3349 (class 1259 OID 29042)
-- Name: service_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX service_lang_alias ON service_lang USING btree (alias);


--
-- TOC entry 3350 (class 1259 OID 28901)
-- Name: service_lang_service_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX service_lang_service_language_key ON service_lang USING btree (service_id, language_id);


--
-- TOC entry 3351 (class 1259 OID 28935)
-- Name: slider_image_lang_slider_image_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX slider_image_lang_slider_image_language_key ON slider_image_lang USING btree (slider_image_id, language_id);


--
-- TOC entry 3356 (class 1259 OID 29093)
-- Name: stock_lang_stock_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX stock_lang_stock_language_key ON stock_lang USING btree (stock_id, language_id);


--
-- TOC entry 3300 (class 1259 OID 26150)
-- Name: tax_group_is_filter_index; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX tax_group_is_filter_index ON tax_group USING btree (is_filter);


--
-- TOC entry 3352 (class 1259 OID 29043)
-- Name: tax_group_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX tax_group_lang_alias ON tax_group_lang USING btree (alias);


--
-- TOC entry 3353 (class 1259 OID 28969)
-- Name: tax_group_lang_tax_group_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX tax_group_lang_tax_group_language_key ON tax_group_lang USING btree (tax_group_id, language_id);


--
-- TOC entry 3303 (class 1259 OID 29155)
-- Name: tax_group_remote_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX tax_group_remote_id_uindex ON tax_group USING btree (remote_id);


--
-- TOC entry 3304 (class 1259 OID 26151)
-- Name: tax_group_sort_index; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX tax_group_sort_index ON tax_group USING btree (sort);


--
-- TOC entry 3354 (class 1259 OID 29044)
-- Name: tax_option_lang_alias; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX tax_option_lang_alias ON tax_option_lang USING btree (alias);


--
-- TOC entry 3355 (class 1259 OID 29000)
-- Name: tax_option_lang_tax_option_language_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX tax_option_lang_tax_option_language_key ON tax_option_lang USING btree (tax_option_id, language_id);


--
-- TOC entry 3309 (class 1259 OID 29163)
-- Name: tax_option_remote_id_uindex; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX tax_option_remote_id_uindex ON tax_option USING btree (remote_id);


--
-- TOC entry 3310 (class 1259 OID 26153)
-- Name: tax_option_sort_index; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX tax_option_sort_index ON tax_option USING btree (sort);


--
-- TOC entry 3311 (class 1259 OID 26154)
-- Name: tax_option_tax_group_id_index; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX tax_option_tax_group_id_index ON tax_option USING btree (tax_group_id);


--
-- TOC entry 3365 (class 2606 OID 26157)
-- Name: artbox_comment_id_artbox_comment; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_like
    ADD CONSTRAINT artbox_comment_id_artbox_comment FOREIGN KEY (artbox_comment_id) REFERENCES artbox_comment(artbox_comment_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3361 (class 2606 OID 26162)
-- Name: artbox_comment_pid_artbox_comment; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment
    ADD CONSTRAINT artbox_comment_pid_artbox_comment FOREIGN KEY (artbox_comment_pid) REFERENCES artbox_comment(artbox_comment_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3367 (class 2606 OID 26167)
-- Name: article_to_rating_article; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY article_to_rating
    ADD CONSTRAINT article_to_rating_article FOREIGN KEY (articles_id) REFERENCES articles(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3400 (class 2606 OID 28420)
-- Name: articles_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY articles_lang
    ADD CONSTRAINT articles_fk FOREIGN KEY (articles_id) REFERENCES articles(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3357 (class 2606 OID 25473)
-- Name: auth_assignment_item_name_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_assignment
    ADD CONSTRAINT auth_assignment_item_name_fkey FOREIGN KEY (item_name) REFERENCES auth_item(name);


--
-- TOC entry 3359 (class 2606 OID 25478)
-- Name: auth_item_child_child_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_item_child
    ADD CONSTRAINT auth_item_child_child_fkey FOREIGN KEY (child) REFERENCES auth_item(name);


--
-- TOC entry 3360 (class 2606 OID 25483)
-- Name: auth_item_child_parent_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_item_child
    ADD CONSTRAINT auth_item_child_parent_fkey FOREIGN KEY (parent) REFERENCES auth_item(name);


--
-- TOC entry 3358 (class 2606 OID 25488)
-- Name: auth_item_rule_name_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY auth_item
    ADD CONSTRAINT auth_item_rule_name_fkey FOREIGN KEY (rule_name) REFERENCES auth_rule(name);


--
-- TOC entry 3404 (class 2606 OID 28503)
-- Name: banner_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY banner_lang
    ADD CONSTRAINT banner_fk FOREIGN KEY (banner_id) REFERENCES banner(banner_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3406 (class 2606 OID 28517)
-- Name: bg_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY bg_lang
    ADD CONSTRAINT bg_fk FOREIGN KEY (bg_id) REFERENCES bg(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3408 (class 2606 OID 28540)
-- Name: brand_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY brand_lang
    ADD CONSTRAINT brand_fk FOREIGN KEY (brand_id) REFERENCES brand(brand_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3393 (class 2606 OID 27377)
-- Name: category_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group_to_category
    ADD CONSTRAINT category_fk FOREIGN KEY (category_id) REFERENCES category(category_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3410 (class 2606 OID 28557)
-- Name: category_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY category_lang
    ADD CONSTRAINT category_fk FOREIGN KEY (category_id) REFERENCES category(category_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3368 (class 2606 OID 26177)
-- Name: category_product_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY category
    ADD CONSTRAINT category_product_unit_fkey FOREIGN KEY (product_unit_id) REFERENCES product_unit(product_unit_id);


--
-- TOC entry 3412 (class 2606 OID 28595)
-- Name: event_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY event_lang
    ADD CONSTRAINT event_fk FOREIGN KEY (event_id) REFERENCES event(event_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3375 (class 2606 OID 27402)
-- Name: fki_category_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_category
    ADD CONSTRAINT fki_category_id FOREIGN KEY (category_id) REFERENCES category(category_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3374 (class 2606 OID 27397)
-- Name: fki_product_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_category
    ADD CONSTRAINT fki_product_id FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3394 (class 2606 OID 27382)
-- Name: fki_tax_option_tax_group_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_option
    ADD CONSTRAINT fki_tax_option_tax_group_id FOREIGN KEY (tax_group_id) REFERENCES tax_group(tax_group_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3401 (class 2606 OID 28425)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY articles_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3403 (class 2606 OID 28468)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY page_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3405 (class 2606 OID 28508)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY banner_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3407 (class 2606 OID 28522)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY bg_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3409 (class 2606 OID 28545)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY brand_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3411 (class 2606 OID 28562)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY category_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3413 (class 2606 OID 28600)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY event_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3415 (class 2606 OID 28625)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_delivery_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3417 (class 2606 OID 28659)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_label_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3419 (class 2606 OID 28695)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3421 (class 2606 OID 28712)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_spec_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3423 (class 2606 OID 28735)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_unit_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3425 (class 2606 OID 28750)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3427 (class 2606 OID 28769)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY project_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3429 (class 2606 OID 28808)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3431 (class 2606 OID 28822)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_category_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3433 (class 2606 OID 28839)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_dynamic_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3435 (class 2606 OID 28907)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY service_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3437 (class 2606 OID 28941)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider_image_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3439 (class 2606 OID 28975)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3441 (class 2606 OID 29006)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_option_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3443 (class 2606 OID 29099)
-- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY stock_lang
    ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 3414 (class 2606 OID 28620)
-- Name: orders_delivery_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_delivery_lang
    ADD CONSTRAINT orders_delivery_fk FOREIGN KEY (orders_delivery_id) REFERENCES orders_delivery(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3416 (class 2606 OID 28654)
-- Name: orders_label_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_label_lang
    ADD CONSTRAINT orders_label_fk FOREIGN KEY (orders_label_id) REFERENCES orders_label(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3370 (class 2606 OID 27251)
-- Name: orders_orders_delivery_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders
    ADD CONSTRAINT orders_orders_delivery_id_fk FOREIGN KEY (delivery) REFERENCES orders_delivery(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 3369 (class 2606 OID 27239)
-- Name: orders_orders_label_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders
    ADD CONSTRAINT orders_orders_label_id_fk FOREIGN KEY (label) REFERENCES orders_label(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 3371 (class 2606 OID 27267)
-- Name: orders_products_orders_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_products
    ADD CONSTRAINT orders_products_orders_id_fk FOREIGN KEY (order_id) REFERENCES orders(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3372 (class 2606 OID 29220)
-- Name: orders_products_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY orders_products
    ADD CONSTRAINT orders_products_product_variant_product_variant_id_fk FOREIGN KEY (mod_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 3402 (class 2606 OID 28463)
-- Name: page_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY page_lang
    ADD CONSTRAINT page_fk FOREIGN KEY (page_id) REFERENCES page(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3373 (class 2606 OID 27277)
-- Name: product_brand_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product
    ADD CONSTRAINT product_brand_fk FOREIGN KEY (brand_id) REFERENCES brand(brand_id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 3399 (class 2606 OID 28332)
-- Name: product_certificate_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_certificate
    ADD CONSTRAINT product_certificate_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3418 (class 2606 OID 28690)
-- Name: product_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_lang
    ADD CONSTRAINT product_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3377 (class 2606 OID 27297)
-- Name: product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_image
    ADD CONSTRAINT product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3378 (class 2606 OID 27302)
-- Name: product_option_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_option
    ADD CONSTRAINT product_option_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3379 (class 2606 OID 27307)
-- Name: product_option_tax_option_tax_option_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_option
    ADD CONSTRAINT product_option_tax_option_tax_option_id_fk FOREIGN KEY (option_id) REFERENCES tax_option(tax_option_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3420 (class 2606 OID 28707)
-- Name: product_spec_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_spec_lang
    ADD CONSTRAINT product_spec_fk FOREIGN KEY (product_spec_id) REFERENCES product_spec(product_spec_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3398 (class 2606 OID 28318)
-- Name: product_spec_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_spec
    ADD CONSTRAINT product_spec_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3382 (class 2606 OID 27317)
-- Name: product_stock_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_stock
    ADD CONSTRAINT product_stock_product_id_fkey FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3381 (class 2606 OID 27312)
-- Name: product_stock_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_stock
    ADD CONSTRAINT product_stock_product_variant_product_variant_id_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3380 (class 2606 OID 27194)
-- Name: product_stock_stock_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_stock
    ADD CONSTRAINT product_stock_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES stock(stock_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3396 (class 2606 OID 28282)
-- Name: product_to_project_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_project
    ADD CONSTRAINT product_to_project_product_variant_product_variant_id_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3397 (class 2606 OID 28287)
-- Name: product_to_project_project_project_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_project
    ADD CONSTRAINT product_to_project_project_project_id_fk FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3383 (class 2606 OID 26247)
-- Name: product_to_rating_product; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_to_rating
    ADD CONSTRAINT product_to_rating_product FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3422 (class 2606 OID 28730)
-- Name: product_unit_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_unit_lang
    ADD CONSTRAINT product_unit_fk FOREIGN KEY (product_unit_id) REFERENCES product_unit(product_unit_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3424 (class 2606 OID 28745)
-- Name: product_variant_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant_lang
    ADD CONSTRAINT product_variant_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3376 (class 2606 OID 27292)
-- Name: product_variant_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_image
    ADD CONSTRAINT product_variant_id_fkey FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3386 (class 2606 OID 27352)
-- Name: product_variant_option_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant_option
    ADD CONSTRAINT product_variant_option_product_variant_product_variant_id_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3387 (class 2606 OID 27357)
-- Name: product_variant_option_tax_option_tax_option_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant_option
    ADD CONSTRAINT product_variant_option_tax_option_tax_option_id_fk FOREIGN KEY (option_id) REFERENCES tax_option(tax_option_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3384 (class 2606 OID 27342)
-- Name: product_variant_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant
    ADD CONSTRAINT product_variant_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3385 (class 2606 OID 27347)
-- Name: product_variant_product_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY product_variant
    ADD CONSTRAINT product_variant_product_unit_fkey FOREIGN KEY (product_unit_id) REFERENCES product_unit(product_unit_id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 3426 (class 2606 OID 28764)
-- Name: project_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY project_lang
    ADD CONSTRAINT project_fk FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3395 (class 2606 OID 27441)
-- Name: project_image_project_project_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY project_image
    ADD CONSTRAINT project_image_project_project_id_fk FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3362 (class 2606 OID 26272)
-- Name: related_id_artbox_comment; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment
    ADD CONSTRAINT related_id_artbox_comment FOREIGN KEY (related_id) REFERENCES artbox_comment(artbox_comment_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3430 (class 2606 OID 28817)
-- Name: seo_category_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_category_lang
    ADD CONSTRAINT seo_category_fk FOREIGN KEY (seo_category_id) REFERENCES seo_category(seo_category_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3388 (class 2606 OID 27362)
-- Name: seo_category_seo_dynamic_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_dynamic
    ADD CONSTRAINT seo_category_seo_dynamic_fk FOREIGN KEY (seo_category_id) REFERENCES seo_category(seo_category_id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 3432 (class 2606 OID 28834)
-- Name: seo_dynamic_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_dynamic_lang
    ADD CONSTRAINT seo_dynamic_fk FOREIGN KEY (seo_dynamic_id) REFERENCES seo_dynamic(seo_dynamic_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3428 (class 2606 OID 28803)
-- Name: seo_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY seo_lang
    ADD CONSTRAINT seo_fk FOREIGN KEY (seo_id) REFERENCES seo(seo_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3434 (class 2606 OID 28902)
-- Name: service_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY service_lang
    ADD CONSTRAINT service_fk FOREIGN KEY (service_id) REFERENCES service(service_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3389 (class 2606 OID 26282)
-- Name: share_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY share
    ADD CONSTRAINT share_product_id_fkey FOREIGN KEY (product_id) REFERENCES product(product_id);


--
-- TOC entry 3390 (class 2606 OID 26287)
-- Name: share_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY share
    ADD CONSTRAINT share_user_id_fkey FOREIGN KEY (user_id) REFERENCES customer(id);


--
-- TOC entry 3436 (class 2606 OID 28936)
-- Name: slider_image_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider_image_lang
    ADD CONSTRAINT slider_image_fk FOREIGN KEY (slider_image_id) REFERENCES slider_image(slider_image_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3391 (class 2606 OID 27367)
-- Name: slider_slider_image_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY slider_image
    ADD CONSTRAINT slider_slider_image_fk FOREIGN KEY (slider_id) REFERENCES slider(slider_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3442 (class 2606 OID 29094)
-- Name: stock_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY stock_lang
    ADD CONSTRAINT stock_fk FOREIGN KEY (stock_id) REFERENCES stock(stock_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3392 (class 2606 OID 27372)
-- Name: tax_group_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group_to_category
    ADD CONSTRAINT tax_group_fk FOREIGN KEY (tax_group_id) REFERENCES tax_group(tax_group_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3438 (class 2606 OID 28970)
-- Name: tax_group_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_group_lang
    ADD CONSTRAINT tax_group_fk FOREIGN KEY (tax_group_id) REFERENCES tax_group(tax_group_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3440 (class 2606 OID 29001)
-- Name: tax_option_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY tax_option_lang
    ADD CONSTRAINT tax_option_fk FOREIGN KEY (tax_option_id) REFERENCES tax_option(tax_option_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3363 (class 2606 OID 26312)
-- Name: user_id_user; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment
    ADD CONSTRAINT user_id_user FOREIGN KEY (user_id) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3366 (class 2606 OID 26317)
-- Name: user_id_user; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_like
    ADD CONSTRAINT user_id_user FOREIGN KEY (user_id) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 3364 (class 2606 OID 26322)
-- Name: user_id_user; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY artbox_comment_rating
    ADD CONSTRAINT user_id_user FOREIGN KEY (user_id) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE;


-- Completed on 2016-10-28 16:08:21 EEST

--
-- PostgreSQL database dump complete
--

