Commit 60413205cf22e1b607e85a740be214530552db2b
1 parent
4d9ae2e7
For Leha commit.
Showing
57 changed files
with
1642 additions
and
5613 deletions
Show diff stats
backend/views/layouts/main-sidebar.php
| ... | ... | @@ -121,32 +121,6 @@ use yii\widgets\Menu; |
| 121 | 121 | 'options' => ['class'=>\Yii::$app->user->can('article') ? '' :'hide'], |
| 122 | 122 | ], |
| 123 | 123 | [ |
| 124 | - 'label' => 'Блог', | |
| 125 | - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-edit"></i> <span>{label}</span></a>', | |
| 126 | - 'options' => ['class'=>\Yii::$app->user->can('blog') ? '' :'hide'], | |
| 127 | - 'active' => preg_match('/^blog.*$/', $this->context->id) ? true : false, | |
| 128 | - 'items' => [ | |
| 129 | - [ | |
| 130 | - 'label' => 'Статьи', | |
| 131 | - 'url' => ['/blog/blog-article'], | |
| 132 | - 'options' => ['class'=>\Yii::$app->user->can('blog') ? '' :'hide'], | |
| 133 | - 'active' => preg_match('/.*blog-article.*$/', $this->context->id), | |
| 134 | - ], | |
| 135 | - [ | |
| 136 | - 'label' => 'Рубрики', | |
| 137 | - 'url' => ['/blog/blog-category'], | |
| 138 | - 'options' => ['class'=>\Yii::$app->user->can('blog') ? '' :'hide'], | |
| 139 | - 'active' => preg_match('/.*blog-category.*$/', $this->context->id), | |
| 140 | - ], | |
| 141 | - [ | |
| 142 | - 'label' => 'Тэги', | |
| 143 | - 'url' => ['/blog/blog-tag'], | |
| 144 | - 'options' => ['class'=>\Yii::$app->user->can('blog') ? '' :'hide'], | |
| 145 | - 'active' => preg_match('/.*blog-tag.*$/', $this->context->id), | |
| 146 | - ], | |
| 147 | - ] | |
| 148 | - ], | |
| 149 | - [ | |
| 150 | 124 | 'label' => 'Акции', |
| 151 | 125 | 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-piggy-bank"></i> <span>{label}</span></a>', |
| 152 | 126 | 'url' => ['/event/index'], | ... | ... |
backup_leha.sql
Changes suppressed. Click to show
| ... | ... | @@ -2,10 +2,10 @@ |
| 2 | 2 | -- PostgreSQL database dump |
| 3 | 3 | -- |
| 4 | 4 | |
| 5 | --- Dumped from database version 9.2.15 | |
| 5 | +-- Dumped from database version 9.5.4 | |
| 6 | 6 | -- Dumped by pg_dump version 9.5.4 |
| 7 | 7 | |
| 8 | --- Started on 2016-10-28 16:08:16 EEST | |
| 8 | +-- Started on 2016-10-31 16:40:15 EET | |
| 9 | 9 | |
| 10 | 10 | SET statement_timeout = 0; |
| 11 | 11 | SET lock_timeout = 0; |
| ... | ... | @@ -16,7 +16,7 @@ SET client_min_messages = warning; |
| 16 | 16 | SET row_security = off; |
| 17 | 17 | |
| 18 | 18 | -- |
| 19 | --- TOC entry 1 (class 3079 OID 12648) | |
| 19 | +-- TOC entry 1 (class 3079 OID 12397) | |
| 20 | 20 | -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - |
| 21 | 21 | -- |
| 22 | 22 | |
| ... | ... | @@ -24,7 +24,7 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | -- |
| 27 | --- TOC entry 3556 (class 0 OID 0) | |
| 27 | +-- TOC entry 2779 (class 0 OID 0) | |
| 28 | 28 | -- Dependencies: 1 |
| 29 | 29 | -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - |
| 30 | 30 | -- |
| ... | ... | @@ -37,177 +37,23 @@ SET search_path = public, pg_catalog; |
| 37 | 37 | SET default_with_oids = false; |
| 38 | 38 | |
| 39 | 39 | -- |
| 40 | --- TOC entry 178 (class 1259 OID 25655) | |
| 41 | --- Name: artbox_comment; Type: TABLE; Schema: public; Owner: - | |
| 40 | +-- TOC entry 190 (class 1259 OID 19920) | |
| 41 | +-- Name: article; Type: TABLE; Schema: public; Owner: - | |
| 42 | 42 | -- |
| 43 | 43 | |
| 44 | -CREATE TABLE artbox_comment ( | |
| 45 | - artbox_comment_id integer NOT NULL, | |
| 46 | - text text NOT NULL, | |
| 47 | - user_id integer, | |
| 48 | - username character varying(255), | |
| 49 | - email character varying(255), | |
| 50 | - date_add integer NOT NULL, | |
| 51 | - date_update integer NOT NULL, | |
| 52 | - date_delete integer, | |
| 53 | - status integer DEFAULT 1 NOT NULL, | |
| 54 | - artbox_comment_pid integer, | |
| 55 | - related_id integer, | |
| 56 | - ip character varying(255) NOT NULL, | |
| 57 | - info text, | |
| 58 | - entity character varying(255) DEFAULT ''::character varying NOT NULL, | |
| 59 | - entity_id integer DEFAULT 1 NOT NULL | |
| 60 | -); | |
| 61 | - | |
| 62 | - | |
| 63 | --- | |
| 64 | --- TOC entry 179 (class 1259 OID 25664) | |
| 65 | --- Name: artbox_comment_artbox_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 66 | --- | |
| 67 | - | |
| 68 | -CREATE SEQUENCE artbox_comment_artbox_comment_id_seq | |
| 69 | - START WITH 1 | |
| 70 | - INCREMENT BY 1 | |
| 71 | - NO MINVALUE | |
| 72 | - NO MAXVALUE | |
| 73 | - CACHE 1; | |
| 74 | - | |
| 75 | - | |
| 76 | --- | |
| 77 | --- TOC entry 3557 (class 0 OID 0) | |
| 78 | --- Dependencies: 179 | |
| 79 | --- Name: artbox_comment_artbox_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 80 | --- | |
| 81 | - | |
| 82 | -ALTER SEQUENCE artbox_comment_artbox_comment_id_seq OWNED BY artbox_comment.artbox_comment_id; | |
| 83 | - | |
| 84 | - | |
| 85 | --- | |
| 86 | --- TOC entry 180 (class 1259 OID 25666) | |
| 87 | --- Name: artbox_comment_rating; Type: TABLE; Schema: public; Owner: - | |
| 88 | --- | |
| 89 | - | |
| 90 | -CREATE TABLE artbox_comment_rating ( | |
| 91 | - artbox_comment_rating_id integer NOT NULL, | |
| 92 | - date_add integer NOT NULL, | |
| 93 | - date_update integer NOT NULL, | |
| 94 | - user_id integer, | |
| 95 | - value double precision, | |
| 96 | - model character varying(255) NOT NULL, | |
| 97 | - model_id integer NOT NULL | |
| 98 | -); | |
| 99 | - | |
| 100 | - | |
| 101 | --- | |
| 102 | --- TOC entry 181 (class 1259 OID 25669) | |
| 103 | --- Name: artbox_comment_rating_artbox_comment_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 104 | --- | |
| 105 | - | |
| 106 | -CREATE SEQUENCE artbox_comment_rating_artbox_comment_rating_id_seq | |
| 107 | - START WITH 1 | |
| 108 | - INCREMENT BY 1 | |
| 109 | - NO MINVALUE | |
| 110 | - NO MAXVALUE | |
| 111 | - CACHE 1; | |
| 112 | - | |
| 113 | - | |
| 114 | --- | |
| 115 | --- TOC entry 3558 (class 0 OID 0) | |
| 116 | --- Dependencies: 181 | |
| 117 | --- Name: artbox_comment_rating_artbox_comment_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 118 | --- | |
| 119 | - | |
| 120 | -ALTER SEQUENCE artbox_comment_rating_artbox_comment_rating_id_seq OWNED BY artbox_comment_rating.artbox_comment_rating_id; | |
| 121 | - | |
| 122 | - | |
| 123 | --- | |
| 124 | --- TOC entry 182 (class 1259 OID 25671) | |
| 125 | --- Name: artbox_like; Type: TABLE; Schema: public; Owner: - | |
| 126 | --- | |
| 127 | - | |
| 128 | -CREATE TABLE artbox_like ( | |
| 129 | - artbox_like_id integer NOT NULL, | |
| 130 | - artbox_comment_id integer NOT NULL, | |
| 131 | - user_id integer, | |
| 132 | - date_add integer NOT NULL, | |
| 133 | - is_like integer DEFAULT 1 NOT NULL | |
| 134 | -); | |
| 135 | - | |
| 136 | - | |
| 137 | --- | |
| 138 | --- TOC entry 183 (class 1259 OID 25675) | |
| 139 | --- Name: artbox_like_artbox_like_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 140 | --- | |
| 141 | - | |
| 142 | -CREATE SEQUENCE artbox_like_artbox_like_id_seq | |
| 143 | - START WITH 1 | |
| 144 | - INCREMENT BY 1 | |
| 145 | - NO MINVALUE | |
| 146 | - NO MAXVALUE | |
| 147 | - CACHE 1; | |
| 148 | - | |
| 149 | - | |
| 150 | --- | |
| 151 | --- TOC entry 3559 (class 0 OID 0) | |
| 152 | --- Dependencies: 183 | |
| 153 | --- Name: artbox_like_artbox_like_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 154 | --- | |
| 155 | - | |
| 156 | -ALTER SEQUENCE artbox_like_artbox_like_id_seq OWNED BY artbox_like.artbox_like_id; | |
| 157 | - | |
| 158 | - | |
| 159 | --- | |
| 160 | --- TOC entry 184 (class 1259 OID 25677) | |
| 161 | --- Name: article_to_rating; Type: TABLE; Schema: public; Owner: - | |
| 162 | --- | |
| 163 | - | |
| 164 | -CREATE TABLE article_to_rating ( | |
| 165 | - article_to_rating_id integer NOT NULL, | |
| 166 | - articles_id integer NOT NULL, | |
| 167 | - value double precision DEFAULT 0 | |
| 168 | -); | |
| 169 | - | |
| 170 | - | |
| 171 | --- | |
| 172 | --- TOC entry 185 (class 1259 OID 25681) | |
| 173 | --- Name: article_to_rating_article_to_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 174 | --- | |
| 175 | - | |
| 176 | -CREATE SEQUENCE article_to_rating_article_to_rating_id_seq | |
| 177 | - START WITH 1 | |
| 178 | - INCREMENT BY 1 | |
| 179 | - NO MINVALUE | |
| 180 | - NO MAXVALUE | |
| 181 | - CACHE 1; | |
| 182 | - | |
| 183 | - | |
| 184 | --- | |
| 185 | --- TOC entry 3560 (class 0 OID 0) | |
| 186 | --- Dependencies: 185 | |
| 187 | --- Name: article_to_rating_article_to_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 188 | --- | |
| 189 | - | |
| 190 | -ALTER SEQUENCE article_to_rating_article_to_rating_id_seq OWNED BY article_to_rating.article_to_rating_id; | |
| 191 | - | |
| 192 | - | |
| 193 | --- | |
| 194 | --- TOC entry 186 (class 1259 OID 25683) | |
| 195 | --- Name: articles; Type: TABLE; Schema: public; Owner: - | |
| 196 | --- | |
| 197 | - | |
| 198 | -CREATE TABLE articles ( | |
| 44 | +CREATE TABLE article ( | |
| 199 | 45 | id integer NOT NULL, |
| 200 | - image character varying(255) NOT NULL, | |
| 201 | - date integer | |
| 46 | + image character varying(255), | |
| 47 | + created_at integer | |
| 202 | 48 | ); |
| 203 | 49 | |
| 204 | 50 | |
| 205 | 51 | -- |
| 206 | --- TOC entry 187 (class 1259 OID 25689) | |
| 207 | --- Name: articles_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 52 | +-- TOC entry 192 (class 1259 OID 19943) | |
| 53 | +-- Name: article_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 208 | 54 | -- |
| 209 | 55 | |
| 210 | -CREATE SEQUENCE articles_id_seq | |
| 56 | +CREATE SEQUENCE article_id_seq | |
| 211 | 57 | START WITH 1 |
| 212 | 58 | INCREMENT BY 1 |
| 213 | 59 | NO MINVALUE |
| ... | ... | @@ -216,21 +62,21 @@ CREATE SEQUENCE articles_id_seq |
| 216 | 62 | |
| 217 | 63 | |
| 218 | 64 | -- |
| 219 | --- TOC entry 3561 (class 0 OID 0) | |
| 220 | --- Dependencies: 187 | |
| 221 | --- Name: articles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 65 | +-- TOC entry 2780 (class 0 OID 0) | |
| 66 | +-- Dependencies: 192 | |
| 67 | +-- Name: article_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 222 | 68 | -- |
| 223 | 69 | |
| 224 | -ALTER SEQUENCE articles_id_seq OWNED BY articles.id; | |
| 70 | +ALTER SEQUENCE article_id_seq OWNED BY article.id; | |
| 225 | 71 | |
| 226 | 72 | |
| 227 | 73 | -- |
| 228 | --- TOC entry 260 (class 1259 OID 28413) | |
| 229 | --- Name: articles_lang; Type: TABLE; Schema: public; Owner: - | |
| 74 | +-- TOC entry 191 (class 1259 OID 19925) | |
| 75 | +-- Name: article_lang; Type: TABLE; Schema: public; Owner: - | |
| 230 | 76 | -- |
| 231 | 77 | |
| 232 | -CREATE TABLE articles_lang ( | |
| 233 | - articles_id integer NOT NULL, | |
| 78 | +CREATE TABLE article_lang ( | |
| 79 | + article_id integer NOT NULL, | |
| 234 | 80 | language_id integer NOT NULL, |
| 235 | 81 | title character varying(255) NOT NULL, |
| 236 | 82 | body text NOT NULL, |
| ... | ... | @@ -245,19 +91,19 @@ CREATE TABLE articles_lang ( |
| 245 | 91 | |
| 246 | 92 | |
| 247 | 93 | -- |
| 248 | --- TOC entry 169 (class 1259 OID 25051) | |
| 94 | +-- TOC entry 189 (class 1259 OID 19897) | |
| 249 | 95 | -- Name: auth_assignment; Type: TABLE; Schema: public; Owner: - |
| 250 | 96 | -- |
| 251 | 97 | |
| 252 | 98 | CREATE TABLE auth_assignment ( |
| 253 | 99 | item_name character varying(64) NOT NULL, |
| 254 | - created_at integer, | |
| 255 | - user_id integer | |
| 100 | + user_id character varying(64) NOT NULL, | |
| 101 | + created_at integer | |
| 256 | 102 | ); |
| 257 | 103 | |
| 258 | 104 | |
| 259 | 105 | -- |
| 260 | --- TOC entry 170 (class 1259 OID 25054) | |
| 106 | +-- TOC entry 187 (class 1259 OID 19868) | |
| 261 | 107 | -- Name: auth_item; Type: TABLE; Schema: public; Owner: - |
| 262 | 108 | -- |
| 263 | 109 | |
| ... | ... | @@ -273,7 +119,7 @@ CREATE TABLE auth_item ( |
| 273 | 119 | |
| 274 | 120 | |
| 275 | 121 | -- |
| 276 | --- TOC entry 171 (class 1259 OID 25060) | |
| 122 | +-- TOC entry 188 (class 1259 OID 19882) | |
| 277 | 123 | -- Name: auth_item_child; Type: TABLE; Schema: public; Owner: - |
| 278 | 124 | -- |
| 279 | 125 | |
| ... | ... | @@ -284,7 +130,7 @@ CREATE TABLE auth_item_child ( |
| 284 | 130 | |
| 285 | 131 | |
| 286 | 132 | -- |
| 287 | --- TOC entry 172 (class 1259 OID 25063) | |
| 133 | +-- TOC entry 186 (class 1259 OID 19860) | |
| 288 | 134 | -- Name: auth_rule; Type: TABLE; Schema: public; Owner: - |
| 289 | 135 | -- |
| 290 | 136 | |
| ... | ... | @@ -297,19 +143,19 @@ CREATE TABLE auth_rule ( |
| 297 | 143 | |
| 298 | 144 | |
| 299 | 145 | -- |
| 300 | --- TOC entry 188 (class 1259 OID 25691) | |
| 146 | +-- TOC entry 193 (class 1259 OID 19946) | |
| 301 | 147 | -- Name: banner; Type: TABLE; Schema: public; Owner: - |
| 302 | 148 | -- |
| 303 | 149 | |
| 304 | 150 | CREATE TABLE banner ( |
| 305 | - banner_id integer NOT NULL, | |
| 151 | + id integer NOT NULL, | |
| 306 | 152 | url character varying(255), |
| 307 | 153 | status smallint |
| 308 | 154 | ); |
| 309 | 155 | |
| 310 | 156 | |
| 311 | 157 | -- |
| 312 | --- TOC entry 189 (class 1259 OID 25697) | |
| 158 | +-- TOC entry 194 (class 1259 OID 19949) | |
| 313 | 159 | -- Name: banner_banner_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 314 | 160 | -- |
| 315 | 161 | |
| ... | ... | @@ -322,16 +168,16 @@ CREATE SEQUENCE banner_banner_id_seq |
| 322 | 168 | |
| 323 | 169 | |
| 324 | 170 | -- |
| 325 | --- TOC entry 3562 (class 0 OID 0) | |
| 326 | --- Dependencies: 189 | |
| 171 | +-- TOC entry 2781 (class 0 OID 0) | |
| 172 | +-- Dependencies: 194 | |
| 327 | 173 | -- Name: banner_banner_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 328 | 174 | -- |
| 329 | 175 | |
| 330 | -ALTER SEQUENCE banner_banner_id_seq OWNED BY banner.banner_id; | |
| 176 | +ALTER SEQUENCE banner_banner_id_seq OWNED BY banner.id; | |
| 331 | 177 | |
| 332 | 178 | |
| 333 | 179 | -- |
| 334 | --- TOC entry 262 (class 1259 OID 28496) | |
| 180 | +-- TOC entry 195 (class 1259 OID 19951) | |
| 335 | 181 | -- Name: banner_lang; Type: TABLE; Schema: public; Owner: - |
| 336 | 182 | -- |
| 337 | 183 | |
| ... | ... | @@ -345,7 +191,7 @@ CREATE TABLE banner_lang ( |
| 345 | 191 | |
| 346 | 192 | |
| 347 | 193 | -- |
| 348 | --- TOC entry 190 (class 1259 OID 25699) | |
| 194 | +-- TOC entry 196 (class 1259 OID 19957) | |
| 349 | 195 | -- Name: bg; Type: TABLE; Schema: public; Owner: - |
| 350 | 196 | -- |
| 351 | 197 | |
| ... | ... | @@ -357,7 +203,7 @@ CREATE TABLE bg ( |
| 357 | 203 | |
| 358 | 204 | |
| 359 | 205 | -- |
| 360 | --- TOC entry 191 (class 1259 OID 25705) | |
| 206 | +-- TOC entry 197 (class 1259 OID 19963) | |
| 361 | 207 | -- Name: bg_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 362 | 208 | -- |
| 363 | 209 | |
| ... | ... | @@ -370,8 +216,8 @@ CREATE SEQUENCE bg_id_seq |
| 370 | 216 | |
| 371 | 217 | |
| 372 | 218 | -- |
| 373 | --- TOC entry 3563 (class 0 OID 0) | |
| 374 | --- Dependencies: 191 | |
| 219 | +-- TOC entry 2782 (class 0 OID 0) | |
| 220 | +-- Dependencies: 197 | |
| 375 | 221 | -- Name: bg_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 376 | 222 | -- |
| 377 | 223 | |
| ... | ... | @@ -379,7 +225,7 @@ ALTER SEQUENCE bg_id_seq OWNED BY bg.id; |
| 379 | 225 | |
| 380 | 226 | |
| 381 | 227 | -- |
| 382 | --- TOC entry 263 (class 1259 OID 28513) | |
| 228 | +-- TOC entry 198 (class 1259 OID 19965) | |
| 383 | 229 | -- Name: bg_lang; Type: TABLE; Schema: public; Owner: - |
| 384 | 230 | -- |
| 385 | 231 | |
| ... | ... | @@ -391,12 +237,12 @@ CREATE TABLE bg_lang ( |
| 391 | 237 | |
| 392 | 238 | |
| 393 | 239 | -- |
| 394 | --- TOC entry 192 (class 1259 OID 25716) | |
| 240 | +-- TOC entry 199 (class 1259 OID 19968) | |
| 395 | 241 | -- Name: brand; Type: TABLE; Schema: public; Owner: - |
| 396 | 242 | -- |
| 397 | 243 | |
| 398 | 244 | CREATE TABLE brand ( |
| 399 | - brand_id integer NOT NULL, | |
| 245 | + id integer NOT NULL, | |
| 400 | 246 | image character varying(255), |
| 401 | 247 | in_menu boolean, |
| 402 | 248 | remote_id character varying(255) |
| ... | ... | @@ -404,7 +250,7 @@ CREATE TABLE brand ( |
| 404 | 250 | |
| 405 | 251 | |
| 406 | 252 | -- |
| 407 | --- TOC entry 193 (class 1259 OID 25722) | |
| 253 | +-- TOC entry 200 (class 1259 OID 19974) | |
| 408 | 254 | -- Name: brand_brand_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 409 | 255 | -- |
| 410 | 256 | |
| ... | ... | @@ -417,38 +263,38 @@ CREATE SEQUENCE brand_brand_id_seq |
| 417 | 263 | |
| 418 | 264 | |
| 419 | 265 | -- |
| 420 | --- TOC entry 3564 (class 0 OID 0) | |
| 421 | --- Dependencies: 193 | |
| 266 | +-- TOC entry 2783 (class 0 OID 0) | |
| 267 | +-- Dependencies: 200 | |
| 422 | 268 | -- Name: brand_brand_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 423 | 269 | -- |
| 424 | 270 | |
| 425 | -ALTER SEQUENCE brand_brand_id_seq OWNED BY brand.brand_id; | |
| 271 | +ALTER SEQUENCE brand_brand_id_seq OWNED BY brand.id; | |
| 426 | 272 | |
| 427 | 273 | |
| 428 | 274 | -- |
| 429 | --- TOC entry 264 (class 1259 OID 28533) | |
| 275 | +-- TOC entry 201 (class 1259 OID 19976) | |
| 430 | 276 | -- Name: brand_lang; Type: TABLE; Schema: public; Owner: - |
| 431 | 277 | -- |
| 432 | 278 | |
| 433 | 279 | CREATE TABLE brand_lang ( |
| 434 | 280 | brand_id integer NOT NULL, |
| 435 | 281 | language_id integer NOT NULL, |
| 436 | - name character varying(255) NOT NULL, | |
| 282 | + title character varying(255) NOT NULL, | |
| 437 | 283 | meta_title character varying(255), |
| 438 | 284 | meta_robots character varying(255), |
| 439 | - meta_desc character varying(255), | |
| 285 | + meta_description character varying(255), | |
| 440 | 286 | seo_text text, |
| 441 | 287 | alias character varying(255) |
| 442 | 288 | ); |
| 443 | 289 | |
| 444 | 290 | |
| 445 | 291 | -- |
| 446 | --- TOC entry 194 (class 1259 OID 25724) | |
| 292 | +-- TOC entry 202 (class 1259 OID 19982) | |
| 447 | 293 | -- Name: category; Type: TABLE; Schema: public; Owner: - |
| 448 | 294 | -- |
| 449 | 295 | |
| 450 | 296 | CREATE TABLE category ( |
| 451 | - category_id integer NOT NULL, | |
| 297 | + id integer NOT NULL, | |
| 452 | 298 | parent_id integer DEFAULT 0 NOT NULL, |
| 453 | 299 | path integer[], |
| 454 | 300 | depth integer DEFAULT 0 NOT NULL, |
| ... | ... | @@ -459,7 +305,7 @@ CREATE TABLE category ( |
| 459 | 305 | |
| 460 | 306 | |
| 461 | 307 | -- |
| 462 | --- TOC entry 195 (class 1259 OID 25733) | |
| 308 | +-- TOC entry 203 (class 1259 OID 19990) | |
| 463 | 309 | -- Name: category_category_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 464 | 310 | -- |
| 465 | 311 | |
| ... | ... | @@ -472,26 +318,26 @@ CREATE SEQUENCE category_category_id_seq |
| 472 | 318 | |
| 473 | 319 | |
| 474 | 320 | -- |
| 475 | --- TOC entry 3565 (class 0 OID 0) | |
| 476 | --- Dependencies: 195 | |
| 321 | +-- TOC entry 2784 (class 0 OID 0) | |
| 322 | +-- Dependencies: 203 | |
| 477 | 323 | -- Name: category_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 478 | 324 | -- |
| 479 | 325 | |
| 480 | -ALTER SEQUENCE category_category_id_seq OWNED BY category.category_id; | |
| 326 | +ALTER SEQUENCE category_category_id_seq OWNED BY category.id; | |
| 481 | 327 | |
| 482 | 328 | |
| 483 | 329 | -- |
| 484 | --- TOC entry 265 (class 1259 OID 28550) | |
| 330 | +-- TOC entry 204 (class 1259 OID 19992) | |
| 485 | 331 | -- Name: category_lang; Type: TABLE; Schema: public; Owner: - |
| 486 | 332 | -- |
| 487 | 333 | |
| 488 | 334 | CREATE TABLE category_lang ( |
| 489 | 335 | category_id integer NOT NULL, |
| 490 | 336 | language_id integer NOT NULL, |
| 491 | - name character varying(255) NOT NULL, | |
| 337 | + title character varying(255) NOT NULL, | |
| 492 | 338 | meta_title character varying(255), |
| 493 | 339 | meta_robots character varying(255), |
| 494 | - meta_desc character varying(255), | |
| 340 | + meta_description character varying(255), | |
| 495 | 341 | seo_text text, |
| 496 | 342 | h1 character varying(255), |
| 497 | 343 | alias character varying(255) |
| ... | ... | @@ -499,41 +345,7 @@ CREATE TABLE category_lang ( |
| 499 | 345 | |
| 500 | 346 | |
| 501 | 347 | -- |
| 502 | --- TOC entry 259 (class 1259 OID 28345) | |
| 503 | --- Name: certificate; Type: TABLE; Schema: public; Owner: - | |
| 504 | --- | |
| 505 | - | |
| 506 | -CREATE TABLE certificate ( | |
| 507 | - certificate_id integer NOT NULL, | |
| 508 | - name character varying(255) NOT NULL, | |
| 509 | - link character varying(255) | |
| 510 | -); | |
| 511 | - | |
| 512 | - | |
| 513 | --- | |
| 514 | --- TOC entry 258 (class 1259 OID 28343) | |
| 515 | --- Name: certificate_certificate_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 516 | --- | |
| 517 | - | |
| 518 | -CREATE SEQUENCE certificate_certificate_id_seq | |
| 519 | - START WITH 1 | |
| 520 | - INCREMENT BY 1 | |
| 521 | - NO MINVALUE | |
| 522 | - NO MAXVALUE | |
| 523 | - CACHE 1; | |
| 524 | - | |
| 525 | - | |
| 526 | --- | |
| 527 | --- TOC entry 3566 (class 0 OID 0) | |
| 528 | --- Dependencies: 258 | |
| 529 | --- Name: certificate_certificate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 530 | --- | |
| 531 | - | |
| 532 | -ALTER SEQUENCE certificate_certificate_id_seq OWNED BY certificate.certificate_id; | |
| 533 | - | |
| 534 | - | |
| 535 | --- | |
| 536 | --- TOC entry 196 (class 1259 OID 25745) | |
| 348 | +-- TOC entry 205 (class 1259 OID 19998) | |
| 537 | 349 | -- Name: customer; Type: TABLE; Schema: public; Owner: - |
| 538 | 350 | -- |
| 539 | 351 | |
| ... | ... | @@ -561,7 +373,7 @@ CREATE TABLE customer ( |
| 561 | 373 | |
| 562 | 374 | |
| 563 | 375 | -- |
| 564 | --- TOC entry 197 (class 1259 OID 25752) | |
| 376 | +-- TOC entry 206 (class 1259 OID 20004) | |
| 565 | 377 | -- Name: customer_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 566 | 378 | -- |
| 567 | 379 | |
| ... | ... | @@ -574,8 +386,8 @@ CREATE SEQUENCE customer_id_seq |
| 574 | 386 | |
| 575 | 387 | |
| 576 | 388 | -- |
| 577 | --- TOC entry 3567 (class 0 OID 0) | |
| 578 | --- Dependencies: 197 | |
| 389 | +-- TOC entry 2785 (class 0 OID 0) | |
| 390 | +-- Dependencies: 206 | |
| 579 | 391 | -- Name: customer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 580 | 392 | -- |
| 581 | 393 | |
| ... | ... | @@ -583,12 +395,12 @@ ALTER SEQUENCE customer_id_seq OWNED BY customer.id; |
| 583 | 395 | |
| 584 | 396 | |
| 585 | 397 | -- |
| 586 | --- TOC entry 198 (class 1259 OID 25754) | |
| 398 | +-- TOC entry 207 (class 1259 OID 20006) | |
| 587 | 399 | -- Name: event; Type: TABLE; Schema: public; Owner: - |
| 588 | 400 | -- |
| 589 | 401 | |
| 590 | 402 | CREATE TABLE event ( |
| 591 | - event_id integer NOT NULL, | |
| 403 | + id integer NOT NULL, | |
| 592 | 404 | image character varying(255), |
| 593 | 405 | created_at integer, |
| 594 | 406 | updated_at integer, |
| ... | ... | @@ -597,7 +409,7 @@ CREATE TABLE event ( |
| 597 | 409 | |
| 598 | 410 | |
| 599 | 411 | -- |
| 600 | --- TOC entry 199 (class 1259 OID 25760) | |
| 412 | +-- TOC entry 208 (class 1259 OID 20009) | |
| 601 | 413 | -- Name: event_event_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 602 | 414 | -- |
| 603 | 415 | |
| ... | ... | @@ -610,26 +422,26 @@ CREATE SEQUENCE event_event_id_seq |
| 610 | 422 | |
| 611 | 423 | |
| 612 | 424 | -- |
| 613 | --- TOC entry 3568 (class 0 OID 0) | |
| 614 | --- Dependencies: 199 | |
| 425 | +-- TOC entry 2786 (class 0 OID 0) | |
| 426 | +-- Dependencies: 208 | |
| 615 | 427 | -- Name: event_event_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 616 | 428 | -- |
| 617 | 429 | |
| 618 | -ALTER SEQUENCE event_event_id_seq OWNED BY event.event_id; | |
| 430 | +ALTER SEQUENCE event_event_id_seq OWNED BY event.id; | |
| 619 | 431 | |
| 620 | 432 | |
| 621 | 433 | -- |
| 622 | --- TOC entry 266 (class 1259 OID 28588) | |
| 434 | +-- TOC entry 209 (class 1259 OID 20011) | |
| 623 | 435 | -- Name: event_lang; Type: TABLE; Schema: public; Owner: - |
| 624 | 436 | -- |
| 625 | 437 | |
| 626 | 438 | CREATE TABLE event_lang ( |
| 627 | 439 | event_id integer NOT NULL, |
| 628 | 440 | language_id integer NOT NULL, |
| 629 | - name character varying(255) NOT NULL, | |
| 441 | + title character varying(255) NOT NULL, | |
| 630 | 442 | body text NOT NULL, |
| 631 | 443 | meta_title character varying(255), |
| 632 | - description character varying(255), | |
| 444 | + meta_description character varying(255), | |
| 633 | 445 | seo_text text, |
| 634 | 446 | h1 character varying(255), |
| 635 | 447 | alias character varying(255) |
| ... | ... | @@ -637,21 +449,21 @@ CREATE TABLE event_lang ( |
| 637 | 449 | |
| 638 | 450 | |
| 639 | 451 | -- |
| 640 | --- TOC entry 200 (class 1259 OID 25762) | |
| 452 | +-- TOC entry 210 (class 1259 OID 20017) | |
| 641 | 453 | -- Name: feedback; Type: TABLE; Schema: public; Owner: - |
| 642 | 454 | -- |
| 643 | 455 | |
| 644 | 456 | CREATE TABLE feedback ( |
| 645 | - feedback_id integer NOT NULL, | |
| 457 | + id integer NOT NULL, | |
| 646 | 458 | name character varying(255), |
| 647 | 459 | phone character varying(255) NOT NULL, |
| 648 | - date_add integer, | |
| 460 | + created_at integer, | |
| 649 | 461 | ip character varying(255) |
| 650 | 462 | ); |
| 651 | 463 | |
| 652 | 464 | |
| 653 | 465 | -- |
| 654 | --- TOC entry 201 (class 1259 OID 25768) | |
| 466 | +-- TOC entry 211 (class 1259 OID 20023) | |
| 655 | 467 | -- Name: feedback_feedback_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 656 | 468 | -- |
| 657 | 469 | |
| ... | ... | @@ -664,33 +476,33 @@ CREATE SEQUENCE feedback_feedback_id_seq |
| 664 | 476 | |
| 665 | 477 | |
| 666 | 478 | -- |
| 667 | --- TOC entry 3569 (class 0 OID 0) | |
| 668 | --- Dependencies: 201 | |
| 479 | +-- TOC entry 2787 (class 0 OID 0) | |
| 480 | +-- Dependencies: 211 | |
| 669 | 481 | -- Name: feedback_feedback_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 670 | 482 | -- |
| 671 | 483 | |
| 672 | -ALTER SEQUENCE feedback_feedback_id_seq OWNED BY feedback.feedback_id; | |
| 484 | +ALTER SEQUENCE feedback_feedback_id_seq OWNED BY feedback.id; | |
| 673 | 485 | |
| 674 | 486 | |
| 675 | 487 | -- |
| 676 | --- TOC entry 173 (class 1259 OID 25136) | |
| 488 | +-- TOC entry 185 (class 1259 OID 19842) | |
| 677 | 489 | -- Name: language; Type: TABLE; Schema: public; Owner: - |
| 678 | 490 | -- |
| 679 | 491 | |
| 680 | 492 | CREATE TABLE language ( |
| 681 | - language_id integer NOT NULL, | |
| 493 | + id integer NOT NULL, | |
| 682 | 494 | url character varying(255) NOT NULL, |
| 683 | 495 | local character varying(255) NOT NULL, |
| 684 | 496 | name character varying(255) NOT NULL, |
| 685 | 497 | "default" boolean DEFAULT false NOT NULL, |
| 686 | - date_create integer NOT NULL, | |
| 687 | - date_update integer NOT NULL, | |
| 498 | + created_at integer NOT NULL, | |
| 499 | + updated_at integer NOT NULL, | |
| 688 | 500 | status boolean DEFAULT false NOT NULL |
| 689 | 501 | ); |
| 690 | 502 | |
| 691 | 503 | |
| 692 | 504 | -- |
| 693 | --- TOC entry 174 (class 1259 OID 25143) | |
| 505 | +-- TOC entry 184 (class 1259 OID 19840) | |
| 694 | 506 | -- Name: language_language_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 695 | 507 | -- |
| 696 | 508 | |
| ... | ... | @@ -703,16 +515,16 @@ CREATE SEQUENCE language_language_id_seq |
| 703 | 515 | |
| 704 | 516 | |
| 705 | 517 | -- |
| 706 | --- TOC entry 3570 (class 0 OID 0) | |
| 707 | --- Dependencies: 174 | |
| 518 | +-- TOC entry 2788 (class 0 OID 0) | |
| 519 | +-- Dependencies: 184 | |
| 708 | 520 | -- Name: language_language_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 709 | 521 | -- |
| 710 | 522 | |
| 711 | -ALTER SEQUENCE language_language_id_seq OWNED BY language.language_id; | |
| 523 | +ALTER SEQUENCE language_language_id_seq OWNED BY language.id; | |
| 712 | 524 | |
| 713 | 525 | |
| 714 | 526 | -- |
| 715 | --- TOC entry 175 (class 1259 OID 25145) | |
| 527 | +-- TOC entry 181 (class 1259 OID 19817) | |
| 716 | 528 | -- Name: migration; Type: TABLE; Schema: public; Owner: - |
| 717 | 529 | -- |
| 718 | 530 | |
| ... | ... | @@ -723,11 +535,11 @@ CREATE TABLE migration ( |
| 723 | 535 | |
| 724 | 536 | |
| 725 | 537 | -- |
| 726 | --- TOC entry 202 (class 1259 OID 25778) | |
| 727 | --- Name: orders; Type: TABLE; Schema: public; Owner: - | |
| 538 | +-- TOC entry 212 (class 1259 OID 20025) | |
| 539 | +-- Name: order; Type: TABLE; Schema: public; Owner: - | |
| 728 | 540 | -- |
| 729 | 541 | |
| 730 | -CREATE TABLE orders ( | |
| 542 | +CREATE TABLE "order" ( | |
| 731 | 543 | id integer NOT NULL, |
| 732 | 544 | user_id integer, |
| 733 | 545 | name character varying(255) NOT NULL, |
| ... | ... | @@ -758,11 +570,11 @@ CREATE TABLE orders ( |
| 758 | 570 | |
| 759 | 571 | |
| 760 | 572 | -- |
| 761 | --- TOC entry 203 (class 1259 OID 25784) | |
| 762 | --- Name: orders_delivery; Type: TABLE; Schema: public; Owner: - | |
| 573 | +-- TOC entry 213 (class 1259 OID 20031) | |
| 574 | +-- Name: order_delivery; Type: TABLE; Schema: public; Owner: - | |
| 763 | 575 | -- |
| 764 | 576 | |
| 765 | -CREATE TABLE orders_delivery ( | |
| 577 | +CREATE TABLE order_delivery ( | |
| 766 | 578 | id integer NOT NULL, |
| 767 | 579 | parent_id integer, |
| 768 | 580 | value integer, |
| ... | ... | @@ -771,79 +583,87 @@ CREATE TABLE orders_delivery ( |
| 771 | 583 | |
| 772 | 584 | |
| 773 | 585 | -- |
| 774 | --- TOC entry 204 (class 1259 OID 25790) | |
| 775 | --- Name: orders_delivery_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 586 | +-- TOC entry 215 (class 1259 OID 20036) | |
| 587 | +-- Name: order_delivery_lang; Type: TABLE; Schema: public; Owner: - | |
| 776 | 588 | -- |
| 777 | 589 | |
| 778 | -CREATE SEQUENCE orders_delivery_id_seq | |
| 779 | - START WITH 1 | |
| 780 | - INCREMENT BY 1 | |
| 781 | - NO MINVALUE | |
| 782 | - NO MAXVALUE | |
| 783 | - CACHE 1; | |
| 590 | +CREATE TABLE order_delivery_lang ( | |
| 591 | + order_delivery_id integer NOT NULL, | |
| 592 | + language_id integer NOT NULL, | |
| 593 | + title character varying(255) NOT NULL, | |
| 594 | + text text NOT NULL | |
| 595 | +); | |
| 784 | 596 | |
| 785 | 597 | |
| 786 | 598 | -- |
| 787 | --- TOC entry 3571 (class 0 OID 0) | |
| 788 | --- Dependencies: 204 | |
| 789 | --- Name: orders_delivery_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 599 | +-- TOC entry 217 (class 1259 OID 20044) | |
| 600 | +-- Name: order_label; Type: TABLE; Schema: public; Owner: - | |
| 790 | 601 | -- |
| 791 | 602 | |
| 792 | -ALTER SEQUENCE orders_delivery_id_seq OWNED BY orders_delivery.id; | |
| 603 | +CREATE TABLE order_label ( | |
| 604 | + id integer NOT NULL, | |
| 605 | + label character varying(255) | |
| 606 | +); | |
| 793 | 607 | |
| 794 | 608 | |
| 795 | 609 | -- |
| 796 | --- TOC entry 267 (class 1259 OID 28613) | |
| 797 | --- Name: orders_delivery_lang; Type: TABLE; Schema: public; Owner: - | |
| 610 | +-- TOC entry 219 (class 1259 OID 20049) | |
| 611 | +-- Name: order_label_lang; Type: TABLE; Schema: public; Owner: - | |
| 798 | 612 | -- |
| 799 | 613 | |
| 800 | -CREATE TABLE orders_delivery_lang ( | |
| 801 | - orders_delivery_id integer NOT NULL, | |
| 614 | +CREATE TABLE order_label_lang ( | |
| 615 | + order_label_id integer NOT NULL, | |
| 802 | 616 | language_id integer NOT NULL, |
| 803 | - title character varying(255) NOT NULL, | |
| 804 | - text text NOT NULL | |
| 617 | + title character varying(255) NOT NULL | |
| 805 | 618 | ); |
| 806 | 619 | |
| 807 | 620 | |
| 808 | 621 | -- |
| 809 | --- TOC entry 205 (class 1259 OID 25792) | |
| 810 | --- Name: orders_id_seq1; Type: SEQUENCE; Schema: public; Owner: - | |
| 622 | +-- TOC entry 220 (class 1259 OID 20052) | |
| 623 | +-- Name: order_product; Type: TABLE; Schema: public; Owner: - | |
| 811 | 624 | -- |
| 812 | 625 | |
| 813 | -CREATE SEQUENCE orders_id_seq1 | |
| 814 | - START WITH 1 | |
| 815 | - INCREMENT BY 1 | |
| 816 | - NO MINVALUE | |
| 817 | - NO MAXVALUE | |
| 818 | - CACHE 1; | |
| 626 | +CREATE TABLE order_product ( | |
| 627 | + id integer NOT NULL, | |
| 628 | + order_id integer NOT NULL, | |
| 629 | + product_variant_id integer, | |
| 630 | + product_name character varying(255), | |
| 631 | + name character varying(255), | |
| 632 | + sku character varying(255), | |
| 633 | + price double precision, | |
| 634 | + count integer, | |
| 635 | + sum_cost double precision | |
| 636 | +); | |
| 819 | 637 | |
| 820 | 638 | |
| 821 | 639 | -- |
| 822 | --- TOC entry 3572 (class 0 OID 0) | |
| 823 | --- Dependencies: 205 | |
| 824 | --- Name: orders_id_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 640 | +-- TOC entry 214 (class 1259 OID 20034) | |
| 641 | +-- Name: orders_delivery_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 825 | 642 | -- |
| 826 | 643 | |
| 827 | -ALTER SEQUENCE orders_id_seq1 OWNED BY orders.id; | |
| 644 | +CREATE SEQUENCE orders_delivery_id_seq | |
| 645 | + START WITH 1 | |
| 646 | + INCREMENT BY 1 | |
| 647 | + NO MINVALUE | |
| 648 | + NO MAXVALUE | |
| 649 | + CACHE 1; | |
| 828 | 650 | |
| 829 | 651 | |
| 830 | 652 | -- |
| 831 | --- TOC entry 206 (class 1259 OID 25794) | |
| 832 | --- Name: orders_label; Type: TABLE; Schema: public; Owner: - | |
| 653 | +-- TOC entry 2789 (class 0 OID 0) | |
| 654 | +-- Dependencies: 214 | |
| 655 | +-- Name: orders_delivery_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 833 | 656 | -- |
| 834 | 657 | |
| 835 | -CREATE TABLE orders_label ( | |
| 836 | - id integer NOT NULL, | |
| 837 | - label character varying(255) | |
| 838 | -); | |
| 658 | +ALTER SEQUENCE orders_delivery_id_seq OWNED BY order_delivery.id; | |
| 839 | 659 | |
| 840 | 660 | |
| 841 | 661 | -- |
| 842 | --- TOC entry 207 (class 1259 OID 25800) | |
| 843 | --- Name: orders_label_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 662 | +-- TOC entry 216 (class 1259 OID 20042) | |
| 663 | +-- Name: orders_id_seq1; Type: SEQUENCE; Schema: public; Owner: - | |
| 844 | 664 | -- |
| 845 | 665 | |
| 846 | -CREATE SEQUENCE orders_label_id_seq | |
| 666 | +CREATE SEQUENCE orders_id_seq1 | |
| 847 | 667 | START WITH 1 |
| 848 | 668 | INCREMENT BY 1 |
| 849 | 669 | NO MINVALUE |
| ... | ... | @@ -852,46 +672,38 @@ CREATE SEQUENCE orders_label_id_seq |
| 852 | 672 | |
| 853 | 673 | |
| 854 | 674 | -- |
| 855 | --- TOC entry 3573 (class 0 OID 0) | |
| 856 | --- Dependencies: 207 | |
| 857 | --- Name: orders_label_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 675 | +-- TOC entry 2790 (class 0 OID 0) | |
| 676 | +-- Dependencies: 216 | |
| 677 | +-- Name: orders_id_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 858 | 678 | -- |
| 859 | 679 | |
| 860 | -ALTER SEQUENCE orders_label_id_seq OWNED BY orders_label.id; | |
| 680 | +ALTER SEQUENCE orders_id_seq1 OWNED BY "order".id; | |
| 861 | 681 | |
| 862 | 682 | |
| 863 | 683 | -- |
| 864 | --- TOC entry 268 (class 1259 OID 28650) | |
| 865 | --- Name: orders_label_lang; Type: TABLE; Schema: public; Owner: - | |
| 684 | +-- TOC entry 218 (class 1259 OID 20047) | |
| 685 | +-- Name: orders_label_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 866 | 686 | -- |
| 867 | 687 | |
| 868 | -CREATE TABLE orders_label_lang ( | |
| 869 | - orders_label_id integer NOT NULL, | |
| 870 | - language_id integer NOT NULL, | |
| 871 | - name character varying(255) NOT NULL | |
| 872 | -); | |
| 688 | +CREATE SEQUENCE orders_label_id_seq | |
| 689 | + START WITH 1 | |
| 690 | + INCREMENT BY 1 | |
| 691 | + NO MINVALUE | |
| 692 | + NO MAXVALUE | |
| 693 | + CACHE 1; | |
| 873 | 694 | |
| 874 | 695 | |
| 875 | 696 | -- |
| 876 | --- TOC entry 208 (class 1259 OID 25802) | |
| 877 | --- Name: orders_products; Type: TABLE; Schema: public; Owner: - | |
| 697 | +-- TOC entry 2791 (class 0 OID 0) | |
| 698 | +-- Dependencies: 218 | |
| 699 | +-- Name: orders_label_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 878 | 700 | -- |
| 879 | 701 | |
| 880 | -CREATE TABLE orders_products ( | |
| 881 | - id integer NOT NULL, | |
| 882 | - order_id integer NOT NULL, | |
| 883 | - mod_id integer, | |
| 884 | - product_name character varying(255), | |
| 885 | - name character varying(255), | |
| 886 | - sku character varying(255), | |
| 887 | - price double precision, | |
| 888 | - count integer, | |
| 889 | - sum_cost double precision | |
| 890 | -); | |
| 702 | +ALTER SEQUENCE orders_label_id_seq OWNED BY order_label.id; | |
| 891 | 703 | |
| 892 | 704 | |
| 893 | 705 | -- |
| 894 | --- TOC entry 209 (class 1259 OID 25808) | |
| 706 | +-- TOC entry 221 (class 1259 OID 20058) | |
| 895 | 707 | -- Name: orders_products_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 896 | 708 | -- |
| 897 | 709 | |
| ... | ... | @@ -904,16 +716,16 @@ CREATE SEQUENCE orders_products_id_seq |
| 904 | 716 | |
| 905 | 717 | |
| 906 | 718 | -- |
| 907 | --- TOC entry 3574 (class 0 OID 0) | |
| 908 | --- Dependencies: 209 | |
| 719 | +-- TOC entry 2792 (class 0 OID 0) | |
| 720 | +-- Dependencies: 221 | |
| 909 | 721 | -- Name: orders_products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 910 | 722 | -- |
| 911 | 723 | |
| 912 | -ALTER SEQUENCE orders_products_id_seq OWNED BY orders_products.id; | |
| 724 | +ALTER SEQUENCE orders_products_id_seq OWNED BY order_product.id; | |
| 913 | 725 | |
| 914 | 726 | |
| 915 | 727 | -- |
| 916 | --- TOC entry 210 (class 1259 OID 25810) | |
| 728 | +-- TOC entry 222 (class 1259 OID 20060) | |
| 917 | 729 | -- Name: page; Type: TABLE; Schema: public; Owner: - |
| 918 | 730 | -- |
| 919 | 731 | |
| ... | ... | @@ -924,7 +736,7 @@ CREATE TABLE page ( |
| 924 | 736 | |
| 925 | 737 | |
| 926 | 738 | -- |
| 927 | --- TOC entry 211 (class 1259 OID 25816) | |
| 739 | +-- TOC entry 223 (class 1259 OID 20064) | |
| 928 | 740 | -- Name: page_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 929 | 741 | -- |
| 930 | 742 | |
| ... | ... | @@ -937,8 +749,8 @@ CREATE SEQUENCE page_id_seq |
| 937 | 749 | |
| 938 | 750 | |
| 939 | 751 | -- |
| 940 | --- TOC entry 3575 (class 0 OID 0) | |
| 941 | --- Dependencies: 211 | |
| 752 | +-- TOC entry 2793 (class 0 OID 0) | |
| 753 | +-- Dependencies: 223 | |
| 942 | 754 | -- Name: page_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 943 | 755 | -- |
| 944 | 756 | |
| ... | ... | @@ -946,7 +758,7 @@ ALTER SEQUENCE page_id_seq OWNED BY page.id; |
| 946 | 758 | |
| 947 | 759 | |
| 948 | 760 | -- |
| 949 | --- TOC entry 261 (class 1259 OID 28456) | |
| 761 | +-- TOC entry 224 (class 1259 OID 20066) | |
| 950 | 762 | -- Name: page_lang; Type: TABLE; Schema: public; Owner: - |
| 951 | 763 | -- |
| 952 | 764 | |
| ... | ... | @@ -965,23 +777,23 @@ CREATE TABLE page_lang ( |
| 965 | 777 | |
| 966 | 778 | |
| 967 | 779 | -- |
| 968 | --- TOC entry 212 (class 1259 OID 25818) | |
| 780 | +-- TOC entry 225 (class 1259 OID 20072) | |
| 969 | 781 | -- Name: product; Type: TABLE; Schema: public; Owner: - |
| 970 | 782 | -- |
| 971 | 783 | |
| 972 | 784 | CREATE TABLE product ( |
| 973 | - product_id integer NOT NULL, | |
| 785 | + id integer NOT NULL, | |
| 974 | 786 | brand_id integer, |
| 975 | 787 | video text, |
| 976 | 788 | is_top boolean DEFAULT false, |
| 977 | - akciya boolean DEFAULT false, | |
| 789 | + is_discount boolean DEFAULT false, | |
| 978 | 790 | is_new boolean DEFAULT false, |
| 979 | 791 | remote_id character varying(255) |
| 980 | 792 | ); |
| 981 | 793 | |
| 982 | 794 | |
| 983 | 795 | -- |
| 984 | --- TOC entry 213 (class 1259 OID 25827) | |
| 796 | +-- TOC entry 226 (class 1259 OID 20081) | |
| 985 | 797 | -- Name: product_category; Type: TABLE; Schema: public; Owner: - |
| 986 | 798 | -- |
| 987 | 799 | |
| ... | ... | @@ -992,41 +804,7 @@ CREATE TABLE product_category ( |
| 992 | 804 | |
| 993 | 805 | |
| 994 | 806 | -- |
| 995 | --- TOC entry 257 (class 1259 OID 28326) | |
| 996 | --- Name: product_certificate; Type: TABLE; Schema: public; Owner: - | |
| 997 | --- | |
| 998 | - | |
| 999 | -CREATE TABLE product_certificate ( | |
| 1000 | - product_certificate_id integer NOT NULL, | |
| 1001 | - product_id integer NOT NULL, | |
| 1002 | - link character varying(100) | |
| 1003 | -); | |
| 1004 | - | |
| 1005 | - | |
| 1006 | --- | |
| 1007 | --- TOC entry 256 (class 1259 OID 28324) | |
| 1008 | --- Name: product_certificate_product_certificate_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1009 | --- | |
| 1010 | - | |
| 1011 | -CREATE SEQUENCE product_certificate_product_certificate_id_seq | |
| 1012 | - START WITH 1 | |
| 1013 | - INCREMENT BY 1 | |
| 1014 | - NO MINVALUE | |
| 1015 | - NO MAXVALUE | |
| 1016 | - CACHE 1; | |
| 1017 | - | |
| 1018 | - | |
| 1019 | --- | |
| 1020 | --- TOC entry 3576 (class 0 OID 0) | |
| 1021 | --- Dependencies: 256 | |
| 1022 | --- Name: product_certificate_product_certificate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1023 | --- | |
| 1024 | - | |
| 1025 | -ALTER SEQUENCE product_certificate_product_certificate_id_seq OWNED BY product_certificate.product_certificate_id; | |
| 1026 | - | |
| 1027 | - | |
| 1028 | --- | |
| 1029 | --- TOC entry 214 (class 1259 OID 25830) | |
| 807 | +-- TOC entry 227 (class 1259 OID 20084) | |
| 1030 | 808 | -- Name: product_image; Type: TABLE; Schema: public; Owner: - |
| 1031 | 809 | -- |
| 1032 | 810 | |
| ... | ... | @@ -1041,7 +819,7 @@ CREATE TABLE product_image ( |
| 1041 | 819 | |
| 1042 | 820 | |
| 1043 | 821 | -- |
| 1044 | --- TOC entry 215 (class 1259 OID 25836) | |
| 822 | +-- TOC entry 228 (class 1259 OID 20090) | |
| 1045 | 823 | -- Name: product_image_product_image_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1046 | 824 | -- |
| 1047 | 825 | |
| ... | ... | @@ -1054,8 +832,8 @@ CREATE SEQUENCE product_image_product_image_id_seq |
| 1054 | 832 | |
| 1055 | 833 | |
| 1056 | 834 | -- |
| 1057 | --- TOC entry 3577 (class 0 OID 0) | |
| 1058 | --- Dependencies: 215 | |
| 835 | +-- TOC entry 2794 (class 0 OID 0) | |
| 836 | +-- Dependencies: 228 | |
| 1059 | 837 | -- Name: product_image_product_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1060 | 838 | -- |
| 1061 | 839 | |
| ... | ... | @@ -1063,21 +841,21 @@ ALTER SEQUENCE product_image_product_image_id_seq OWNED BY product_image.product |
| 1063 | 841 | |
| 1064 | 842 | |
| 1065 | 843 | -- |
| 1066 | --- TOC entry 269 (class 1259 OID 28683) | |
| 844 | +-- TOC entry 229 (class 1259 OID 20092) | |
| 1067 | 845 | -- Name: product_lang; Type: TABLE; Schema: public; Owner: - |
| 1068 | 846 | -- |
| 1069 | 847 | |
| 1070 | 848 | CREATE TABLE product_lang ( |
| 1071 | 849 | product_id integer NOT NULL, |
| 1072 | 850 | language_id integer NOT NULL, |
| 1073 | - name character varying(255) NOT NULL, | |
| 851 | + title character varying(255) NOT NULL, | |
| 1074 | 852 | description text, |
| 1075 | 853 | alias character varying(255) |
| 1076 | 854 | ); |
| 1077 | 855 | |
| 1078 | 856 | |
| 1079 | 857 | -- |
| 1080 | --- TOC entry 216 (class 1259 OID 25838) | |
| 858 | +-- TOC entry 230 (class 1259 OID 20098) | |
| 1081 | 859 | -- Name: product_option; Type: TABLE; Schema: public; Owner: - |
| 1082 | 860 | -- |
| 1083 | 861 | |
| ... | ... | @@ -1088,7 +866,7 @@ CREATE TABLE product_option ( |
| 1088 | 866 | |
| 1089 | 867 | |
| 1090 | 868 | -- |
| 1091 | --- TOC entry 217 (class 1259 OID 25841) | |
| 869 | +-- TOC entry 231 (class 1259 OID 20101) | |
| 1092 | 870 | -- Name: product_product_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1093 | 871 | -- |
| 1094 | 872 | |
| ... | ... | @@ -1101,69 +879,20 @@ CREATE SEQUENCE product_product_id_seq |
| 1101 | 879 | |
| 1102 | 880 | |
| 1103 | 881 | -- |
| 1104 | --- TOC entry 3578 (class 0 OID 0) | |
| 1105 | --- Dependencies: 217 | |
| 882 | +-- TOC entry 2795 (class 0 OID 0) | |
| 883 | +-- Dependencies: 231 | |
| 1106 | 884 | -- Name: product_product_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1107 | 885 | -- |
| 1108 | 886 | |
| 1109 | -ALTER SEQUENCE product_product_id_seq OWNED BY product.product_id; | |
| 887 | +ALTER SEQUENCE product_product_id_seq OWNED BY product.id; | |
| 1110 | 888 | |
| 1111 | 889 | |
| 1112 | 890 | -- |
| 1113 | --- TOC entry 255 (class 1259 OID 28309) | |
| 1114 | --- Name: product_spec; Type: TABLE; Schema: public; Owner: - | |
| 1115 | --- | |
| 1116 | - | |
| 1117 | -CREATE TABLE product_spec ( | |
| 1118 | - product_spec_id integer NOT NULL, | |
| 1119 | - product_id integer NOT NULL, | |
| 1120 | - tech_spec_link character varying(100), | |
| 1121 | - tech_char_link character varying(100) | |
| 1122 | -); | |
| 1123 | - | |
| 1124 | - | |
| 1125 | --- | |
| 1126 | --- TOC entry 270 (class 1259 OID 28700) | |
| 1127 | --- Name: product_spec_lang; Type: TABLE; Schema: public; Owner: - | |
| 1128 | --- | |
| 1129 | - | |
| 1130 | -CREATE TABLE product_spec_lang ( | |
| 1131 | - product_spec_id integer NOT NULL, | |
| 1132 | - language_id integer NOT NULL, | |
| 1133 | - tech_spec_text text, | |
| 1134 | - instruction text | |
| 1135 | -); | |
| 1136 | - | |
| 1137 | - | |
| 1138 | --- | |
| 1139 | --- TOC entry 254 (class 1259 OID 28307) | |
| 1140 | --- Name: product_spec_product_spec_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1141 | --- | |
| 1142 | - | |
| 1143 | -CREATE SEQUENCE product_spec_product_spec_id_seq | |
| 1144 | - START WITH 1 | |
| 1145 | - INCREMENT BY 1 | |
| 1146 | - NO MINVALUE | |
| 1147 | - NO MAXVALUE | |
| 1148 | - CACHE 1; | |
| 1149 | - | |
| 1150 | - | |
| 1151 | --- | |
| 1152 | --- TOC entry 3579 (class 0 OID 0) | |
| 1153 | --- Dependencies: 254 | |
| 1154 | --- Name: product_spec_product_spec_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1155 | --- | |
| 1156 | - | |
| 1157 | -ALTER SEQUENCE product_spec_product_spec_id_seq OWNED BY product_spec.product_spec_id; | |
| 1158 | - | |
| 1159 | - | |
| 1160 | --- | |
| 1161 | --- TOC entry 218 (class 1259 OID 25843) | |
| 1162 | --- Name: product_stock; Type: TABLE; Schema: public; Owner: - | |
| 891 | +-- TOC entry 232 (class 1259 OID 20103) | |
| 892 | +-- Name: product_stock; Type: TABLE; Schema: public; Owner: - | |
| 1163 | 893 | -- |
| 1164 | 894 | |
| 1165 | 895 | CREATE TABLE product_stock ( |
| 1166 | - product_id integer NOT NULL, | |
| 1167 | 896 | stock_id integer NOT NULL, |
| 1168 | 897 | quantity integer NOT NULL, |
| 1169 | 898 | product_variant_id integer NOT NULL |
| ... | ... | @@ -1171,18 +900,18 @@ CREATE TABLE product_stock ( |
| 1171 | 900 | |
| 1172 | 901 | |
| 1173 | 902 | -- |
| 1174 | --- TOC entry 219 (class 1259 OID 25846) | |
| 903 | +-- TOC entry 233 (class 1259 OID 20106) | |
| 1175 | 904 | -- Name: stock; Type: TABLE; Schema: public; Owner: - |
| 1176 | 905 | -- |
| 1177 | 906 | |
| 1178 | 907 | CREATE TABLE stock ( |
| 1179 | - stock_id integer NOT NULL, | |
| 908 | + id integer NOT NULL, | |
| 1180 | 909 | remote_id character varying(255) |
| 1181 | 910 | ); |
| 1182 | 911 | |
| 1183 | 912 | |
| 1184 | 913 | -- |
| 1185 | --- TOC entry 220 (class 1259 OID 25849) | |
| 914 | +-- TOC entry 234 (class 1259 OID 20109) | |
| 1186 | 915 | -- Name: product_stock_product_stock_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1187 | 916 | -- |
| 1188 | 917 | |
| ... | ... | @@ -1195,108 +924,40 @@ CREATE SEQUENCE product_stock_product_stock_id_seq |
| 1195 | 924 | |
| 1196 | 925 | |
| 1197 | 926 | -- |
| 1198 | --- TOC entry 3580 (class 0 OID 0) | |
| 1199 | --- Dependencies: 220 | |
| 927 | +-- TOC entry 2796 (class 0 OID 0) | |
| 928 | +-- Dependencies: 234 | |
| 1200 | 929 | -- Name: product_stock_product_stock_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1201 | 930 | -- |
| 1202 | 931 | |
| 1203 | -ALTER SEQUENCE product_stock_product_stock_id_seq OWNED BY stock.stock_id; | |
| 1204 | - | |
| 1205 | - | |
| 1206 | --- | |
| 1207 | --- TOC entry 253 (class 1259 OID 28276) | |
| 1208 | --- Name: product_to_project; Type: TABLE; Schema: public; Owner: - | |
| 1209 | --- | |
| 1210 | - | |
| 1211 | -CREATE TABLE product_to_project ( | |
| 1212 | - product_to_project_id integer NOT NULL, | |
| 1213 | - product_variant_id integer NOT NULL, | |
| 1214 | - project_id integer NOT NULL | |
| 1215 | -); | |
| 1216 | - | |
| 1217 | - | |
| 1218 | --- | |
| 1219 | --- TOC entry 252 (class 1259 OID 28274) | |
| 1220 | --- Name: product_to_project_product_to_project_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1221 | --- | |
| 1222 | - | |
| 1223 | -CREATE SEQUENCE product_to_project_product_to_project_id_seq | |
| 1224 | - START WITH 1 | |
| 1225 | - INCREMENT BY 1 | |
| 1226 | - NO MINVALUE | |
| 1227 | - NO MAXVALUE | |
| 1228 | - CACHE 1; | |
| 1229 | - | |
| 1230 | - | |
| 1231 | --- | |
| 1232 | --- TOC entry 3581 (class 0 OID 0) | |
| 1233 | --- Dependencies: 252 | |
| 1234 | --- Name: product_to_project_product_to_project_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1235 | --- | |
| 1236 | - | |
| 1237 | -ALTER SEQUENCE product_to_project_product_to_project_id_seq OWNED BY product_to_project.product_to_project_id; | |
| 1238 | - | |
| 1239 | - | |
| 1240 | --- | |
| 1241 | --- TOC entry 221 (class 1259 OID 25851) | |
| 1242 | --- Name: product_to_rating; Type: TABLE; Schema: public; Owner: - | |
| 1243 | --- | |
| 1244 | - | |
| 1245 | -CREATE TABLE product_to_rating ( | |
| 1246 | - product_to_rating_id integer NOT NULL, | |
| 1247 | - product_id integer NOT NULL, | |
| 1248 | - value double precision DEFAULT 0 | |
| 1249 | -); | |
| 1250 | - | |
| 1251 | - | |
| 1252 | --- | |
| 1253 | --- TOC entry 222 (class 1259 OID 25855) | |
| 1254 | --- Name: product_to_rating_product_to_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1255 | --- | |
| 1256 | - | |
| 1257 | -CREATE SEQUENCE product_to_rating_product_to_rating_id_seq | |
| 1258 | - START WITH 1 | |
| 1259 | - INCREMENT BY 1 | |
| 1260 | - NO MINVALUE | |
| 1261 | - NO MAXVALUE | |
| 1262 | - CACHE 1; | |
| 1263 | - | |
| 1264 | - | |
| 1265 | --- | |
| 1266 | --- TOC entry 3582 (class 0 OID 0) | |
| 1267 | --- Dependencies: 222 | |
| 1268 | --- Name: product_to_rating_product_to_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1269 | --- | |
| 1270 | - | |
| 1271 | -ALTER SEQUENCE product_to_rating_product_to_rating_id_seq OWNED BY product_to_rating.product_to_rating_id; | |
| 932 | +ALTER SEQUENCE product_stock_product_stock_id_seq OWNED BY stock.id; | |
| 1272 | 933 | |
| 1273 | 934 | |
| 1274 | 935 | -- |
| 1275 | --- TOC entry 223 (class 1259 OID 25857) | |
| 936 | +-- TOC entry 235 (class 1259 OID 20111) | |
| 1276 | 937 | -- Name: product_unit; Type: TABLE; Schema: public; Owner: - |
| 1277 | 938 | -- |
| 1278 | 939 | |
| 1279 | 940 | CREATE TABLE product_unit ( |
| 1280 | - product_unit_id integer NOT NULL, | |
| 941 | + id integer NOT NULL, | |
| 1281 | 942 | is_default boolean |
| 1282 | 943 | ); |
| 1283 | 944 | |
| 1284 | 945 | |
| 1285 | 946 | -- |
| 1286 | --- TOC entry 271 (class 1259 OID 28723) | |
| 947 | +-- TOC entry 236 (class 1259 OID 20114) | |
| 1287 | 948 | -- Name: product_unit_lang; Type: TABLE; Schema: public; Owner: - |
| 1288 | 949 | -- |
| 1289 | 950 | |
| 1290 | 951 | CREATE TABLE product_unit_lang ( |
| 1291 | 952 | product_unit_id integer NOT NULL, |
| 1292 | 953 | language_id integer NOT NULL, |
| 1293 | - name character varying(255) NOT NULL, | |
| 954 | + title character varying(255) NOT NULL, | |
| 1294 | 955 | short character varying(255) |
| 1295 | 956 | ); |
| 1296 | 957 | |
| 1297 | 958 | |
| 1298 | 959 | -- |
| 1299 | --- TOC entry 224 (class 1259 OID 25860) | |
| 960 | +-- TOC entry 237 (class 1259 OID 20120) | |
| 1300 | 961 | -- Name: product_unit_product_unit_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1301 | 962 | -- |
| 1302 | 963 | |
| ... | ... | @@ -1309,21 +970,21 @@ CREATE SEQUENCE product_unit_product_unit_id_seq |
| 1309 | 970 | |
| 1310 | 971 | |
| 1311 | 972 | -- |
| 1312 | --- TOC entry 3583 (class 0 OID 0) | |
| 1313 | --- Dependencies: 224 | |
| 973 | +-- TOC entry 2797 (class 0 OID 0) | |
| 974 | +-- Dependencies: 237 | |
| 1314 | 975 | -- Name: product_unit_product_unit_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1315 | 976 | -- |
| 1316 | 977 | |
| 1317 | -ALTER SEQUENCE product_unit_product_unit_id_seq OWNED BY product_unit.product_unit_id; | |
| 978 | +ALTER SEQUENCE product_unit_product_unit_id_seq OWNED BY product_unit.id; | |
| 1318 | 979 | |
| 1319 | 980 | |
| 1320 | 981 | -- |
| 1321 | --- TOC entry 225 (class 1259 OID 25862) | |
| 982 | +-- TOC entry 238 (class 1259 OID 20122) | |
| 1322 | 983 | -- Name: product_variant; Type: TABLE; Schema: public; Owner: - |
| 1323 | 984 | -- |
| 1324 | 985 | |
| 1325 | 986 | CREATE TABLE product_variant ( |
| 1326 | - product_variant_id integer NOT NULL, | |
| 987 | + id integer NOT NULL, | |
| 1327 | 988 | product_id integer NOT NULL, |
| 1328 | 989 | sku character varying(255) NOT NULL, |
| 1329 | 990 | price double precision, |
| ... | ... | @@ -1335,19 +996,19 @@ CREATE TABLE product_variant ( |
| 1335 | 996 | |
| 1336 | 997 | |
| 1337 | 998 | -- |
| 1338 | --- TOC entry 272 (class 1259 OID 28741) | |
| 999 | +-- TOC entry 239 (class 1259 OID 20128) | |
| 1339 | 1000 | -- Name: product_variant_lang; Type: TABLE; Schema: public; Owner: - |
| 1340 | 1001 | -- |
| 1341 | 1002 | |
| 1342 | 1003 | CREATE TABLE product_variant_lang ( |
| 1343 | 1004 | product_variant_id integer NOT NULL, |
| 1344 | 1005 | language_id integer NOT NULL, |
| 1345 | - name character varying(255) NOT NULL | |
| 1006 | + title character varying(255) NOT NULL | |
| 1346 | 1007 | ); |
| 1347 | 1008 | |
| 1348 | 1009 | |
| 1349 | 1010 | -- |
| 1350 | --- TOC entry 226 (class 1259 OID 25868) | |
| 1011 | +-- TOC entry 240 (class 1259 OID 20131) | |
| 1351 | 1012 | -- Name: product_variant_option; Type: TABLE; Schema: public; Owner: - |
| 1352 | 1013 | -- |
| 1353 | 1014 | |
| ... | ... | @@ -1358,7 +1019,7 @@ CREATE TABLE product_variant_option ( |
| 1358 | 1019 | |
| 1359 | 1020 | |
| 1360 | 1021 | -- |
| 1361 | --- TOC entry 227 (class 1259 OID 25871) | |
| 1022 | +-- TOC entry 241 (class 1259 OID 20134) | |
| 1362 | 1023 | -- Name: product_variant_product_variant_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1363 | 1024 | -- |
| 1364 | 1025 | |
| ... | ... | @@ -1371,134 +1032,51 @@ CREATE SEQUENCE product_variant_product_variant_id_seq |
| 1371 | 1032 | |
| 1372 | 1033 | |
| 1373 | 1034 | -- |
| 1374 | --- TOC entry 3584 (class 0 OID 0) | |
| 1375 | --- Dependencies: 227 | |
| 1035 | +-- TOC entry 2798 (class 0 OID 0) | |
| 1036 | +-- Dependencies: 241 | |
| 1376 | 1037 | -- Name: product_variant_product_variant_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1377 | 1038 | -- |
| 1378 | 1039 | |
| 1379 | -ALTER SEQUENCE product_variant_product_variant_id_seq OWNED BY product_variant.product_variant_id; | |
| 1380 | - | |
| 1381 | - | |
| 1382 | --- | |
| 1383 | --- TOC entry 249 (class 1259 OID 27421) | |
| 1384 | --- Name: project; Type: TABLE; Schema: public; Owner: - | |
| 1385 | --- | |
| 1386 | - | |
| 1387 | -CREATE TABLE project ( | |
| 1388 | - project_id integer NOT NULL, | |
| 1389 | - date_add integer NOT NULL | |
| 1390 | -); | |
| 1391 | - | |
| 1392 | - | |
| 1393 | --- | |
| 1394 | --- TOC entry 251 (class 1259 OID 27432) | |
| 1395 | --- Name: project_image; Type: TABLE; Schema: public; Owner: - | |
| 1396 | --- | |
| 1397 | - | |
| 1398 | -CREATE TABLE project_image ( | |
| 1399 | - project_image_id integer NOT NULL, | |
| 1400 | - project_id integer NOT NULL, | |
| 1401 | - image character varying(255), | |
| 1402 | - alt character varying(255), | |
| 1403 | - title character varying(255) | |
| 1404 | -); | |
| 1405 | - | |
| 1406 | - | |
| 1407 | --- | |
| 1408 | --- TOC entry 250 (class 1259 OID 27430) | |
| 1409 | --- Name: project_image_project_image_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1410 | --- | |
| 1411 | - | |
| 1412 | -CREATE SEQUENCE project_image_project_image_id_seq | |
| 1413 | - START WITH 1 | |
| 1414 | - INCREMENT BY 1 | |
| 1415 | - NO MINVALUE | |
| 1416 | - NO MAXVALUE | |
| 1417 | - CACHE 1; | |
| 1418 | - | |
| 1419 | - | |
| 1420 | --- | |
| 1421 | --- TOC entry 3585 (class 0 OID 0) | |
| 1422 | --- Dependencies: 250 | |
| 1423 | --- Name: project_image_project_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1424 | --- | |
| 1425 | - | |
| 1426 | -ALTER SEQUENCE project_image_project_image_id_seq OWNED BY project_image.project_image_id; | |
| 1427 | - | |
| 1428 | - | |
| 1429 | --- | |
| 1430 | --- TOC entry 273 (class 1259 OID 28757) | |
| 1431 | --- Name: project_lang; Type: TABLE; Schema: public; Owner: - | |
| 1432 | --- | |
| 1433 | - | |
| 1434 | -CREATE TABLE project_lang ( | |
| 1435 | - project_id integer NOT NULL, | |
| 1436 | - language_id integer NOT NULL, | |
| 1437 | - title character varying(255) NOT NULL, | |
| 1438 | - description text, | |
| 1439 | - alias character varying(255) | |
| 1440 | -); | |
| 1441 | - | |
| 1442 | - | |
| 1443 | --- | |
| 1444 | --- TOC entry 248 (class 1259 OID 27419) | |
| 1445 | --- Name: project_project_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1446 | --- | |
| 1447 | - | |
| 1448 | -CREATE SEQUENCE project_project_id_seq | |
| 1449 | - START WITH 1 | |
| 1450 | - INCREMENT BY 1 | |
| 1451 | - NO MINVALUE | |
| 1452 | - NO MAXVALUE | |
| 1453 | - CACHE 1; | |
| 1454 | - | |
| 1455 | - | |
| 1456 | --- | |
| 1457 | --- TOC entry 3586 (class 0 OID 0) | |
| 1458 | --- Dependencies: 248 | |
| 1459 | --- Name: project_project_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1460 | --- | |
| 1461 | - | |
| 1462 | -ALTER SEQUENCE project_project_id_seq OWNED BY project.project_id; | |
| 1040 | +ALTER SEQUENCE product_variant_product_variant_id_seq OWNED BY product_variant.id; | |
| 1463 | 1041 | |
| 1464 | 1042 | |
| 1465 | 1043 | -- |
| 1466 | --- TOC entry 228 (class 1259 OID 25885) | |
| 1044 | +-- TOC entry 242 (class 1259 OID 20136) | |
| 1467 | 1045 | -- Name: seo; Type: TABLE; Schema: public; Owner: - |
| 1468 | 1046 | -- |
| 1469 | 1047 | |
| 1470 | 1048 | CREATE TABLE seo ( |
| 1471 | - seo_id integer NOT NULL, | |
| 1049 | + id integer NOT NULL, | |
| 1472 | 1050 | url character varying(255) NOT NULL |
| 1473 | 1051 | ); |
| 1474 | 1052 | |
| 1475 | 1053 | |
| 1476 | 1054 | -- |
| 1477 | --- TOC entry 229 (class 1259 OID 25891) | |
| 1055 | +-- TOC entry 243 (class 1259 OID 20139) | |
| 1478 | 1056 | -- Name: seo_category; Type: TABLE; Schema: public; Owner: - |
| 1479 | 1057 | -- |
| 1480 | 1058 | |
| 1481 | 1059 | CREATE TABLE seo_category ( |
| 1482 | - seo_category_id integer NOT NULL, | |
| 1060 | + id integer NOT NULL, | |
| 1483 | 1061 | controller character varying(100), |
| 1484 | 1062 | status smallint |
| 1485 | 1063 | ); |
| 1486 | 1064 | |
| 1487 | 1065 | |
| 1488 | 1066 | -- |
| 1489 | --- TOC entry 275 (class 1259 OID 28813) | |
| 1067 | +-- TOC entry 244 (class 1259 OID 20142) | |
| 1490 | 1068 | -- Name: seo_category_lang; Type: TABLE; Schema: public; Owner: - |
| 1491 | 1069 | -- |
| 1492 | 1070 | |
| 1493 | 1071 | CREATE TABLE seo_category_lang ( |
| 1494 | 1072 | seo_category_id integer NOT NULL, |
| 1495 | 1073 | language_id integer NOT NULL, |
| 1496 | - name character varying(255) | |
| 1074 | + title character varying(255) | |
| 1497 | 1075 | ); |
| 1498 | 1076 | |
| 1499 | 1077 | |
| 1500 | 1078 | -- |
| 1501 | --- TOC entry 230 (class 1259 OID 25894) | |
| 1079 | +-- TOC entry 245 (class 1259 OID 20145) | |
| 1502 | 1080 | -- Name: seo_category_seo_category_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1503 | 1081 | -- |
| 1504 | 1082 | |
| ... | ... | @@ -1511,21 +1089,21 @@ CREATE SEQUENCE seo_category_seo_category_id_seq |
| 1511 | 1089 | |
| 1512 | 1090 | |
| 1513 | 1091 | -- |
| 1514 | --- TOC entry 3587 (class 0 OID 0) | |
| 1515 | --- Dependencies: 230 | |
| 1092 | +-- TOC entry 2799 (class 0 OID 0) | |
| 1093 | +-- Dependencies: 245 | |
| 1516 | 1094 | -- Name: seo_category_seo_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1517 | 1095 | -- |
| 1518 | 1096 | |
| 1519 | -ALTER SEQUENCE seo_category_seo_category_id_seq OWNED BY seo_category.seo_category_id; | |
| 1097 | +ALTER SEQUENCE seo_category_seo_category_id_seq OWNED BY seo_category.id; | |
| 1520 | 1098 | |
| 1521 | 1099 | |
| 1522 | 1100 | -- |
| 1523 | --- TOC entry 231 (class 1259 OID 25896) | |
| 1101 | +-- TOC entry 246 (class 1259 OID 20147) | |
| 1524 | 1102 | -- Name: seo_dynamic; Type: TABLE; Schema: public; Owner: - |
| 1525 | 1103 | -- |
| 1526 | 1104 | |
| 1527 | 1105 | CREATE TABLE seo_dynamic ( |
| 1528 | - seo_dynamic_id integer NOT NULL, | |
| 1106 | + id integer NOT NULL, | |
| 1529 | 1107 | seo_category_id integer, |
| 1530 | 1108 | action character varying(200), |
| 1531 | 1109 | fields character varying(255), |
| ... | ... | @@ -1535,25 +1113,25 @@ CREATE TABLE seo_dynamic ( |
| 1535 | 1113 | |
| 1536 | 1114 | |
| 1537 | 1115 | -- |
| 1538 | --- TOC entry 276 (class 1259 OID 28827) | |
| 1116 | +-- TOC entry 247 (class 1259 OID 20153) | |
| 1539 | 1117 | -- Name: seo_dynamic_lang; Type: TABLE; Schema: public; Owner: - |
| 1540 | 1118 | -- |
| 1541 | 1119 | |
| 1542 | 1120 | CREATE TABLE seo_dynamic_lang ( |
| 1543 | 1121 | seo_dynamic_id integer NOT NULL, |
| 1544 | 1122 | language_id integer NOT NULL, |
| 1545 | - name character varying(255), | |
| 1546 | - title text, | |
| 1123 | + title character varying(255), | |
| 1124 | + meta_title text, | |
| 1547 | 1125 | h1 character varying(255), |
| 1548 | 1126 | key character varying(255), |
| 1549 | 1127 | meta character varying(255), |
| 1550 | - description text, | |
| 1128 | + meta_description text, | |
| 1551 | 1129 | seo_text text |
| 1552 | 1130 | ); |
| 1553 | 1131 | |
| 1554 | 1132 | |
| 1555 | 1133 | -- |
| 1556 | --- TOC entry 232 (class 1259 OID 25902) | |
| 1134 | +-- TOC entry 248 (class 1259 OID 20159) | |
| 1557 | 1135 | -- Name: seo_dynamic_seo_dynamic_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1558 | 1136 | -- |
| 1559 | 1137 | |
| ... | ... | @@ -1566,16 +1144,16 @@ CREATE SEQUENCE seo_dynamic_seo_dynamic_id_seq |
| 1566 | 1144 | |
| 1567 | 1145 | |
| 1568 | 1146 | -- |
| 1569 | --- TOC entry 3588 (class 0 OID 0) | |
| 1570 | --- Dependencies: 232 | |
| 1147 | +-- TOC entry 2800 (class 0 OID 0) | |
| 1148 | +-- Dependencies: 248 | |
| 1571 | 1149 | -- Name: seo_dynamic_seo_dynamic_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1572 | 1150 | -- |
| 1573 | 1151 | |
| 1574 | -ALTER SEQUENCE seo_dynamic_seo_dynamic_id_seq OWNED BY seo_dynamic.seo_dynamic_id; | |
| 1152 | +ALTER SEQUENCE seo_dynamic_seo_dynamic_id_seq OWNED BY seo_dynamic.id; | |
| 1575 | 1153 | |
| 1576 | 1154 | |
| 1577 | 1155 | -- |
| 1578 | --- TOC entry 274 (class 1259 OID 28796) | |
| 1156 | +-- TOC entry 249 (class 1259 OID 20161) | |
| 1579 | 1157 | -- Name: seo_lang; Type: TABLE; Schema: public; Owner: - |
| 1580 | 1158 | -- |
| 1581 | 1159 | |
| ... | ... | @@ -1583,7 +1161,7 @@ CREATE TABLE seo_lang ( |
| 1583 | 1161 | seo_id integer NOT NULL, |
| 1584 | 1162 | language_id integer NOT NULL, |
| 1585 | 1163 | title character varying(255), |
| 1586 | - description text, | |
| 1164 | + meta_description text, | |
| 1587 | 1165 | h1 character varying(255), |
| 1588 | 1166 | meta character varying(255), |
| 1589 | 1167 | seo_text text |
| ... | ... | @@ -1591,7 +1169,7 @@ CREATE TABLE seo_lang ( |
| 1591 | 1169 | |
| 1592 | 1170 | |
| 1593 | 1171 | -- |
| 1594 | --- TOC entry 233 (class 1259 OID 25904) | |
| 1172 | +-- TOC entry 250 (class 1259 OID 20167) | |
| 1595 | 1173 | -- Name: seo_seo_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1596 | 1174 | -- |
| 1597 | 1175 | |
| ... | ... | @@ -1604,21 +1182,21 @@ CREATE SEQUENCE seo_seo_id_seq |
| 1604 | 1182 | |
| 1605 | 1183 | |
| 1606 | 1184 | -- |
| 1607 | --- TOC entry 3589 (class 0 OID 0) | |
| 1608 | --- Dependencies: 233 | |
| 1185 | +-- TOC entry 2801 (class 0 OID 0) | |
| 1186 | +-- Dependencies: 250 | |
| 1609 | 1187 | -- Name: seo_seo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1610 | 1188 | -- |
| 1611 | 1189 | |
| 1612 | -ALTER SEQUENCE seo_seo_id_seq OWNED BY seo.seo_id; | |
| 1190 | +ALTER SEQUENCE seo_seo_id_seq OWNED BY seo.id; | |
| 1613 | 1191 | |
| 1614 | 1192 | |
| 1615 | 1193 | -- |
| 1616 | --- TOC entry 234 (class 1259 OID 25906) | |
| 1194 | +-- TOC entry 251 (class 1259 OID 20169) | |
| 1617 | 1195 | -- Name: service; Type: TABLE; Schema: public; Owner: - |
| 1618 | 1196 | -- |
| 1619 | 1197 | |
| 1620 | 1198 | CREATE TABLE service ( |
| 1621 | - service_id integer NOT NULL, | |
| 1199 | + id integer NOT NULL, | |
| 1622 | 1200 | image character varying(255), |
| 1623 | 1201 | created_at integer, |
| 1624 | 1202 | updated_at integer |
| ... | ... | @@ -1626,25 +1204,25 @@ CREATE TABLE service ( |
| 1626 | 1204 | |
| 1627 | 1205 | |
| 1628 | 1206 | -- |
| 1629 | --- TOC entry 277 (class 1259 OID 28895) | |
| 1207 | +-- TOC entry 252 (class 1259 OID 20172) | |
| 1630 | 1208 | -- Name: service_lang; Type: TABLE; Schema: public; Owner: - |
| 1631 | 1209 | -- |
| 1632 | 1210 | |
| 1633 | 1211 | CREATE TABLE service_lang ( |
| 1634 | 1212 | service_id integer NOT NULL, |
| 1635 | 1213 | language_id integer NOT NULL, |
| 1636 | - name character varying(255) NOT NULL, | |
| 1214 | + title character varying(255) NOT NULL, | |
| 1637 | 1215 | body text NOT NULL, |
| 1638 | 1216 | seo_text text, |
| 1639 | 1217 | meta_title character varying(255), |
| 1640 | - description character varying(255), | |
| 1218 | + meta_description character varying(255), | |
| 1641 | 1219 | h1 character varying(255), |
| 1642 | 1220 | alias character varying(255) |
| 1643 | 1221 | ); |
| 1644 | 1222 | |
| 1645 | 1223 | |
| 1646 | 1224 | -- |
| 1647 | --- TOC entry 235 (class 1259 OID 25912) | |
| 1225 | +-- TOC entry 253 (class 1259 OID 20178) | |
| 1648 | 1226 | -- Name: service_service_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1649 | 1227 | -- |
| 1650 | 1228 | |
| ... | ... | @@ -1657,57 +1235,21 @@ CREATE SEQUENCE service_service_id_seq |
| 1657 | 1235 | |
| 1658 | 1236 | |
| 1659 | 1237 | -- |
| 1660 | --- TOC entry 3590 (class 0 OID 0) | |
| 1661 | --- Dependencies: 235 | |
| 1238 | +-- TOC entry 2802 (class 0 OID 0) | |
| 1239 | +-- Dependencies: 253 | |
| 1662 | 1240 | -- Name: service_service_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1663 | 1241 | -- |
| 1664 | 1242 | |
| 1665 | -ALTER SEQUENCE service_service_id_seq OWNED BY service.service_id; | |
| 1666 | - | |
| 1667 | - | |
| 1668 | --- | |
| 1669 | --- TOC entry 236 (class 1259 OID 25914) | |
| 1670 | --- Name: share; Type: TABLE; Schema: public; Owner: - | |
| 1671 | --- | |
| 1672 | - | |
| 1673 | -CREATE TABLE share ( | |
| 1674 | - id integer NOT NULL, | |
| 1675 | - user_id integer, | |
| 1676 | - product_id integer, | |
| 1677 | - date_time timestamp without time zone, | |
| 1678 | - date date | |
| 1679 | -); | |
| 1680 | - | |
| 1681 | - | |
| 1682 | --- | |
| 1683 | --- TOC entry 237 (class 1259 OID 25917) | |
| 1684 | --- Name: share_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1685 | --- | |
| 1686 | - | |
| 1687 | -CREATE SEQUENCE share_id_seq | |
| 1688 | - START WITH 1 | |
| 1689 | - INCREMENT BY 1 | |
| 1690 | - NO MINVALUE | |
| 1691 | - NO MAXVALUE | |
| 1692 | - CACHE 1; | |
| 1693 | - | |
| 1694 | - | |
| 1695 | --- | |
| 1696 | --- TOC entry 3591 (class 0 OID 0) | |
| 1697 | --- Dependencies: 237 | |
| 1698 | --- Name: share_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1699 | --- | |
| 1700 | - | |
| 1701 | -ALTER SEQUENCE share_id_seq OWNED BY share.id; | |
| 1243 | +ALTER SEQUENCE service_service_id_seq OWNED BY service.id; | |
| 1702 | 1244 | |
| 1703 | 1245 | |
| 1704 | 1246 | -- |
| 1705 | --- TOC entry 238 (class 1259 OID 25919) | |
| 1247 | +-- TOC entry 254 (class 1259 OID 20180) | |
| 1706 | 1248 | -- Name: slider; Type: TABLE; Schema: public; Owner: - |
| 1707 | 1249 | -- |
| 1708 | 1250 | |
| 1709 | 1251 | CREATE TABLE slider ( |
| 1710 | - slider_id integer NOT NULL, | |
| 1252 | + id integer NOT NULL, | |
| 1711 | 1253 | speed integer, |
| 1712 | 1254 | duration integer, |
| 1713 | 1255 | title character varying(200), |
| ... | ... | @@ -1718,12 +1260,12 @@ CREATE TABLE slider ( |
| 1718 | 1260 | |
| 1719 | 1261 | |
| 1720 | 1262 | -- |
| 1721 | --- TOC entry 239 (class 1259 OID 25922) | |
| 1263 | +-- TOC entry 255 (class 1259 OID 20183) | |
| 1722 | 1264 | -- Name: slider_image; Type: TABLE; Schema: public; Owner: - |
| 1723 | 1265 | -- |
| 1724 | 1266 | |
| 1725 | 1267 | CREATE TABLE slider_image ( |
| 1726 | - slider_image_id integer NOT NULL, | |
| 1268 | + id integer NOT NULL, | |
| 1727 | 1269 | slider_id integer NOT NULL, |
| 1728 | 1270 | image character varying(255), |
| 1729 | 1271 | url character varying(255), |
| ... | ... | @@ -1733,7 +1275,7 @@ CREATE TABLE slider_image ( |
| 1733 | 1275 | |
| 1734 | 1276 | |
| 1735 | 1277 | -- |
| 1736 | --- TOC entry 278 (class 1259 OID 28929) | |
| 1278 | +-- TOC entry 256 (class 1259 OID 20189) | |
| 1737 | 1279 | -- Name: slider_image_lang; Type: TABLE; Schema: public; Owner: - |
| 1738 | 1280 | -- |
| 1739 | 1281 | |
| ... | ... | @@ -1746,7 +1288,7 @@ CREATE TABLE slider_image_lang ( |
| 1746 | 1288 | |
| 1747 | 1289 | |
| 1748 | 1290 | -- |
| 1749 | --- TOC entry 240 (class 1259 OID 25928) | |
| 1291 | +-- TOC entry 257 (class 1259 OID 20195) | |
| 1750 | 1292 | -- Name: slider_image_slider_image_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1751 | 1293 | -- |
| 1752 | 1294 | |
| ... | ... | @@ -1759,16 +1301,16 @@ CREATE SEQUENCE slider_image_slider_image_id_seq |
| 1759 | 1301 | |
| 1760 | 1302 | |
| 1761 | 1303 | -- |
| 1762 | --- TOC entry 3592 (class 0 OID 0) | |
| 1763 | --- Dependencies: 240 | |
| 1304 | +-- TOC entry 2803 (class 0 OID 0) | |
| 1305 | +-- Dependencies: 257 | |
| 1764 | 1306 | -- Name: slider_image_slider_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1765 | 1307 | -- |
| 1766 | 1308 | |
| 1767 | -ALTER SEQUENCE slider_image_slider_image_id_seq OWNED BY slider_image.slider_image_id; | |
| 1309 | +ALTER SEQUENCE slider_image_slider_image_id_seq OWNED BY slider_image.id; | |
| 1768 | 1310 | |
| 1769 | 1311 | |
| 1770 | 1312 | -- |
| 1771 | --- TOC entry 241 (class 1259 OID 25930) | |
| 1313 | +-- TOC entry 258 (class 1259 OID 20197) | |
| 1772 | 1314 | -- Name: slider_slider_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1773 | 1315 | -- |
| 1774 | 1316 | |
| ... | ... | @@ -1781,33 +1323,33 @@ CREATE SEQUENCE slider_slider_id_seq |
| 1781 | 1323 | |
| 1782 | 1324 | |
| 1783 | 1325 | -- |
| 1784 | --- TOC entry 3593 (class 0 OID 0) | |
| 1785 | --- Dependencies: 241 | |
| 1326 | +-- TOC entry 2804 (class 0 OID 0) | |
| 1327 | +-- Dependencies: 258 | |
| 1786 | 1328 | -- Name: slider_slider_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1787 | 1329 | -- |
| 1788 | 1330 | |
| 1789 | -ALTER SEQUENCE slider_slider_id_seq OWNED BY slider.slider_id; | |
| 1331 | +ALTER SEQUENCE slider_slider_id_seq OWNED BY slider.id; | |
| 1790 | 1332 | |
| 1791 | 1333 | |
| 1792 | 1334 | -- |
| 1793 | --- TOC entry 281 (class 1259 OID 29090) | |
| 1335 | +-- TOC entry 259 (class 1259 OID 20199) | |
| 1794 | 1336 | -- Name: stock_lang; Type: TABLE; Schema: public; Owner: - |
| 1795 | 1337 | -- |
| 1796 | 1338 | |
| 1797 | 1339 | CREATE TABLE stock_lang ( |
| 1798 | 1340 | stock_id integer NOT NULL, |
| 1799 | 1341 | language_id integer NOT NULL, |
| 1800 | - name character varying(255) NOT NULL | |
| 1342 | + title character varying(255) NOT NULL | |
| 1801 | 1343 | ); |
| 1802 | 1344 | |
| 1803 | 1345 | |
| 1804 | 1346 | -- |
| 1805 | --- TOC entry 242 (class 1259 OID 25932) | |
| 1347 | +-- TOC entry 260 (class 1259 OID 20202) | |
| 1806 | 1348 | -- Name: tax_group; Type: TABLE; Schema: public; Owner: - |
| 1807 | 1349 | -- |
| 1808 | 1350 | |
| 1809 | 1351 | CREATE TABLE tax_group ( |
| 1810 | - tax_group_id integer NOT NULL, | |
| 1352 | + id integer NOT NULL, | |
| 1811 | 1353 | is_filter boolean DEFAULT false, |
| 1812 | 1354 | level integer, |
| 1813 | 1355 | sort integer DEFAULT 0, |
| ... | ... | @@ -1818,21 +1360,21 @@ CREATE TABLE tax_group ( |
| 1818 | 1360 | |
| 1819 | 1361 | |
| 1820 | 1362 | -- |
| 1821 | --- TOC entry 279 (class 1259 OID 28963) | |
| 1363 | +-- TOC entry 261 (class 1259 OID 20208) | |
| 1822 | 1364 | -- Name: tax_group_lang; Type: TABLE; Schema: public; Owner: - |
| 1823 | 1365 | -- |
| 1824 | 1366 | |
| 1825 | 1367 | CREATE TABLE tax_group_lang ( |
| 1826 | 1368 | tax_group_id integer NOT NULL, |
| 1827 | 1369 | language_id integer NOT NULL, |
| 1828 | - name character varying(255) NOT NULL, | |
| 1370 | + title character varying(255) NOT NULL, | |
| 1829 | 1371 | description text, |
| 1830 | 1372 | alias character varying(255) |
| 1831 | 1373 | ); |
| 1832 | 1374 | |
| 1833 | 1375 | |
| 1834 | 1376 | -- |
| 1835 | --- TOC entry 243 (class 1259 OID 25942) | |
| 1377 | +-- TOC entry 262 (class 1259 OID 20214) | |
| 1836 | 1378 | -- Name: tax_group_tax_group_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1837 | 1379 | -- |
| 1838 | 1380 | |
| ... | ... | @@ -1845,16 +1387,16 @@ CREATE SEQUENCE tax_group_tax_group_id_seq |
| 1845 | 1387 | |
| 1846 | 1388 | |
| 1847 | 1389 | -- |
| 1848 | --- TOC entry 3594 (class 0 OID 0) | |
| 1849 | --- Dependencies: 243 | |
| 1390 | +-- TOC entry 2805 (class 0 OID 0) | |
| 1391 | +-- Dependencies: 262 | |
| 1850 | 1392 | -- Name: tax_group_tax_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1851 | 1393 | -- |
| 1852 | 1394 | |
| 1853 | -ALTER SEQUENCE tax_group_tax_group_id_seq OWNED BY tax_group.tax_group_id; | |
| 1395 | +ALTER SEQUENCE tax_group_tax_group_id_seq OWNED BY tax_group.id; | |
| 1854 | 1396 | |
| 1855 | 1397 | |
| 1856 | 1398 | -- |
| 1857 | --- TOC entry 244 (class 1259 OID 25944) | |
| 1399 | +-- TOC entry 263 (class 1259 OID 20216) | |
| 1858 | 1400 | -- Name: tax_group_to_category; Type: TABLE; Schema: public; Owner: - |
| 1859 | 1401 | -- |
| 1860 | 1402 | |
| ... | ... | @@ -1866,7 +1408,7 @@ CREATE TABLE tax_group_to_category ( |
| 1866 | 1408 | |
| 1867 | 1409 | |
| 1868 | 1410 | -- |
| 1869 | --- TOC entry 245 (class 1259 OID 25947) | |
| 1411 | +-- TOC entry 264 (class 1259 OID 20219) | |
| 1870 | 1412 | -- Name: tax_group_to_category_tax_group_to_category_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
| 1871 | 1413 | -- |
| 1872 | 1414 | |
| ... | ... | @@ -1879,8 +1421,8 @@ CREATE SEQUENCE tax_group_to_category_tax_group_to_category_id_seq |
| 1879 | 1421 | |
| 1880 | 1422 | |
| 1881 | 1423 | -- |
| 1882 | --- TOC entry 3595 (class 0 OID 0) | |
| 1883 | --- Dependencies: 245 | |
| 1424 | +-- TOC entry 2806 (class 0 OID 0) | |
| 1425 | +-- Dependencies: 264 | |
| 1884 | 1426 | -- Name: tax_group_to_category_tax_group_to_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
| 1885 | 1427 | -- |
| 1886 | 1428 | |
| ... | ... | @@ -1888,24 +1430,21 @@ ALTER SEQUENCE tax_group_to_category_tax_group_to_category_id_seq OWNED BY tax_g |
| 1888 | 1430 | |
| 1889 | 1431 | |
| 1890 | 1432 | -- |
| 1891 | --- TOC entry 246 (class 1259 OID 25952) | |
| 1433 | +-- TOC entry 265 (class 1259 OID 20221) | |
| 1892 | 1434 | -- Name: tax_option; Type: TABLE; Schema: public; Owner: - |
| 1893 | 1435 | -- |
| 1894 | 1436 | |
| 1895 | 1437 | CREATE TABLE tax_option ( |
| 1896 | - tax_option_id bigint NOT NULL, | |
| 1438 | + id bigint NOT NULL, | |
| 1897 | 1439 | tax_group_id integer NOT NULL, |
| 1898 | - parent_id integer DEFAULT 0 NOT NULL, | |
| 1899 | - depth integer, | |
| 1900 | 1440 | sort integer DEFAULT 0, |
| 1901 | - path_int integer[], | |
| 1902 | 1441 | image character varying(255), |
| 1903 | 1442 | remote_id character varying(255) |
| 1904 | 1443 | ); |
| 1905 | 1444 | |
| 1906 | 1445 | |
| 1907 | 1446 | -- |
| 1908 | --- TOC entry 280 (class 1259 OID 28997) | |
| 1447 | +-- TOC entry 266 (class 1259 OID 20229) | |
| 1909 | 1448 | -- Name: tax_option_lang; Type: TABLE; Schema: public; Owner: - |
| 1910 | 1449 | -- |
| 1911 | 1450 | |
| ... | ... | @@ -1918,442 +1457,1143 @@ CREATE TABLE tax_option_lang ( |
| 1918 | 1457 | |
| 1919 | 1458 | |
| 1920 | 1459 | -- |
| 1921 | --- TOC entry 247 (class 1259 OID 25961) | |
| 1922 | --- Name: tax_option_tax_option_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1460 | +-- TOC entry 267 (class 1259 OID 20235) | |
| 1461 | +-- Name: tax_option_tax_option_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1462 | +-- | |
| 1463 | + | |
| 1464 | +CREATE SEQUENCE tax_option_tax_option_id_seq | |
| 1465 | + START WITH 1 | |
| 1466 | + INCREMENT BY 1 | |
| 1467 | + NO MINVALUE | |
| 1468 | + NO MAXVALUE | |
| 1469 | + CACHE 1; | |
| 1470 | + | |
| 1471 | + | |
| 1472 | +-- | |
| 1473 | +-- TOC entry 2807 (class 0 OID 0) | |
| 1474 | +-- Dependencies: 267 | |
| 1475 | +-- Name: tax_option_tax_option_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1476 | +-- | |
| 1477 | + | |
| 1478 | +ALTER SEQUENCE tax_option_tax_option_id_seq OWNED BY tax_option.id; | |
| 1479 | + | |
| 1480 | + | |
| 1481 | +-- | |
| 1482 | +-- TOC entry 183 (class 1259 OID 19824) | |
| 1483 | +-- Name: user; Type: TABLE; Schema: public; Owner: - | |
| 1484 | +-- | |
| 1485 | + | |
| 1486 | +CREATE TABLE "user" ( | |
| 1487 | + id integer NOT NULL, | |
| 1488 | + username character varying(255) NOT NULL, | |
| 1489 | + auth_key character varying(32) NOT NULL, | |
| 1490 | + password_hash character varying(255) NOT NULL, | |
| 1491 | + password_reset_token character varying(255), | |
| 1492 | + email character varying(255) NOT NULL, | |
| 1493 | + status smallint DEFAULT 10 NOT NULL, | |
| 1494 | + created_at integer NOT NULL, | |
| 1495 | + updated_at integer NOT NULL | |
| 1496 | +); | |
| 1497 | + | |
| 1498 | + | |
| 1499 | +-- | |
| 1500 | +-- TOC entry 182 (class 1259 OID 19822) | |
| 1501 | +-- Name: user_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 1502 | +-- | |
| 1503 | + | |
| 1504 | +CREATE SEQUENCE user_id_seq | |
| 1505 | + START WITH 1 | |
| 1506 | + INCREMENT BY 1 | |
| 1507 | + NO MINVALUE | |
| 1508 | + NO MAXVALUE | |
| 1509 | + CACHE 1; | |
| 1510 | + | |
| 1511 | + | |
| 1512 | +-- | |
| 1513 | +-- TOC entry 2808 (class 0 OID 0) | |
| 1514 | +-- Dependencies: 182 | |
| 1515 | +-- Name: user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 1516 | +-- | |
| 1517 | + | |
| 1518 | +ALTER SEQUENCE user_id_seq OWNED BY "user".id; | |
| 1519 | + | |
| 1520 | + | |
| 1521 | +-- | |
| 1522 | +-- TOC entry 2342 (class 2604 OID 19945) | |
| 1523 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1524 | +-- | |
| 1525 | + | |
| 1526 | +ALTER TABLE ONLY article ALTER COLUMN id SET DEFAULT nextval('article_id_seq'::regclass); | |
| 1527 | + | |
| 1528 | + | |
| 1529 | +-- | |
| 1530 | +-- TOC entry 2343 (class 2604 OID 20237) | |
| 1531 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1532 | +-- | |
| 1533 | + | |
| 1534 | +ALTER TABLE ONLY banner ALTER COLUMN id SET DEFAULT nextval('banner_banner_id_seq'::regclass); | |
| 1535 | + | |
| 1536 | + | |
| 1537 | +-- | |
| 1538 | +-- TOC entry 2344 (class 2604 OID 20238) | |
| 1539 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1540 | +-- | |
| 1541 | + | |
| 1542 | +ALTER TABLE ONLY bg ALTER COLUMN id SET DEFAULT nextval('bg_id_seq'::regclass); | |
| 1543 | + | |
| 1544 | + | |
| 1545 | +-- | |
| 1546 | +-- TOC entry 2345 (class 2604 OID 20239) | |
| 1547 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1548 | +-- | |
| 1549 | + | |
| 1550 | +ALTER TABLE ONLY brand ALTER COLUMN id SET DEFAULT nextval('brand_brand_id_seq'::regclass); | |
| 1551 | + | |
| 1552 | + | |
| 1553 | +-- | |
| 1554 | +-- TOC entry 2348 (class 2604 OID 20240) | |
| 1555 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1556 | +-- | |
| 1557 | + | |
| 1558 | +ALTER TABLE ONLY category ALTER COLUMN id SET DEFAULT nextval('category_category_id_seq'::regclass); | |
| 1559 | + | |
| 1560 | + | |
| 1561 | +-- | |
| 1562 | +-- TOC entry 2349 (class 2604 OID 20241) | |
| 1563 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1564 | +-- | |
| 1565 | + | |
| 1566 | +ALTER TABLE ONLY customer ALTER COLUMN id SET DEFAULT nextval('customer_id_seq'::regclass); | |
| 1567 | + | |
| 1568 | + | |
| 1569 | +-- | |
| 1570 | +-- TOC entry 2350 (class 2604 OID 20242) | |
| 1571 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1572 | +-- | |
| 1573 | + | |
| 1574 | +ALTER TABLE ONLY event ALTER COLUMN id SET DEFAULT nextval('event_event_id_seq'::regclass); | |
| 1575 | + | |
| 1576 | + | |
| 1577 | +-- | |
| 1578 | +-- TOC entry 2351 (class 2604 OID 20243) | |
| 1579 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1580 | +-- | |
| 1581 | + | |
| 1582 | +ALTER TABLE ONLY feedback ALTER COLUMN id SET DEFAULT nextval('feedback_feedback_id_seq'::regclass); | |
| 1583 | + | |
| 1584 | + | |
| 1585 | +-- | |
| 1586 | +-- TOC entry 2339 (class 2604 OID 19845) | |
| 1587 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1588 | +-- | |
| 1589 | + | |
| 1590 | +ALTER TABLE ONLY language ALTER COLUMN id SET DEFAULT nextval('language_language_id_seq'::regclass); | |
| 1591 | + | |
| 1592 | + | |
| 1593 | +-- | |
| 1594 | +-- TOC entry 2352 (class 2604 OID 20244) | |
| 1595 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1596 | +-- | |
| 1597 | + | |
| 1598 | +ALTER TABLE ONLY "order" ALTER COLUMN id SET DEFAULT nextval('orders_id_seq1'::regclass); | |
| 1599 | + | |
| 1600 | + | |
| 1601 | +-- | |
| 1602 | +-- TOC entry 2353 (class 2604 OID 20245) | |
| 1603 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1604 | +-- | |
| 1605 | + | |
| 1606 | +ALTER TABLE ONLY order_delivery ALTER COLUMN id SET DEFAULT nextval('orders_delivery_id_seq'::regclass); | |
| 1607 | + | |
| 1608 | + | |
| 1609 | +-- | |
| 1610 | +-- TOC entry 2354 (class 2604 OID 20246) | |
| 1611 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1612 | +-- | |
| 1613 | + | |
| 1614 | +ALTER TABLE ONLY order_label ALTER COLUMN id SET DEFAULT nextval('orders_label_id_seq'::regclass); | |
| 1615 | + | |
| 1616 | + | |
| 1617 | +-- | |
| 1618 | +-- TOC entry 2355 (class 2604 OID 20247) | |
| 1619 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1620 | +-- | |
| 1621 | + | |
| 1622 | +ALTER TABLE ONLY order_product ALTER COLUMN id SET DEFAULT nextval('orders_products_id_seq'::regclass); | |
| 1623 | + | |
| 1624 | + | |
| 1625 | +-- | |
| 1626 | +-- TOC entry 2357 (class 2604 OID 20248) | |
| 1627 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1628 | +-- | |
| 1629 | + | |
| 1630 | +ALTER TABLE ONLY page ALTER COLUMN id SET DEFAULT nextval('page_id_seq'::regclass); | |
| 1631 | + | |
| 1632 | + | |
| 1633 | +-- | |
| 1634 | +-- TOC entry 2361 (class 2604 OID 20249) | |
| 1635 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1636 | +-- | |
| 1637 | + | |
| 1638 | +ALTER TABLE ONLY product ALTER COLUMN id SET DEFAULT nextval('product_product_id_seq'::regclass); | |
| 1639 | + | |
| 1640 | + | |
| 1641 | +-- | |
| 1642 | +-- TOC entry 2362 (class 2604 OID 20250) | |
| 1643 | +-- Name: product_image_id; Type: DEFAULT; Schema: public; Owner: - | |
| 1644 | +-- | |
| 1645 | + | |
| 1646 | +ALTER TABLE ONLY product_image ALTER COLUMN product_image_id SET DEFAULT nextval('product_image_product_image_id_seq'::regclass); | |
| 1647 | + | |
| 1648 | + | |
| 1649 | +-- | |
| 1650 | +-- TOC entry 2364 (class 2604 OID 20251) | |
| 1651 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1652 | +-- | |
| 1653 | + | |
| 1654 | +ALTER TABLE ONLY product_unit ALTER COLUMN id SET DEFAULT nextval('product_unit_product_unit_id_seq'::regclass); | |
| 1655 | + | |
| 1656 | + | |
| 1657 | +-- | |
| 1658 | +-- TOC entry 2365 (class 2604 OID 20252) | |
| 1659 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1660 | +-- | |
| 1661 | + | |
| 1662 | +ALTER TABLE ONLY product_variant ALTER COLUMN id SET DEFAULT nextval('product_variant_product_variant_id_seq'::regclass); | |
| 1663 | + | |
| 1664 | + | |
| 1665 | +-- | |
| 1666 | +-- TOC entry 2366 (class 2604 OID 20253) | |
| 1667 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1668 | +-- | |
| 1669 | + | |
| 1670 | +ALTER TABLE ONLY seo ALTER COLUMN id SET DEFAULT nextval('seo_seo_id_seq'::regclass); | |
| 1671 | + | |
| 1672 | + | |
| 1673 | +-- | |
| 1674 | +-- TOC entry 2367 (class 2604 OID 20254) | |
| 1675 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1676 | +-- | |
| 1677 | + | |
| 1678 | +ALTER TABLE ONLY seo_category ALTER COLUMN id SET DEFAULT nextval('seo_category_seo_category_id_seq'::regclass); | |
| 1679 | + | |
| 1680 | + | |
| 1681 | +-- | |
| 1682 | +-- TOC entry 2368 (class 2604 OID 20255) | |
| 1683 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1684 | +-- | |
| 1685 | + | |
| 1686 | +ALTER TABLE ONLY seo_dynamic ALTER COLUMN id SET DEFAULT nextval('seo_dynamic_seo_dynamic_id_seq'::regclass); | |
| 1687 | + | |
| 1688 | + | |
| 1689 | +-- | |
| 1690 | +-- TOC entry 2369 (class 2604 OID 20256) | |
| 1691 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1692 | +-- | |
| 1693 | + | |
| 1694 | +ALTER TABLE ONLY service ALTER COLUMN id SET DEFAULT nextval('service_service_id_seq'::regclass); | |
| 1695 | + | |
| 1696 | + | |
| 1697 | +-- | |
| 1698 | +-- TOC entry 2370 (class 2604 OID 20257) | |
| 1699 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1700 | +-- | |
| 1701 | + | |
| 1702 | +ALTER TABLE ONLY slider ALTER COLUMN id SET DEFAULT nextval('slider_slider_id_seq'::regclass); | |
| 1703 | + | |
| 1704 | + | |
| 1705 | +-- | |
| 1706 | +-- TOC entry 2371 (class 2604 OID 20258) | |
| 1707 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1708 | +-- | |
| 1709 | + | |
| 1710 | +ALTER TABLE ONLY slider_image ALTER COLUMN id SET DEFAULT nextval('slider_image_slider_image_id_seq'::regclass); | |
| 1711 | + | |
| 1712 | + | |
| 1713 | +-- | |
| 1714 | +-- TOC entry 2363 (class 2604 OID 20259) | |
| 1715 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1716 | +-- | |
| 1717 | + | |
| 1718 | +ALTER TABLE ONLY stock ALTER COLUMN id SET DEFAULT nextval('product_stock_product_stock_id_seq'::regclass); | |
| 1719 | + | |
| 1720 | + | |
| 1721 | +-- | |
| 1722 | +-- TOC entry 2375 (class 2604 OID 20260) | |
| 1723 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1724 | +-- | |
| 1725 | + | |
| 1726 | +ALTER TABLE ONLY tax_group ALTER COLUMN id SET DEFAULT nextval('tax_group_tax_group_id_seq'::regclass); | |
| 1727 | + | |
| 1728 | + | |
| 1729 | +-- | |
| 1730 | +-- TOC entry 2376 (class 2604 OID 20261) | |
| 1731 | +-- Name: tax_group_to_category_id; Type: DEFAULT; Schema: public; Owner: - | |
| 1732 | +-- | |
| 1733 | + | |
| 1734 | +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); | |
| 1735 | + | |
| 1736 | + | |
| 1737 | +-- | |
| 1738 | +-- TOC entry 2378 (class 2604 OID 20262) | |
| 1739 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1740 | +-- | |
| 1741 | + | |
| 1742 | +ALTER TABLE ONLY tax_option ALTER COLUMN id SET DEFAULT nextval('tax_option_tax_option_id_seq'::regclass); | |
| 1743 | + | |
| 1744 | + | |
| 1745 | +-- | |
| 1746 | +-- TOC entry 2337 (class 2604 OID 19827) | |
| 1747 | +-- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 1748 | +-- | |
| 1749 | + | |
| 1750 | +ALTER TABLE ONLY "user" ALTER COLUMN id SET DEFAULT nextval('user_id_seq'::regclass); | |
| 1751 | + | |
| 1752 | + | |
| 1753 | +-- | |
| 1754 | +-- TOC entry 2695 (class 0 OID 19920) | |
| 1755 | +-- Dependencies: 190 | |
| 1756 | +-- Data for Name: article; Type: TABLE DATA; Schema: public; Owner: - | |
| 1757 | +-- | |
| 1758 | + | |
| 1759 | +INSERT INTO article (id, image, created_at) VALUES (1, 'pic1_2.jpg', 1477180800); | |
| 1760 | + | |
| 1761 | + | |
| 1762 | +-- | |
| 1763 | +-- TOC entry 2809 (class 0 OID 0) | |
| 1764 | +-- Dependencies: 192 | |
| 1765 | +-- Name: article_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1766 | +-- | |
| 1767 | + | |
| 1768 | +SELECT pg_catalog.setval('article_id_seq', 1, true); | |
| 1769 | + | |
| 1770 | + | |
| 1771 | +-- | |
| 1772 | +-- TOC entry 2696 (class 0 OID 19925) | |
| 1773 | +-- Dependencies: 191 | |
| 1774 | +-- Data for Name: article_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 1775 | +-- | |
| 1776 | + | |
| 1777 | +INSERT INTO article_lang (article_id, language_id, title, body, meta_title, meta_keywords, meta_description, seo_text, h1, body_preview, alias) VALUES (1, 2, 'Тестовое название', '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> | |
| 1778 | + | |
| 1779 | +<p>Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.</p> | |
| 1780 | + | |
| 1781 | +<p>Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.</p> | |
| 1782 | + | |
| 1783 | +<p>Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus.</p> | |
| 1784 | + | |
| 1785 | +<p>Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,</p> | |
| 1786 | +', '', '', '', '', '', '', 'testovoe-nazvanie'); | |
| 1787 | +INSERT INTO article_lang (article_id, language_id, title, body, meta_title, meta_keywords, meta_description, seo_text, h1, body_preview, alias) VALUES (1, 3, 'Тестова назва', '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> | |
| 1788 | + | |
| 1789 | +<p>Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.</p> | |
| 1790 | + | |
| 1791 | +<p>Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.</p> | |
| 1792 | + | |
| 1793 | +<p>Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus.</p> | |
| 1794 | + | |
| 1795 | +<p>Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,</p> | |
| 1796 | +', '', '', '', '', '', '', 'testova-nazva'); | |
| 1797 | + | |
| 1798 | + | |
| 1799 | +-- | |
| 1800 | +-- TOC entry 2694 (class 0 OID 19897) | |
| 1801 | +-- Dependencies: 189 | |
| 1802 | +-- Data for Name: auth_assignment; Type: TABLE DATA; Schema: public; Owner: - | |
| 1803 | +-- | |
| 1804 | + | |
| 1805 | +INSERT INTO auth_assignment (item_name, user_id, created_at) VALUES ('admin', '1', 1); | |
| 1806 | + | |
| 1807 | + | |
| 1808 | +-- | |
| 1809 | +-- TOC entry 2692 (class 0 OID 19868) | |
| 1810 | +-- Dependencies: 187 | |
| 1811 | +-- Data for Name: auth_item; Type: TABLE DATA; Schema: public; Owner: - | |
| 1812 | +-- | |
| 1813 | + | |
| 1814 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('orders', 2, 'Заказы', NULL, NULL, 1463735507, 1463736083); | |
| 1815 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('seo', 2, 'SEO', NULL, NULL, 1463736416, 1463736416); | |
| 1816 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('seo-category', 2, 'SEO Категории', NULL, NULL, 1463736448, 1463736448); | |
| 1817 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('product', 2, 'Продукты', NULL, NULL, 1463736531, 1463736531); | |
| 1818 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('rubrication', 2, 'Рубрикации', NULL, NULL, 1463736556, 1463736556); | |
| 1819 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('relation', 2, 'Зависимости', NULL, NULL, 1463736575, 1463736575); | |
| 1820 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('banner', 2, 'Банеры', NULL, NULL, 1463738868, 1463738868); | |
| 1821 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('page', 2, 'текстовые страницы', NULL, NULL, 1463743391, 1463743391); | |
| 1822 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('user', 2, 'Пользователи', NULL, NULL, 1463743496, 1463743496); | |
| 1823 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('event', 2, 'Акции', NULL, NULL, 1463743669, 1463743669); | |
| 1824 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('brand', 2, 'Brand', NULL, NULL, 1463744537, 1463744537); | |
| 1825 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('category', 2, 'Category', NULL, NULL, 1463745810, 1463745814); | |
| 1826 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('slider', 2, 'Слайдер', NULL, NULL, 1463749607, 1463749607); | |
| 1827 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('bg', 2, 'Фон', NULL, NULL, 1463749640, 1463749640); | |
| 1828 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('customer', 2, 'Пользователи', NULL, NULL, 1463749675, 1463749675); | |
| 1829 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('permit', 2, 'Права', NULL, NULL, 1463750149, 1463750149); | |
| 1830 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('slider-image', 2, 'Картинки слайдера', NULL, NULL, 1464185251, 1464185251); | |
| 1831 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('person', 1, 'Персона', NULL, NULL, NULL, 1464186293); | |
| 1832 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('debug', 2, 'debug', NULL, NULL, 1464194890, 1464194903); | |
| 1833 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('seo-dynamic', 2, 'Динамическое SEO', NULL, NULL, 1464273621, 1464273621); | |
| 1834 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('manager', 1, 'Менеджер', NULL, NULL, 1464670630, 1464670630); | |
| 1835 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('artbox-comments', 2, 'Комменты', NULL, NULL, 1470303707, 1470303707); | |
| 1836 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('feedback', 2, 'Обратная связь', NULL, NULL, 1473168138, 1473168138); | |
| 1837 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('file', 2, 'Файлы', NULL, NULL, 1473427802, 1473427802); | |
| 1838 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('service', 2, 'Услуги', NULL, NULL, 1473509543, 1473509543); | |
| 1839 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('gii', 2, 'GII', NULL, NULL, 1473856734, 1473856734); | |
| 1840 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('project', 2, 'Project', NULL, NULL, 1473857270, 1473857270); | |
| 1841 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('certificate', 2, 'Сертификаты', NULL, NULL, 1474377855, 1474377855); | |
| 1842 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('delivery', 2, 'Доставка', NULL, NULL, 1476115225, 1476115265); | |
| 1843 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('label', 2, 'Статус заказа', NULL, NULL, 1476888240, 1476888240); | |
| 1844 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('admin', 1, 'Админ сайта', NULL, NULL, 1463735454, 1477085013); | |
| 1845 | +INSERT INTO auth_item (name, type, description, rule_name, data, created_at, updated_at) VALUES ('article', 2, 'Статьи', NULL, NULL, 1463748344, 1477256755); | |
| 1846 | + | |
| 1847 | + | |
| 1848 | +-- | |
| 1849 | +-- TOC entry 2693 (class 0 OID 19882) | |
| 1850 | +-- Dependencies: 188 | |
| 1851 | +-- Data for Name: auth_item_child; Type: TABLE DATA; Schema: public; Owner: - | |
| 1852 | +-- | |
| 1853 | + | |
| 1854 | +INSERT INTO auth_item_child (parent, child) VALUES ('person', 'customer'); | |
| 1855 | +INSERT INTO auth_item_child (parent, child) VALUES ('person', 'category'); | |
| 1856 | +INSERT INTO auth_item_child (parent, child) VALUES ('person', 'orders'); | |
| 1857 | +INSERT INTO auth_item_child (parent, child) VALUES ('manager', 'orders'); | |
| 1858 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'orders'); | |
| 1859 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'seo'); | |
| 1860 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'seo-category'); | |
| 1861 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'product'); | |
| 1862 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'rubrication'); | |
| 1863 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'relation'); | |
| 1864 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'banner'); | |
| 1865 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'page'); | |
| 1866 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'user'); | |
| 1867 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'event'); | |
| 1868 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'brand'); | |
| 1869 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'category'); | |
| 1870 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'slider'); | |
| 1871 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'bg'); | |
| 1872 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'customer'); | |
| 1873 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'permit'); | |
| 1874 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'slider-image'); | |
| 1875 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'debug'); | |
| 1876 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'seo-dynamic'); | |
| 1877 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'artbox-comments'); | |
| 1878 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'feedback'); | |
| 1879 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'file'); | |
| 1880 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'service'); | |
| 1881 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'gii'); | |
| 1882 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'project'); | |
| 1883 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'certificate'); | |
| 1884 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'delivery'); | |
| 1885 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'label'); | |
| 1886 | +INSERT INTO auth_item_child (parent, child) VALUES ('person', 'article'); | |
| 1887 | +INSERT INTO auth_item_child (parent, child) VALUES ('admin', 'article'); | |
| 1888 | + | |
| 1889 | + | |
| 1890 | +-- | |
| 1891 | +-- TOC entry 2691 (class 0 OID 19860) | |
| 1892 | +-- Dependencies: 186 | |
| 1893 | +-- Data for Name: auth_rule; Type: TABLE DATA; Schema: public; Owner: - | |
| 1894 | +-- | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | +-- | |
| 1899 | +-- TOC entry 2698 (class 0 OID 19946) | |
| 1900 | +-- Dependencies: 193 | |
| 1901 | +-- Data for Name: banner; Type: TABLE DATA; Schema: public; Owner: - | |
| 1902 | +-- | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | +-- | |
| 1907 | +-- TOC entry 2810 (class 0 OID 0) | |
| 1908 | +-- Dependencies: 194 | |
| 1909 | +-- Name: banner_banner_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1910 | +-- | |
| 1911 | + | |
| 1912 | +SELECT pg_catalog.setval('banner_banner_id_seq', 1, true); | |
| 1913 | + | |
| 1914 | + | |
| 1915 | +-- | |
| 1916 | +-- TOC entry 2700 (class 0 OID 19951) | |
| 1917 | +-- Dependencies: 195 | |
| 1918 | +-- Data for Name: banner_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 1919 | +-- | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | +-- | |
| 1924 | +-- TOC entry 2701 (class 0 OID 19957) | |
| 1925 | +-- Dependencies: 196 | |
| 1926 | +-- Data for Name: bg; Type: TABLE DATA; Schema: public; Owner: - | |
| 1927 | +-- | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | +-- | |
| 1932 | +-- TOC entry 2811 (class 0 OID 0) | |
| 1933 | +-- Dependencies: 197 | |
| 1934 | +-- Name: bg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1935 | +-- | |
| 1936 | + | |
| 1937 | +SELECT pg_catalog.setval('bg_id_seq', 1, false); | |
| 1938 | + | |
| 1939 | + | |
| 1940 | +-- | |
| 1941 | +-- TOC entry 2703 (class 0 OID 19965) | |
| 1942 | +-- Dependencies: 198 | |
| 1943 | +-- Data for Name: bg_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 1944 | +-- | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | +-- | |
| 1949 | +-- TOC entry 2704 (class 0 OID 19968) | |
| 1950 | +-- Dependencies: 199 | |
| 1951 | +-- Data for Name: brand; Type: TABLE DATA; Schema: public; Owner: - | |
| 1952 | +-- | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | +-- | |
| 1957 | +-- TOC entry 2812 (class 0 OID 0) | |
| 1958 | +-- Dependencies: 200 | |
| 1959 | +-- Name: brand_brand_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1960 | +-- | |
| 1961 | + | |
| 1962 | +SELECT pg_catalog.setval('brand_brand_id_seq', 1, false); | |
| 1963 | + | |
| 1964 | + | |
| 1965 | +-- | |
| 1966 | +-- TOC entry 2706 (class 0 OID 19976) | |
| 1967 | +-- Dependencies: 201 | |
| 1968 | +-- Data for Name: brand_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 1969 | +-- | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | +-- | |
| 1974 | +-- TOC entry 2707 (class 0 OID 19982) | |
| 1975 | +-- Dependencies: 202 | |
| 1976 | +-- Data for Name: category; Type: TABLE DATA; Schema: public; Owner: - | |
| 1977 | +-- | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | +-- | |
| 1982 | +-- TOC entry 2813 (class 0 OID 0) | |
| 1983 | +-- Dependencies: 203 | |
| 1984 | +-- Name: category_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1985 | +-- | |
| 1986 | + | |
| 1987 | +SELECT pg_catalog.setval('category_category_id_seq', 1, false); | |
| 1988 | + | |
| 1989 | + | |
| 1990 | +-- | |
| 1991 | +-- TOC entry 2709 (class 0 OID 19992) | |
| 1992 | +-- Dependencies: 204 | |
| 1993 | +-- Data for Name: category_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 1994 | +-- | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | +-- | |
| 1999 | +-- TOC entry 2710 (class 0 OID 19998) | |
| 2000 | +-- Dependencies: 205 | |
| 2001 | +-- Data for Name: customer; Type: TABLE DATA; Schema: public; Owner: - | |
| 2002 | +-- | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | +-- | |
| 2007 | +-- TOC entry 2814 (class 0 OID 0) | |
| 2008 | +-- Dependencies: 206 | |
| 2009 | +-- Name: customer_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2010 | +-- | |
| 2011 | + | |
| 2012 | +SELECT pg_catalog.setval('customer_id_seq', 1, false); | |
| 2013 | + | |
| 2014 | + | |
| 2015 | +-- | |
| 2016 | +-- TOC entry 2712 (class 0 OID 20006) | |
| 2017 | +-- Dependencies: 207 | |
| 2018 | +-- Data for Name: event; Type: TABLE DATA; Schema: public; Owner: - | |
| 2019 | +-- | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | +-- | |
| 2024 | +-- TOC entry 2815 (class 0 OID 0) | |
| 2025 | +-- Dependencies: 208 | |
| 2026 | +-- Name: event_event_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2027 | +-- | |
| 2028 | + | |
| 2029 | +SELECT pg_catalog.setval('event_event_id_seq', 1, false); | |
| 2030 | + | |
| 2031 | + | |
| 2032 | +-- | |
| 2033 | +-- TOC entry 2714 (class 0 OID 20011) | |
| 2034 | +-- Dependencies: 209 | |
| 2035 | +-- Data for Name: event_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2036 | +-- | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | +-- | |
| 2041 | +-- TOC entry 2715 (class 0 OID 20017) | |
| 2042 | +-- Dependencies: 210 | |
| 2043 | +-- Data for Name: feedback; Type: TABLE DATA; Schema: public; Owner: - | |
| 2044 | +-- | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | +-- | |
| 2049 | +-- TOC entry 2816 (class 0 OID 0) | |
| 2050 | +-- Dependencies: 211 | |
| 2051 | +-- Name: feedback_feedback_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2052 | +-- | |
| 2053 | + | |
| 2054 | +SELECT pg_catalog.setval('feedback_feedback_id_seq', 1, false); | |
| 2055 | + | |
| 2056 | + | |
| 2057 | +-- | |
| 2058 | +-- TOC entry 2690 (class 0 OID 19842) | |
| 2059 | +-- Dependencies: 185 | |
| 2060 | +-- Data for Name: language; Type: TABLE DATA; Schema: public; Owner: - | |
| 2061 | +-- | |
| 2062 | + | |
| 2063 | +INSERT INTO language (id, url, local, name, "default", created_at, updated_at, status) VALUES (1, 'en', 'en-EN', 'English', false, 1477164376, 1477164376, false); | |
| 2064 | +INSERT INTO language (id, url, local, name, "default", created_at, updated_at, status) VALUES (2, 'ru', 'ru-RU', 'Русский', true, 1477164376, 1477164376, true); | |
| 2065 | +INSERT INTO language (id, url, local, name, "default", created_at, updated_at, status) VALUES (3, 'ua', 'ua-UA', 'Українська', false, 1477164376, 1477164376, true); | |
| 2066 | + | |
| 2067 | + | |
| 2068 | +-- | |
| 2069 | +-- TOC entry 2817 (class 0 OID 0) | |
| 2070 | +-- Dependencies: 184 | |
| 2071 | +-- Name: language_language_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2072 | +-- | |
| 2073 | + | |
| 2074 | +SELECT pg_catalog.setval('language_language_id_seq', 1, false); | |
| 2075 | + | |
| 2076 | + | |
| 2077 | +-- | |
| 2078 | +-- TOC entry 2686 (class 0 OID 19817) | |
| 2079 | +-- Dependencies: 181 | |
| 2080 | +-- Data for Name: migration; Type: TABLE DATA; Schema: public; Owner: - | |
| 2081 | +-- | |
| 2082 | + | |
| 2083 | +INSERT INTO migration (version, apply_time) VALUES ('m000000_000000_base', 1477163247); | |
| 2084 | +INSERT INTO migration (version, apply_time) VALUES ('m130524_201442_init', 1477163249); | |
| 2085 | +INSERT INTO migration (version, apply_time) VALUES ('m160829_104745_create_table_language', 1477164376); | |
| 2086 | +INSERT INTO migration (version, apply_time) VALUES ('m160829_105345_add_default_languages', 1477164376); | |
| 2087 | +INSERT INTO migration (version, apply_time) VALUES ('m160901_140639_add_ukrainian_language', 1477164376); | |
| 2088 | +INSERT INTO migration (version, apply_time) VALUES ('m160927_124151_add_status_column', 1477164376); | |
| 2089 | +INSERT INTO migration (version, apply_time) VALUES ('m140506_102106_rbac_init', 1477172015); | |
| 2090 | + | |
| 2091 | + | |
| 2092 | +-- | |
| 2093 | +-- TOC entry 2717 (class 0 OID 20025) | |
| 2094 | +-- Dependencies: 212 | |
| 2095 | +-- Data for Name: order; Type: TABLE DATA; Schema: public; Owner: - | |
| 2096 | +-- | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | +-- | |
| 2101 | +-- TOC entry 2718 (class 0 OID 20031) | |
| 2102 | +-- Dependencies: 213 | |
| 2103 | +-- Data for Name: order_delivery; Type: TABLE DATA; Schema: public; Owner: - | |
| 2104 | +-- | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | +-- | |
| 2109 | +-- TOC entry 2720 (class 0 OID 20036) | |
| 2110 | +-- Dependencies: 215 | |
| 2111 | +-- Data for Name: order_delivery_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2112 | +-- | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | +-- | |
| 2117 | +-- TOC entry 2722 (class 0 OID 20044) | |
| 2118 | +-- Dependencies: 217 | |
| 2119 | +-- Data for Name: order_label; Type: TABLE DATA; Schema: public; Owner: - | |
| 2120 | +-- | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | +-- | |
| 2125 | +-- TOC entry 2724 (class 0 OID 20049) | |
| 2126 | +-- Dependencies: 219 | |
| 2127 | +-- Data for Name: order_label_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2128 | +-- | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | +-- | |
| 2133 | +-- TOC entry 2725 (class 0 OID 20052) | |
| 2134 | +-- Dependencies: 220 | |
| 2135 | +-- Data for Name: order_product; Type: TABLE DATA; Schema: public; Owner: - | |
| 2136 | +-- | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | +-- | |
| 2141 | +-- TOC entry 2818 (class 0 OID 0) | |
| 2142 | +-- Dependencies: 214 | |
| 2143 | +-- Name: orders_delivery_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2144 | +-- | |
| 2145 | + | |
| 2146 | +SELECT pg_catalog.setval('orders_delivery_id_seq', 1, false); | |
| 2147 | + | |
| 2148 | + | |
| 2149 | +-- | |
| 2150 | +-- TOC entry 2819 (class 0 OID 0) | |
| 2151 | +-- Dependencies: 216 | |
| 2152 | +-- Name: orders_id_seq1; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2153 | +-- | |
| 2154 | + | |
| 2155 | +SELECT pg_catalog.setval('orders_id_seq1', 1, false); | |
| 2156 | + | |
| 2157 | + | |
| 2158 | +-- | |
| 2159 | +-- TOC entry 2820 (class 0 OID 0) | |
| 2160 | +-- Dependencies: 218 | |
| 2161 | +-- Name: orders_label_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2162 | +-- | |
| 2163 | + | |
| 2164 | +SELECT pg_catalog.setval('orders_label_id_seq', 1, false); | |
| 2165 | + | |
| 2166 | + | |
| 2167 | +-- | |
| 2168 | +-- TOC entry 2821 (class 0 OID 0) | |
| 2169 | +-- Dependencies: 221 | |
| 2170 | +-- Name: orders_products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1923 | 2171 | -- |
| 1924 | 2172 | |
| 1925 | -CREATE SEQUENCE tax_option_tax_option_id_seq | |
| 1926 | - START WITH 1 | |
| 1927 | - INCREMENT BY 1 | |
| 1928 | - NO MINVALUE | |
| 1929 | - NO MAXVALUE | |
| 1930 | - CACHE 1; | |
| 2173 | +SELECT pg_catalog.setval('orders_products_id_seq', 1, false); | |
| 1931 | 2174 | |
| 1932 | 2175 | |
| 1933 | 2176 | -- |
| 1934 | --- TOC entry 3596 (class 0 OID 0) | |
| 1935 | --- Dependencies: 247 | |
| 1936 | --- Name: tax_option_tax_option_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 2177 | +-- TOC entry 2727 (class 0 OID 20060) | |
| 2178 | +-- Dependencies: 222 | |
| 2179 | +-- Data for Name: page; Type: TABLE DATA; Schema: public; Owner: - | |
| 1937 | 2180 | -- |
| 1938 | 2181 | |
| 1939 | -ALTER SEQUENCE tax_option_tax_option_id_seq OWNED BY tax_option.tax_option_id; | |
| 1940 | 2182 | |
| 1941 | 2183 | |
| 1942 | 2184 | -- |
| 1943 | --- TOC entry 176 (class 1259 OID 25311) | |
| 1944 | --- Name: user; Type: TABLE; Schema: public; Owner: - | |
| 2185 | +-- TOC entry 2822 (class 0 OID 0) | |
| 2186 | +-- Dependencies: 223 | |
| 2187 | +-- Name: page_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 1945 | 2188 | -- |
| 1946 | 2189 | |
| 1947 | -CREATE TABLE "user" ( | |
| 1948 | - id integer NOT NULL, | |
| 1949 | - username character varying(255) NOT NULL, | |
| 1950 | - auth_key character varying(32) NOT NULL, | |
| 1951 | - password_hash character varying(255) NOT NULL, | |
| 1952 | - password_reset_token character varying(255), | |
| 1953 | - email character varying(255) NOT NULL, | |
| 1954 | - status smallint DEFAULT 10 NOT NULL, | |
| 1955 | - created_at integer NOT NULL, | |
| 1956 | - updated_at integer NOT NULL | |
| 1957 | -); | |
| 2190 | +SELECT pg_catalog.setval('page_id_seq', 1, false); | |
| 1958 | 2191 | |
| 1959 | 2192 | |
| 1960 | 2193 | -- |
| 1961 | --- TOC entry 177 (class 1259 OID 25318) | |
| 1962 | --- Name: user_id_seq; Type: SEQUENCE; Schema: public; Owner: - | |
| 2194 | +-- TOC entry 2729 (class 0 OID 20066) | |
| 2195 | +-- Dependencies: 224 | |
| 2196 | +-- Data for Name: page_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 1963 | 2197 | -- |
| 1964 | 2198 | |
| 1965 | -CREATE SEQUENCE user_id_seq | |
| 1966 | - START WITH 1 | |
| 1967 | - INCREMENT BY 1 | |
| 1968 | - NO MINVALUE | |
| 1969 | - NO MAXVALUE | |
| 1970 | - CACHE 1; | |
| 1971 | 2199 | |
| 1972 | 2200 | |
| 1973 | 2201 | -- |
| 1974 | --- TOC entry 3597 (class 0 OID 0) | |
| 1975 | --- Dependencies: 177 | |
| 1976 | --- Name: user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - | |
| 2202 | +-- TOC entry 2730 (class 0 OID 20072) | |
| 2203 | +-- Dependencies: 225 | |
| 2204 | +-- Data for Name: product; Type: TABLE DATA; Schema: public; Owner: - | |
| 1977 | 2205 | -- |
| 1978 | 2206 | |
| 1979 | -ALTER SEQUENCE user_id_seq OWNED BY "user".id; | |
| 1980 | 2207 | |
| 1981 | 2208 | |
| 1982 | 2209 | -- |
| 1983 | --- TOC entry 3148 (class 2604 OID 25997) | |
| 1984 | --- Name: artbox_comment_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2210 | +-- TOC entry 2731 (class 0 OID 20081) | |
| 2211 | +-- Dependencies: 226 | |
| 2212 | +-- Data for Name: product_category; Type: TABLE DATA; Schema: public; Owner: - | |
| 1985 | 2213 | -- |
| 1986 | 2214 | |
| 1987 | -ALTER TABLE ONLY artbox_comment ALTER COLUMN artbox_comment_id SET DEFAULT nextval('artbox_comment_artbox_comment_id_seq'::regclass); | |
| 1988 | 2215 | |
| 1989 | 2216 | |
| 1990 | 2217 | -- |
| 1991 | --- TOC entry 3149 (class 2604 OID 25998) | |
| 1992 | --- Name: artbox_comment_rating_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2218 | +-- TOC entry 2732 (class 0 OID 20084) | |
| 2219 | +-- Dependencies: 227 | |
| 2220 | +-- Data for Name: product_image; Type: TABLE DATA; Schema: public; Owner: - | |
| 1993 | 2221 | -- |
| 1994 | 2222 | |
| 1995 | -ALTER TABLE ONLY artbox_comment_rating ALTER COLUMN artbox_comment_rating_id SET DEFAULT nextval('artbox_comment_rating_artbox_comment_rating_id_seq'::regclass); | |
| 1996 | 2223 | |
| 1997 | 2224 | |
| 1998 | 2225 | -- |
| 1999 | --- TOC entry 3151 (class 2604 OID 25999) | |
| 2000 | --- Name: artbox_like_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2226 | +-- TOC entry 2823 (class 0 OID 0) | |
| 2227 | +-- Dependencies: 228 | |
| 2228 | +-- Name: product_image_product_image_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2001 | 2229 | -- |
| 2002 | 2230 | |
| 2003 | -ALTER TABLE ONLY artbox_like ALTER COLUMN artbox_like_id SET DEFAULT nextval('artbox_like_artbox_like_id_seq'::regclass); | |
| 2231 | +SELECT pg_catalog.setval('product_image_product_image_id_seq', 1, false); | |
| 2004 | 2232 | |
| 2005 | 2233 | |
| 2006 | 2234 | -- |
| 2007 | --- TOC entry 3153 (class 2604 OID 26000) | |
| 2008 | --- Name: article_to_rating_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2235 | +-- TOC entry 2734 (class 0 OID 20092) | |
| 2236 | +-- Dependencies: 229 | |
| 2237 | +-- Data for Name: product_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2009 | 2238 | -- |
| 2010 | 2239 | |
| 2011 | -ALTER TABLE ONLY article_to_rating ALTER COLUMN article_to_rating_id SET DEFAULT nextval('article_to_rating_article_to_rating_id_seq'::regclass); | |
| 2012 | 2240 | |
| 2013 | 2241 | |
| 2014 | 2242 | -- |
| 2015 | --- TOC entry 3154 (class 2604 OID 26001) | |
| 2016 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2243 | +-- TOC entry 2735 (class 0 OID 20098) | |
| 2244 | +-- Dependencies: 230 | |
| 2245 | +-- Data for Name: product_option; Type: TABLE DATA; Schema: public; Owner: - | |
| 2017 | 2246 | -- |
| 2018 | 2247 | |
| 2019 | -ALTER TABLE ONLY articles ALTER COLUMN id SET DEFAULT nextval('articles_id_seq'::regclass); | |
| 2020 | 2248 | |
| 2021 | 2249 | |
| 2022 | 2250 | -- |
| 2023 | --- TOC entry 3155 (class 2604 OID 26002) | |
| 2024 | --- Name: banner_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2251 | +-- TOC entry 2824 (class 0 OID 0) | |
| 2252 | +-- Dependencies: 231 | |
| 2253 | +-- Name: product_product_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2025 | 2254 | -- |
| 2026 | 2255 | |
| 2027 | -ALTER TABLE ONLY banner ALTER COLUMN banner_id SET DEFAULT nextval('banner_banner_id_seq'::regclass); | |
| 2256 | +SELECT pg_catalog.setval('product_product_id_seq', 1, true); | |
| 2028 | 2257 | |
| 2029 | 2258 | |
| 2030 | 2259 | -- |
| 2031 | --- TOC entry 3156 (class 2604 OID 26003) | |
| 2032 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2260 | +-- TOC entry 2737 (class 0 OID 20103) | |
| 2261 | +-- Dependencies: 232 | |
| 2262 | +-- Data for Name: product_stock; Type: TABLE DATA; Schema: public; Owner: - | |
| 2033 | 2263 | -- |
| 2034 | 2264 | |
| 2035 | -ALTER TABLE ONLY bg ALTER COLUMN id SET DEFAULT nextval('bg_id_seq'::regclass); | |
| 2036 | 2265 | |
| 2037 | 2266 | |
| 2038 | 2267 | -- |
| 2039 | --- TOC entry 3157 (class 2604 OID 26005) | |
| 2040 | --- Name: brand_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2268 | +-- TOC entry 2825 (class 0 OID 0) | |
| 2269 | +-- Dependencies: 234 | |
| 2270 | +-- Name: product_stock_product_stock_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2041 | 2271 | -- |
| 2042 | 2272 | |
| 2043 | -ALTER TABLE ONLY brand ALTER COLUMN brand_id SET DEFAULT nextval('brand_brand_id_seq'::regclass); | |
| 2273 | +SELECT pg_catalog.setval('product_stock_product_stock_id_seq', 1, true); | |
| 2044 | 2274 | |
| 2045 | 2275 | |
| 2046 | 2276 | -- |
| 2047 | --- TOC entry 3160 (class 2604 OID 26006) | |
| 2048 | --- Name: category_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2277 | +-- TOC entry 2740 (class 0 OID 20111) | |
| 2278 | +-- Dependencies: 235 | |
| 2279 | +-- Data for Name: product_unit; Type: TABLE DATA; Schema: public; Owner: - | |
| 2049 | 2280 | -- |
| 2050 | 2281 | |
| 2051 | -ALTER TABLE ONLY category ALTER COLUMN category_id SET DEFAULT nextval('category_category_id_seq'::regclass); | |
| 2052 | 2282 | |
| 2053 | 2283 | |
| 2054 | 2284 | -- |
| 2055 | --- TOC entry 3200 (class 2604 OID 28348) | |
| 2056 | --- Name: certificate_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2285 | +-- TOC entry 2741 (class 0 OID 20114) | |
| 2286 | +-- Dependencies: 236 | |
| 2287 | +-- Data for Name: product_unit_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2057 | 2288 | -- |
| 2058 | 2289 | |
| 2059 | -ALTER TABLE ONLY certificate ALTER COLUMN certificate_id SET DEFAULT nextval('certificate_certificate_id_seq'::regclass); | |
| 2060 | 2290 | |
| 2061 | 2291 | |
| 2062 | 2292 | -- |
| 2063 | --- TOC entry 3161 (class 2604 OID 26008) | |
| 2064 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2293 | +-- TOC entry 2826 (class 0 OID 0) | |
| 2294 | +-- Dependencies: 237 | |
| 2295 | +-- Name: product_unit_product_unit_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2065 | 2296 | -- |
| 2066 | 2297 | |
| 2067 | -ALTER TABLE ONLY customer ALTER COLUMN id SET DEFAULT nextval('customer_id_seq'::regclass); | |
| 2298 | +SELECT pg_catalog.setval('product_unit_product_unit_id_seq', 1, false); | |
| 2068 | 2299 | |
| 2069 | 2300 | |
| 2070 | 2301 | -- |
| 2071 | --- TOC entry 3162 (class 2604 OID 26009) | |
| 2072 | --- Name: event_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2302 | +-- TOC entry 2743 (class 0 OID 20122) | |
| 2303 | +-- Dependencies: 238 | |
| 2304 | +-- Data for Name: product_variant; Type: TABLE DATA; Schema: public; Owner: - | |
| 2073 | 2305 | -- |
| 2074 | 2306 | |
| 2075 | -ALTER TABLE ONLY event ALTER COLUMN event_id SET DEFAULT nextval('event_event_id_seq'::regclass); | |
| 2076 | 2307 | |
| 2077 | 2308 | |
| 2078 | 2309 | -- |
| 2079 | --- TOC entry 3163 (class 2604 OID 26010) | |
| 2080 | --- Name: feedback_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2310 | +-- TOC entry 2744 (class 0 OID 20128) | |
| 2311 | +-- Dependencies: 239 | |
| 2312 | +-- Data for Name: product_variant_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2081 | 2313 | -- |
| 2082 | 2314 | |
| 2083 | -ALTER TABLE ONLY feedback ALTER COLUMN feedback_id SET DEFAULT nextval('feedback_feedback_id_seq'::regclass); | |
| 2084 | 2315 | |
| 2085 | 2316 | |
| 2086 | 2317 | -- |
| 2087 | --- TOC entry 3141 (class 2604 OID 25320) | |
| 2088 | --- Name: language_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2318 | +-- TOC entry 2745 (class 0 OID 20131) | |
| 2319 | +-- Dependencies: 240 | |
| 2320 | +-- Data for Name: product_variant_option; Type: TABLE DATA; Schema: public; Owner: - | |
| 2089 | 2321 | -- |
| 2090 | 2322 | |
| 2091 | -ALTER TABLE ONLY language ALTER COLUMN language_id SET DEFAULT nextval('language_language_id_seq'::regclass); | |
| 2092 | 2323 | |
| 2093 | 2324 | |
| 2094 | 2325 | -- |
| 2095 | --- TOC entry 3164 (class 2604 OID 26012) | |
| 2096 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2326 | +-- TOC entry 2827 (class 0 OID 0) | |
| 2327 | +-- Dependencies: 241 | |
| 2328 | +-- Name: product_variant_product_variant_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2097 | 2329 | -- |
| 2098 | 2330 | |
| 2099 | -ALTER TABLE ONLY orders ALTER COLUMN id SET DEFAULT nextval('orders_id_seq1'::regclass); | |
| 2331 | +SELECT pg_catalog.setval('product_variant_product_variant_id_seq', 2, true); | |
| 2100 | 2332 | |
| 2101 | 2333 | |
| 2102 | 2334 | -- |
| 2103 | --- TOC entry 3165 (class 2604 OID 26013) | |
| 2104 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2335 | +-- TOC entry 2747 (class 0 OID 20136) | |
| 2336 | +-- Dependencies: 242 | |
| 2337 | +-- Data for Name: seo; Type: TABLE DATA; Schema: public; Owner: - | |
| 2105 | 2338 | -- |
| 2106 | 2339 | |
| 2107 | -ALTER TABLE ONLY orders_delivery ALTER COLUMN id SET DEFAULT nextval('orders_delivery_id_seq'::regclass); | |
| 2108 | 2340 | |
| 2109 | 2341 | |
| 2110 | 2342 | -- |
| 2111 | --- TOC entry 3166 (class 2604 OID 26014) | |
| 2112 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2343 | +-- TOC entry 2748 (class 0 OID 20139) | |
| 2344 | +-- Dependencies: 243 | |
| 2345 | +-- Data for Name: seo_category; Type: TABLE DATA; Schema: public; Owner: - | |
| 2113 | 2346 | -- |
| 2114 | 2347 | |
| 2115 | -ALTER TABLE ONLY orders_label ALTER COLUMN id SET DEFAULT nextval('orders_label_id_seq'::regclass); | |
| 2116 | 2348 | |
| 2117 | 2349 | |
| 2118 | 2350 | -- |
| 2119 | --- TOC entry 3167 (class 2604 OID 26015) | |
| 2120 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2351 | +-- TOC entry 2749 (class 0 OID 20142) | |
| 2352 | +-- Dependencies: 244 | |
| 2353 | +-- Data for Name: seo_category_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2121 | 2354 | -- |
| 2122 | 2355 | |
| 2123 | -ALTER TABLE ONLY orders_products ALTER COLUMN id SET DEFAULT nextval('orders_products_id_seq'::regclass); | |
| 2124 | 2356 | |
| 2125 | 2357 | |
| 2126 | 2358 | -- |
| 2127 | --- TOC entry 3168 (class 2604 OID 26016) | |
| 2128 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2359 | +-- TOC entry 2828 (class 0 OID 0) | |
| 2360 | +-- Dependencies: 245 | |
| 2361 | +-- Name: seo_category_seo_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2129 | 2362 | -- |
| 2130 | 2363 | |
| 2131 | -ALTER TABLE ONLY page ALTER COLUMN id SET DEFAULT nextval('page_id_seq'::regclass); | |
| 2364 | +SELECT pg_catalog.setval('seo_category_seo_category_id_seq', 1, false); | |
| 2132 | 2365 | |
| 2133 | 2366 | |
| 2134 | 2367 | -- |
| 2135 | --- TOC entry 3173 (class 2604 OID 26017) | |
| 2136 | --- Name: product_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2368 | +-- TOC entry 2751 (class 0 OID 20147) | |
| 2369 | +-- Dependencies: 246 | |
| 2370 | +-- Data for Name: seo_dynamic; Type: TABLE DATA; Schema: public; Owner: - | |
| 2137 | 2371 | -- |
| 2138 | 2372 | |
| 2139 | -ALTER TABLE ONLY product ALTER COLUMN product_id SET DEFAULT nextval('product_product_id_seq'::regclass); | |
| 2140 | 2373 | |
| 2141 | 2374 | |
| 2142 | 2375 | -- |
| 2143 | --- TOC entry 3199 (class 2604 OID 28329) | |
| 2144 | --- Name: product_certificate_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2376 | +-- TOC entry 2752 (class 0 OID 20153) | |
| 2377 | +-- Dependencies: 247 | |
| 2378 | +-- Data for Name: seo_dynamic_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2145 | 2379 | -- |
| 2146 | 2380 | |
| 2147 | -ALTER TABLE ONLY product_certificate ALTER COLUMN product_certificate_id SET DEFAULT nextval('product_certificate_product_certificate_id_seq'::regclass); | |
| 2148 | 2381 | |
| 2149 | 2382 | |
| 2150 | 2383 | -- |
| 2151 | --- TOC entry 3174 (class 2604 OID 26018) | |
| 2152 | --- Name: product_image_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2384 | +-- TOC entry 2829 (class 0 OID 0) | |
| 2385 | +-- Dependencies: 248 | |
| 2386 | +-- Name: seo_dynamic_seo_dynamic_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2153 | 2387 | -- |
| 2154 | 2388 | |
| 2155 | -ALTER TABLE ONLY product_image ALTER COLUMN product_image_id SET DEFAULT nextval('product_image_product_image_id_seq'::regclass); | |
| 2389 | +SELECT pg_catalog.setval('seo_dynamic_seo_dynamic_id_seq', 1, false); | |
| 2156 | 2390 | |
| 2157 | 2391 | |
| 2158 | 2392 | -- |
| 2159 | --- TOC entry 3198 (class 2604 OID 28312) | |
| 2160 | --- Name: product_spec_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2393 | +-- TOC entry 2754 (class 0 OID 20161) | |
| 2394 | +-- Dependencies: 249 | |
| 2395 | +-- Data for Name: seo_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2161 | 2396 | -- |
| 2162 | 2397 | |
| 2163 | -ALTER TABLE ONLY product_spec ALTER COLUMN product_spec_id SET DEFAULT nextval('product_spec_product_spec_id_seq'::regclass); | |
| 2164 | 2398 | |
| 2165 | 2399 | |
| 2166 | 2400 | -- |
| 2167 | --- TOC entry 3197 (class 2604 OID 28279) | |
| 2168 | --- Name: product_to_project_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2401 | +-- TOC entry 2830 (class 0 OID 0) | |
| 2402 | +-- Dependencies: 250 | |
| 2403 | +-- Name: seo_seo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2169 | 2404 | -- |
| 2170 | 2405 | |
| 2171 | -ALTER TABLE ONLY product_to_project ALTER COLUMN product_to_project_id SET DEFAULT nextval('product_to_project_product_to_project_id_seq'::regclass); | |
| 2406 | +SELECT pg_catalog.setval('seo_seo_id_seq', 1, false); | |
| 2172 | 2407 | |
| 2173 | 2408 | |
| 2174 | 2409 | -- |
| 2175 | --- TOC entry 3177 (class 2604 OID 26019) | |
| 2176 | --- Name: product_to_rating_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2410 | +-- TOC entry 2756 (class 0 OID 20169) | |
| 2411 | +-- Dependencies: 251 | |
| 2412 | +-- Data for Name: service; Type: TABLE DATA; Schema: public; Owner: - | |
| 2177 | 2413 | -- |
| 2178 | 2414 | |
| 2179 | -ALTER TABLE ONLY product_to_rating ALTER COLUMN product_to_rating_id SET DEFAULT nextval('product_to_rating_product_to_rating_id_seq'::regclass); | |
| 2180 | 2415 | |
| 2181 | 2416 | |
| 2182 | 2417 | -- |
| 2183 | --- TOC entry 3178 (class 2604 OID 26020) | |
| 2184 | --- Name: product_unit_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2418 | +-- TOC entry 2757 (class 0 OID 20172) | |
| 2419 | +-- Dependencies: 252 | |
| 2420 | +-- Data for Name: service_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2185 | 2421 | -- |
| 2186 | 2422 | |
| 2187 | -ALTER TABLE ONLY product_unit ALTER COLUMN product_unit_id SET DEFAULT nextval('product_unit_product_unit_id_seq'::regclass); | |
| 2188 | 2423 | |
| 2189 | 2424 | |
| 2190 | 2425 | -- |
| 2191 | --- TOC entry 3179 (class 2604 OID 26021) | |
| 2192 | --- Name: product_variant_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2426 | +-- TOC entry 2831 (class 0 OID 0) | |
| 2427 | +-- Dependencies: 253 | |
| 2428 | +-- Name: service_service_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2193 | 2429 | -- |
| 2194 | 2430 | |
| 2195 | -ALTER TABLE ONLY product_variant ALTER COLUMN product_variant_id SET DEFAULT nextval('product_variant_product_variant_id_seq'::regclass); | |
| 2431 | +SELECT pg_catalog.setval('service_service_id_seq', 1, false); | |
| 2196 | 2432 | |
| 2197 | 2433 | |
| 2198 | 2434 | -- |
| 2199 | --- TOC entry 3195 (class 2604 OID 27424) | |
| 2200 | --- Name: project_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2435 | +-- TOC entry 2759 (class 0 OID 20180) | |
| 2436 | +-- Dependencies: 254 | |
| 2437 | +-- Data for Name: slider; Type: TABLE DATA; Schema: public; Owner: - | |
| 2201 | 2438 | -- |
| 2202 | 2439 | |
| 2203 | -ALTER TABLE ONLY project ALTER COLUMN project_id SET DEFAULT nextval('project_project_id_seq'::regclass); | |
| 2204 | 2440 | |
| 2205 | 2441 | |
| 2206 | 2442 | -- |
| 2207 | --- TOC entry 3196 (class 2604 OID 27435) | |
| 2208 | --- Name: project_image_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2443 | +-- TOC entry 2760 (class 0 OID 20183) | |
| 2444 | +-- Dependencies: 255 | |
| 2445 | +-- Data for Name: slider_image; Type: TABLE DATA; Schema: public; Owner: - | |
| 2209 | 2446 | -- |
| 2210 | 2447 | |
| 2211 | -ALTER TABLE ONLY project_image ALTER COLUMN project_image_id SET DEFAULT nextval('project_image_project_image_id_seq'::regclass); | |
| 2212 | 2448 | |
| 2213 | 2449 | |
| 2214 | 2450 | -- |
| 2215 | --- TOC entry 3180 (class 2604 OID 26024) | |
| 2216 | --- Name: seo_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2451 | +-- TOC entry 2761 (class 0 OID 20189) | |
| 2452 | +-- Dependencies: 256 | |
| 2453 | +-- Data for Name: slider_image_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2217 | 2454 | -- |
| 2218 | 2455 | |
| 2219 | -ALTER TABLE ONLY seo ALTER COLUMN seo_id SET DEFAULT nextval('seo_seo_id_seq'::regclass); | |
| 2220 | 2456 | |
| 2221 | 2457 | |
| 2222 | 2458 | -- |
| 2223 | --- TOC entry 3181 (class 2604 OID 26025) | |
| 2224 | --- Name: seo_category_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2459 | +-- TOC entry 2832 (class 0 OID 0) | |
| 2460 | +-- Dependencies: 257 | |
| 2461 | +-- Name: slider_image_slider_image_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2225 | 2462 | -- |
| 2226 | 2463 | |
| 2227 | -ALTER TABLE ONLY seo_category ALTER COLUMN seo_category_id SET DEFAULT nextval('seo_category_seo_category_id_seq'::regclass); | |
| 2464 | +SELECT pg_catalog.setval('slider_image_slider_image_id_seq', 1, false); | |
| 2228 | 2465 | |
| 2229 | 2466 | |
| 2230 | 2467 | -- |
| 2231 | --- TOC entry 3182 (class 2604 OID 26026) | |
| 2232 | --- Name: seo_dynamic_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2468 | +-- TOC entry 2833 (class 0 OID 0) | |
| 2469 | +-- Dependencies: 258 | |
| 2470 | +-- Name: slider_slider_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2233 | 2471 | -- |
| 2234 | 2472 | |
| 2235 | -ALTER TABLE ONLY seo_dynamic ALTER COLUMN seo_dynamic_id SET DEFAULT nextval('seo_dynamic_seo_dynamic_id_seq'::regclass); | |
| 2473 | +SELECT pg_catalog.setval('slider_slider_id_seq', 1, false); | |
| 2236 | 2474 | |
| 2237 | 2475 | |
| 2238 | 2476 | -- |
| 2239 | --- TOC entry 3183 (class 2604 OID 26027) | |
| 2240 | --- Name: service_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2477 | +-- TOC entry 2738 (class 0 OID 20106) | |
| 2478 | +-- Dependencies: 233 | |
| 2479 | +-- Data for Name: stock; Type: TABLE DATA; Schema: public; Owner: - | |
| 2241 | 2480 | -- |
| 2242 | 2481 | |
| 2243 | -ALTER TABLE ONLY service ALTER COLUMN service_id SET DEFAULT nextval('service_service_id_seq'::regclass); | |
| 2244 | 2482 | |
| 2245 | 2483 | |
| 2246 | 2484 | -- |
| 2247 | --- TOC entry 3184 (class 2604 OID 26028) | |
| 2248 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2485 | +-- TOC entry 2764 (class 0 OID 20199) | |
| 2486 | +-- Dependencies: 259 | |
| 2487 | +-- Data for Name: stock_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2249 | 2488 | -- |
| 2250 | 2489 | |
| 2251 | -ALTER TABLE ONLY share ALTER COLUMN id SET DEFAULT nextval('share_id_seq'::regclass); | |
| 2252 | 2490 | |
| 2253 | 2491 | |
| 2254 | 2492 | -- |
| 2255 | --- TOC entry 3185 (class 2604 OID 26029) | |
| 2256 | --- Name: slider_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2493 | +-- TOC entry 2765 (class 0 OID 20202) | |
| 2494 | +-- Dependencies: 260 | |
| 2495 | +-- Data for Name: tax_group; Type: TABLE DATA; Schema: public; Owner: - | |
| 2257 | 2496 | -- |
| 2258 | 2497 | |
| 2259 | -ALTER TABLE ONLY slider ALTER COLUMN slider_id SET DEFAULT nextval('slider_slider_id_seq'::regclass); | |
| 2260 | 2498 | |
| 2261 | 2499 | |
| 2262 | 2500 | -- |
| 2263 | --- TOC entry 3186 (class 2604 OID 26030) | |
| 2264 | --- Name: slider_image_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2501 | +-- TOC entry 2766 (class 0 OID 20208) | |
| 2502 | +-- Dependencies: 261 | |
| 2503 | +-- Data for Name: tax_group_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2265 | 2504 | -- |
| 2266 | 2505 | |
| 2267 | -ALTER TABLE ONLY slider_image ALTER COLUMN slider_image_id SET DEFAULT nextval('slider_image_slider_image_id_seq'::regclass); | |
| 2268 | 2506 | |
| 2269 | 2507 | |
| 2270 | 2508 | -- |
| 2271 | --- TOC entry 3175 (class 2604 OID 26031) | |
| 2272 | --- Name: stock_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2509 | +-- TOC entry 2834 (class 0 OID 0) | |
| 2510 | +-- Dependencies: 262 | |
| 2511 | +-- Name: tax_group_tax_group_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2273 | 2512 | -- |
| 2274 | 2513 | |
| 2275 | -ALTER TABLE ONLY stock ALTER COLUMN stock_id SET DEFAULT nextval('product_stock_product_stock_id_seq'::regclass); | |
| 2514 | +SELECT pg_catalog.setval('tax_group_tax_group_id_seq', 1, false); | |
| 2276 | 2515 | |
| 2277 | 2516 | |
| 2278 | 2517 | -- |
| 2279 | --- TOC entry 3190 (class 2604 OID 26032) | |
| 2280 | --- Name: tax_group_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2518 | +-- TOC entry 2768 (class 0 OID 20216) | |
| 2519 | +-- Dependencies: 263 | |
| 2520 | +-- Data for Name: tax_group_to_category; Type: TABLE DATA; Schema: public; Owner: - | |
| 2281 | 2521 | -- |
| 2282 | 2522 | |
| 2283 | -ALTER TABLE ONLY tax_group ALTER COLUMN tax_group_id SET DEFAULT nextval('tax_group_tax_group_id_seq'::regclass); | |
| 2284 | 2523 | |
| 2285 | 2524 | |
| 2286 | 2525 | -- |
| 2287 | --- TOC entry 3191 (class 2604 OID 26033) | |
| 2288 | --- Name: tax_group_to_category_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2526 | +-- TOC entry 2835 (class 0 OID 0) | |
| 2527 | +-- Dependencies: 264 | |
| 2528 | +-- Name: tax_group_to_category_tax_group_to_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2289 | 2529 | -- |
| 2290 | 2530 | |
| 2291 | -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); | |
| 2531 | +SELECT pg_catalog.setval('tax_group_to_category_tax_group_to_category_id_seq', 1, false); | |
| 2292 | 2532 | |
| 2293 | 2533 | |
| 2294 | 2534 | -- |
| 2295 | --- TOC entry 3194 (class 2604 OID 26034) | |
| 2296 | --- Name: tax_option_id; Type: DEFAULT; Schema: public; Owner: - | |
| 2535 | +-- TOC entry 2770 (class 0 OID 20221) | |
| 2536 | +-- Dependencies: 265 | |
| 2537 | +-- Data for Name: tax_option; Type: TABLE DATA; Schema: public; Owner: - | |
| 2297 | 2538 | -- |
| 2298 | 2539 | |
| 2299 | -ALTER TABLE ONLY tax_option ALTER COLUMN tax_option_id SET DEFAULT nextval('tax_option_tax_option_id_seq'::regclass); | |
| 2300 | 2540 | |
| 2301 | 2541 | |
| 2302 | 2542 | -- |
| 2303 | --- TOC entry 3144 (class 2604 OID 25321) | |
| 2304 | --- Name: id; Type: DEFAULT; Schema: public; Owner: - | |
| 2543 | +-- TOC entry 2771 (class 0 OID 20229) | |
| 2544 | +-- Dependencies: 266 | |
| 2545 | +-- Data for Name: tax_option_lang; Type: TABLE DATA; Schema: public; Owner: - | |
| 2305 | 2546 | -- |
| 2306 | 2547 | |
| 2307 | -ALTER TABLE ONLY "user" ALTER COLUMN id SET DEFAULT nextval('user_id_seq'::regclass); | |
| 2308 | 2548 | |
| 2309 | 2549 | |
| 2310 | 2550 | -- |
| 2311 | --- TOC entry 3221 (class 2606 OID 26041) | |
| 2312 | --- Name: artbox_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2551 | +-- TOC entry 2836 (class 0 OID 0) | |
| 2552 | +-- Dependencies: 267 | |
| 2553 | +-- Name: tax_option_tax_option_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2313 | 2554 | -- |
| 2314 | 2555 | |
| 2315 | -ALTER TABLE ONLY artbox_comment | |
| 2316 | - ADD CONSTRAINT artbox_comment_pkey PRIMARY KEY (artbox_comment_id); | |
| 2556 | +SELECT pg_catalog.setval('tax_option_tax_option_id_seq', 1, false); | |
| 2317 | 2557 | |
| 2318 | 2558 | |
| 2319 | 2559 | -- |
| 2320 | --- TOC entry 3223 (class 2606 OID 26043) | |
| 2321 | --- Name: artbox_comment_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2560 | +-- TOC entry 2688 (class 0 OID 19824) | |
| 2561 | +-- Dependencies: 183 | |
| 2562 | +-- Data for Name: user; Type: TABLE DATA; Schema: public; Owner: - | |
| 2322 | 2563 | -- |
| 2323 | 2564 | |
| 2324 | -ALTER TABLE ONLY artbox_comment_rating | |
| 2325 | - ADD CONSTRAINT artbox_comment_rating_pkey PRIMARY KEY (artbox_comment_rating_id); | |
| 2565 | +INSERT INTO "user" (id, username, auth_key, password_hash, password_reset_token, email, status, created_at, updated_at) VALUES (1, 'admin', 'i2_-MRfZEwla24-OTwpPrELXC6XAqgrO', '$2y$13$SUNNdADQ0d1ZZTUZlXELOu.b1ma5YlcckxgFpiT3VIg4HDCoZ0dQq', NULL, 'admin@gmail.com', 10, 1477163323, 1477163323); | |
| 2326 | 2566 | |
| 2327 | 2567 | |
| 2328 | 2568 | -- |
| 2329 | --- TOC entry 3225 (class 2606 OID 26045) | |
| 2330 | --- Name: artbox_like_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2569 | +-- TOC entry 2837 (class 0 OID 0) | |
| 2570 | +-- Dependencies: 182 | |
| 2571 | +-- Name: user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - | |
| 2331 | 2572 | -- |
| 2332 | 2573 | |
| 2333 | -ALTER TABLE ONLY artbox_like | |
| 2334 | - ADD CONSTRAINT artbox_like_pkey PRIMARY KEY (artbox_like_id); | |
| 2574 | +SELECT pg_catalog.setval('user_id_seq', 1, true); | |
| 2335 | 2575 | |
| 2336 | 2576 | |
| 2337 | 2577 | -- |
| 2338 | --- TOC entry 3228 (class 2606 OID 26047) | |
| 2339 | --- Name: article_to_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2578 | +-- TOC entry 2401 (class 2606 OID 19924) | |
| 2579 | +-- Name: article_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2340 | 2580 | -- |
| 2341 | 2581 | |
| 2342 | -ALTER TABLE ONLY article_to_rating | |
| 2343 | - ADD CONSTRAINT article_to_rating_pkey PRIMARY KEY (article_to_rating_id); | |
| 2582 | +ALTER TABLE ONLY article | |
| 2583 | + ADD CONSTRAINT article_pkey PRIMARY KEY (id); | |
| 2344 | 2584 | |
| 2345 | 2585 | |
| 2346 | 2586 | -- |
| 2347 | --- TOC entry 3230 (class 2606 OID 26049) | |
| 2348 | --- Name: articles_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2587 | +-- TOC entry 2399 (class 2606 OID 19901) | |
| 2588 | +-- Name: auth_assignment_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2349 | 2589 | -- |
| 2350 | 2590 | |
| 2351 | -ALTER TABLE ONLY articles | |
| 2352 | - ADD CONSTRAINT articles_pkey PRIMARY KEY (id); | |
| 2591 | +ALTER TABLE ONLY auth_assignment | |
| 2592 | + ADD CONSTRAINT auth_assignment_pkey PRIMARY KEY (item_name, user_id); | |
| 2353 | 2593 | |
| 2354 | 2594 | |
| 2355 | 2595 | -- |
| 2356 | --- TOC entry 3205 (class 2606 OID 25333) | |
| 2596 | +-- TOC entry 2397 (class 2606 OID 19886) | |
| 2357 | 2597 | -- Name: auth_item_child_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2358 | 2598 | -- |
| 2359 | 2599 | |
| ... | ... | @@ -2362,7 +2602,7 @@ ALTER TABLE ONLY auth_item_child |
| 2362 | 2602 | |
| 2363 | 2603 | |
| 2364 | 2604 | -- |
| 2365 | --- TOC entry 3202 (class 2606 OID 25335) | |
| 2605 | +-- TOC entry 2394 (class 2606 OID 19875) | |
| 2366 | 2606 | -- Name: auth_item_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2367 | 2607 | -- |
| 2368 | 2608 | |
| ... | ... | @@ -2371,7 +2611,7 @@ ALTER TABLE ONLY auth_item |
| 2371 | 2611 | |
| 2372 | 2612 | |
| 2373 | 2613 | -- |
| 2374 | --- TOC entry 3207 (class 2606 OID 25337) | |
| 2614 | +-- TOC entry 2392 (class 2606 OID 19867) | |
| 2375 | 2615 | -- Name: auth_rule_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2376 | 2616 | -- |
| 2377 | 2617 | |
| ... | ... | @@ -2380,16 +2620,16 @@ ALTER TABLE ONLY auth_rule |
| 2380 | 2620 | |
| 2381 | 2621 | |
| 2382 | 2622 | -- |
| 2383 | --- TOC entry 3232 (class 2606 OID 26051) | |
| 2623 | +-- TOC entry 2405 (class 2606 OID 20264) | |
| 2384 | 2624 | -- Name: banner_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2385 | 2625 | -- |
| 2386 | 2626 | |
| 2387 | 2627 | ALTER TABLE ONLY banner |
| 2388 | - ADD CONSTRAINT banner_pkey PRIMARY KEY (banner_id); | |
| 2628 | + ADD CONSTRAINT banner_pkey PRIMARY KEY (id); | |
| 2389 | 2629 | |
| 2390 | 2630 | |
| 2391 | 2631 | -- |
| 2392 | --- TOC entry 3234 (class 2606 OID 26053) | |
| 2632 | +-- TOC entry 2408 (class 2606 OID 20267) | |
| 2393 | 2633 | -- Name: bg_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2394 | 2634 | -- |
| 2395 | 2635 | |
| ... | ... | @@ -2398,34 +2638,25 @@ ALTER TABLE ONLY bg |
| 2398 | 2638 | |
| 2399 | 2639 | |
| 2400 | 2640 | -- |
| 2401 | --- TOC entry 3236 (class 2606 OID 26057) | |
| 2641 | +-- TOC entry 2411 (class 2606 OID 20269) | |
| 2402 | 2642 | -- Name: brand_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2403 | 2643 | -- |
| 2404 | 2644 | |
| 2405 | 2645 | ALTER TABLE ONLY brand |
| 2406 | - ADD CONSTRAINT brand_pkey PRIMARY KEY (brand_id); | |
| 2646 | + ADD CONSTRAINT brand_pkey PRIMARY KEY (id); | |
| 2407 | 2647 | |
| 2408 | 2648 | |
| 2409 | 2649 | -- |
| 2410 | --- TOC entry 3239 (class 2606 OID 26059) | |
| 2650 | +-- TOC entry 2416 (class 2606 OID 20271) | |
| 2411 | 2651 | -- Name: category_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2412 | 2652 | -- |
| 2413 | 2653 | |
| 2414 | 2654 | ALTER TABLE ONLY category |
| 2415 | - ADD CONSTRAINT category_pkey PRIMARY KEY (category_id); | |
| 2416 | - | |
| 2417 | - | |
| 2418 | --- | |
| 2419 | --- TOC entry 3324 (class 2606 OID 28353) | |
| 2420 | --- Name: certificate_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2421 | --- | |
| 2422 | - | |
| 2423 | -ALTER TABLE ONLY certificate | |
| 2424 | - ADD CONSTRAINT certificate_pkey PRIMARY KEY (certificate_id); | |
| 2655 | + ADD CONSTRAINT category_pkey PRIMARY KEY (id); | |
| 2425 | 2656 | |
| 2426 | 2657 | |
| 2427 | 2658 | -- |
| 2428 | --- TOC entry 3242 (class 2606 OID 26063) | |
| 2659 | +-- TOC entry 2421 (class 2606 OID 20273) | |
| 2429 | 2660 | -- Name: customer_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2430 | 2661 | -- |
| 2431 | 2662 | |
| ... | ... | @@ -2434,34 +2665,34 @@ ALTER TABLE ONLY customer |
| 2434 | 2665 | |
| 2435 | 2666 | |
| 2436 | 2667 | -- |
| 2437 | --- TOC entry 3244 (class 2606 OID 26065) | |
| 2668 | +-- TOC entry 2423 (class 2606 OID 20275) | |
| 2438 | 2669 | -- Name: event_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2439 | 2670 | -- |
| 2440 | 2671 | |
| 2441 | 2672 | ALTER TABLE ONLY event |
| 2442 | - ADD CONSTRAINT event_pkey PRIMARY KEY (event_id); | |
| 2673 | + ADD CONSTRAINT event_pkey PRIMARY KEY (id); | |
| 2443 | 2674 | |
| 2444 | 2675 | |
| 2445 | 2676 | -- |
| 2446 | --- TOC entry 3246 (class 2606 OID 26067) | |
| 2677 | +-- TOC entry 2427 (class 2606 OID 20277) | |
| 2447 | 2678 | -- Name: feedback_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2448 | 2679 | -- |
| 2449 | 2680 | |
| 2450 | 2681 | ALTER TABLE ONLY feedback |
| 2451 | - ADD CONSTRAINT feedback_pkey PRIMARY KEY (feedback_id); | |
| 2682 | + ADD CONSTRAINT feedback_pkey PRIMARY KEY (id); | |
| 2452 | 2683 | |
| 2453 | 2684 | |
| 2454 | 2685 | -- |
| 2455 | --- TOC entry 3209 (class 2606 OID 25359) | |
| 2686 | +-- TOC entry 2390 (class 2606 OID 19851) | |
| 2456 | 2687 | -- Name: language_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2457 | 2688 | -- |
| 2458 | 2689 | |
| 2459 | 2690 | ALTER TABLE ONLY language |
| 2460 | - ADD CONSTRAINT language_pkey PRIMARY KEY (language_id); | |
| 2691 | + ADD CONSTRAINT language_pkey PRIMARY KEY (id); | |
| 2461 | 2692 | |
| 2462 | 2693 | |
| 2463 | 2694 | -- |
| 2464 | --- TOC entry 3211 (class 2606 OID 25361) | |
| 2695 | +-- TOC entry 2380 (class 2606 OID 19821) | |
| 2465 | 2696 | -- Name: migration_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2466 | 2697 | -- |
| 2467 | 2698 | |
| ... | ... | @@ -2470,43 +2701,43 @@ ALTER TABLE ONLY migration |
| 2470 | 2701 | |
| 2471 | 2702 | |
| 2472 | 2703 | -- |
| 2473 | --- TOC entry 3250 (class 2606 OID 26071) | |
| 2704 | +-- TOC entry 2431 (class 2606 OID 20279) | |
| 2474 | 2705 | -- Name: orders_delivery_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2475 | 2706 | -- |
| 2476 | 2707 | |
| 2477 | -ALTER TABLE ONLY orders_delivery | |
| 2708 | +ALTER TABLE ONLY order_delivery | |
| 2478 | 2709 | ADD CONSTRAINT orders_delivery_pkey PRIMARY KEY (id); |
| 2479 | 2710 | |
| 2480 | 2711 | |
| 2481 | 2712 | -- |
| 2482 | --- TOC entry 3252 (class 2606 OID 26073) | |
| 2713 | +-- TOC entry 2434 (class 2606 OID 20281) | |
| 2483 | 2714 | -- Name: orders_label_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2484 | 2715 | -- |
| 2485 | 2716 | |
| 2486 | -ALTER TABLE ONLY orders_label | |
| 2717 | +ALTER TABLE ONLY order_label | |
| 2487 | 2718 | ADD CONSTRAINT orders_label_pkey PRIMARY KEY (id); |
| 2488 | 2719 | |
| 2489 | 2720 | |
| 2490 | 2721 | -- |
| 2491 | --- TOC entry 3248 (class 2606 OID 26075) | |
| 2722 | +-- TOC entry 2429 (class 2606 OID 20283) | |
| 2492 | 2723 | -- Name: orders_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2493 | 2724 | -- |
| 2494 | 2725 | |
| 2495 | -ALTER TABLE ONLY orders | |
| 2726 | +ALTER TABLE ONLY "order" | |
| 2496 | 2727 | ADD CONSTRAINT orders_pkey PRIMARY KEY (id); |
| 2497 | 2728 | |
| 2498 | 2729 | |
| 2499 | 2730 | -- |
| 2500 | --- TOC entry 3255 (class 2606 OID 26077) | |
| 2731 | +-- TOC entry 2438 (class 2606 OID 20285) | |
| 2501 | 2732 | -- Name: orders_products_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2502 | 2733 | -- |
| 2503 | 2734 | |
| 2504 | -ALTER TABLE ONLY orders_products | |
| 2735 | +ALTER TABLE ONLY order_product | |
| 2505 | 2736 | ADD CONSTRAINT orders_products_pkey PRIMARY KEY (id); |
| 2506 | 2737 | |
| 2507 | 2738 | |
| 2508 | 2739 | -- |
| 2509 | --- TOC entry 3257 (class 2606 OID 26079) | |
| 2740 | +-- TOC entry 2440 (class 2606 OID 20287) | |
| 2510 | 2741 | -- Name: page_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2511 | 2742 | -- |
| 2512 | 2743 | |
| ... | ... | @@ -2515,16 +2746,7 @@ ALTER TABLE ONLY page |
| 2515 | 2746 | |
| 2516 | 2747 | |
| 2517 | 2748 | -- |
| 2518 | --- TOC entry 3322 (class 2606 OID 28331) | |
| 2519 | --- Name: product_certificate_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2520 | --- | |
| 2521 | - | |
| 2522 | -ALTER TABLE ONLY product_certificate | |
| 2523 | - ADD CONSTRAINT product_certificate_pkey PRIMARY KEY (product_certificate_id); | |
| 2524 | - | |
| 2525 | - | |
| 2526 | --- | |
| 2527 | --- TOC entry 3265 (class 2606 OID 26087) | |
| 2749 | +-- TOC entry 2450 (class 2606 OID 20289) | |
| 2528 | 2750 | -- Name: product_image_id_pk; Type: CONSTRAINT; Schema: public; Owner: - |
| 2529 | 2751 | -- |
| 2530 | 2752 | |
| ... | ... | @@ -2533,7 +2755,7 @@ ALTER TABLE ONLY product_image |
| 2533 | 2755 | |
| 2534 | 2756 | |
| 2535 | 2757 | -- |
| 2536 | --- TOC entry 3267 (class 2606 OID 26089) | |
| 2758 | +-- TOC entry 2454 (class 2606 OID 20291) | |
| 2537 | 2759 | -- Name: product_option_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2538 | 2760 | -- |
| 2539 | 2761 | |
| ... | ... | @@ -2542,52 +2764,25 @@ ALTER TABLE ONLY product_option |
| 2542 | 2764 | |
| 2543 | 2765 | |
| 2544 | 2766 | -- |
| 2545 | --- TOC entry 3260 (class 2606 OID 26091) | |
| 2767 | +-- TOC entry 2445 (class 2606 OID 20293) | |
| 2546 | 2768 | -- Name: product_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2547 | 2769 | -- |
| 2548 | 2770 | |
| 2549 | 2771 | ALTER TABLE ONLY product |
| 2550 | - ADD CONSTRAINT product_pkey PRIMARY KEY (product_id); | |
| 2551 | - | |
| 2552 | - | |
| 2553 | --- | |
| 2554 | --- TOC entry 3320 (class 2606 OID 28317) | |
| 2555 | --- Name: product_spec_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2556 | --- | |
| 2557 | - | |
| 2558 | -ALTER TABLE ONLY product_spec | |
| 2559 | - ADD CONSTRAINT product_spec_pkey PRIMARY KEY (product_spec_id); | |
| 2560 | - | |
| 2561 | - | |
| 2562 | --- | |
| 2563 | --- TOC entry 3317 (class 2606 OID 28281) | |
| 2564 | --- Name: product_to_project_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2565 | --- | |
| 2566 | - | |
| 2567 | -ALTER TABLE ONLY product_to_project | |
| 2568 | - ADD CONSTRAINT product_to_project_pkey PRIMARY KEY (product_to_project_id); | |
| 2569 | - | |
| 2570 | - | |
| 2571 | --- | |
| 2572 | --- TOC entry 3274 (class 2606 OID 26093) | |
| 2573 | --- Name: product_to_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2574 | --- | |
| 2575 | - | |
| 2576 | -ALTER TABLE ONLY product_to_rating | |
| 2577 | - ADD CONSTRAINT product_to_rating_pkey PRIMARY KEY (product_to_rating_id); | |
| 2772 | + ADD CONSTRAINT product_pkey PRIMARY KEY (id); | |
| 2578 | 2773 | |
| 2579 | 2774 | |
| 2580 | 2775 | -- |
| 2581 | --- TOC entry 3276 (class 2606 OID 26095) | |
| 2776 | +-- TOC entry 2460 (class 2606 OID 20295) | |
| 2582 | 2777 | -- Name: product_unit_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2583 | 2778 | -- |
| 2584 | 2779 | |
| 2585 | 2780 | ALTER TABLE ONLY product_unit |
| 2586 | - ADD CONSTRAINT product_unit_pkey PRIMARY KEY (product_unit_id); | |
| 2781 | + ADD CONSTRAINT product_unit_pkey PRIMARY KEY (id); | |
| 2587 | 2782 | |
| 2588 | 2783 | |
| 2589 | 2784 | -- |
| 2590 | --- TOC entry 3283 (class 2606 OID 26097) | |
| 2785 | +-- TOC entry 2469 (class 2606 OID 20297) | |
| 2591 | 2786 | -- Name: product_variant_option_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2592 | 2787 | -- |
| 2593 | 2788 | |
| ... | ... | @@ -2596,115 +2791,88 @@ ALTER TABLE ONLY product_variant_option |
| 2596 | 2791 | |
| 2597 | 2792 | |
| 2598 | 2793 | -- |
| 2599 | --- TOC entry 3278 (class 2606 OID 26099) | |
| 2794 | +-- TOC entry 2463 (class 2606 OID 20299) | |
| 2600 | 2795 | -- Name: product_variant_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2601 | 2796 | -- |
| 2602 | 2797 | |
| 2603 | 2798 | ALTER TABLE ONLY product_variant |
| 2604 | - ADD CONSTRAINT product_variant_pkey PRIMARY KEY (product_variant_id); | |
| 2605 | - | |
| 2606 | - | |
| 2607 | --- | |
| 2608 | --- TOC entry 3315 (class 2606 OID 27440) | |
| 2609 | --- Name: project_image_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2610 | --- | |
| 2611 | - | |
| 2612 | -ALTER TABLE ONLY project_image | |
| 2613 | - ADD CONSTRAINT project_image_pkey PRIMARY KEY (project_image_id); | |
| 2614 | - | |
| 2615 | - | |
| 2616 | --- | |
| 2617 | --- TOC entry 3313 (class 2606 OID 27429) | |
| 2618 | --- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2619 | --- | |
| 2620 | - | |
| 2621 | -ALTER TABLE ONLY project | |
| 2622 | - ADD CONSTRAINT project_pkey PRIMARY KEY (project_id); | |
| 2799 | + ADD CONSTRAINT product_variant_pkey PRIMARY KEY (id); | |
| 2623 | 2800 | |
| 2624 | 2801 | |
| 2625 | 2802 | -- |
| 2626 | --- TOC entry 3287 (class 2606 OID 26105) | |
| 2803 | +-- TOC entry 2473 (class 2606 OID 20301) | |
| 2627 | 2804 | -- Name: seo_category_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2628 | 2805 | -- |
| 2629 | 2806 | |
| 2630 | 2807 | ALTER TABLE ONLY seo_category |
| 2631 | - ADD CONSTRAINT seo_category_pkey PRIMARY KEY (seo_category_id); | |
| 2808 | + ADD CONSTRAINT seo_category_pkey PRIMARY KEY (id); | |
| 2632 | 2809 | |
| 2633 | 2810 | |
| 2634 | 2811 | -- |
| 2635 | --- TOC entry 3289 (class 2606 OID 26107) | |
| 2812 | +-- TOC entry 2476 (class 2606 OID 20303) | |
| 2636 | 2813 | -- Name: seo_dynamic_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2637 | 2814 | -- |
| 2638 | 2815 | |
| 2639 | 2816 | ALTER TABLE ONLY seo_dynamic |
| 2640 | - ADD CONSTRAINT seo_dynamic_pkey PRIMARY KEY (seo_dynamic_id); | |
| 2817 | + ADD CONSTRAINT seo_dynamic_pkey PRIMARY KEY (id); | |
| 2641 | 2818 | |
| 2642 | 2819 | |
| 2643 | 2820 | -- |
| 2644 | --- TOC entry 3285 (class 2606 OID 26109) | |
| 2821 | +-- TOC entry 2471 (class 2606 OID 20305) | |
| 2645 | 2822 | -- Name: seo_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2646 | 2823 | -- |
| 2647 | 2824 | |
| 2648 | 2825 | ALTER TABLE ONLY seo |
| 2649 | - ADD CONSTRAINT seo_pkey PRIMARY KEY (seo_id); | |
| 2826 | + ADD CONSTRAINT seo_pkey PRIMARY KEY (id); | |
| 2650 | 2827 | |
| 2651 | 2828 | |
| 2652 | 2829 | -- |
| 2653 | --- TOC entry 3291 (class 2606 OID 26111) | |
| 2830 | +-- TOC entry 2480 (class 2606 OID 20307) | |
| 2654 | 2831 | -- Name: service_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2655 | 2832 | -- |
| 2656 | 2833 | |
| 2657 | 2834 | ALTER TABLE ONLY service |
| 2658 | - ADD CONSTRAINT service_pkey PRIMARY KEY (service_id); | |
| 2659 | - | |
| 2660 | - | |
| 2661 | --- | |
| 2662 | --- TOC entry 3295 (class 2606 OID 26113) | |
| 2663 | --- Name: share_id_pk; Type: CONSTRAINT; Schema: public; Owner: - | |
| 2664 | --- | |
| 2665 | - | |
| 2666 | -ALTER TABLE ONLY share | |
| 2667 | - ADD CONSTRAINT share_id_pk PRIMARY KEY (id); | |
| 2835 | + ADD CONSTRAINT service_pkey PRIMARY KEY (id); | |
| 2668 | 2836 | |
| 2669 | 2837 | |
| 2670 | 2838 | -- |
| 2671 | --- TOC entry 3299 (class 2606 OID 26115) | |
| 2839 | +-- TOC entry 2486 (class 2606 OID 20309) | |
| 2672 | 2840 | -- Name: slider_image_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2673 | 2841 | -- |
| 2674 | 2842 | |
| 2675 | 2843 | ALTER TABLE ONLY slider_image |
| 2676 | - ADD CONSTRAINT slider_image_pkey PRIMARY KEY (slider_image_id); | |
| 2844 | + ADD CONSTRAINT slider_image_pkey PRIMARY KEY (id); | |
| 2677 | 2845 | |
| 2678 | 2846 | |
| 2679 | 2847 | -- |
| 2680 | --- TOC entry 3297 (class 2606 OID 26117) | |
| 2848 | +-- TOC entry 2484 (class 2606 OID 20311) | |
| 2681 | 2849 | -- Name: slider_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2682 | 2850 | -- |
| 2683 | 2851 | |
| 2684 | 2852 | ALTER TABLE ONLY slider |
| 2685 | - ADD CONSTRAINT slider_pkey PRIMARY KEY (slider_id); | |
| 2853 | + ADD CONSTRAINT slider_pkey PRIMARY KEY (id); | |
| 2686 | 2854 | |
| 2687 | 2855 | |
| 2688 | 2856 | -- |
| 2689 | --- TOC entry 3272 (class 2606 OID 26119) | |
| 2857 | +-- TOC entry 2458 (class 2606 OID 20313) | |
| 2690 | 2858 | -- Name: stock_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2691 | 2859 | -- |
| 2692 | 2860 | |
| 2693 | 2861 | ALTER TABLE ONLY stock |
| 2694 | - ADD CONSTRAINT stock_pkey PRIMARY KEY (stock_id); | |
| 2862 | + ADD CONSTRAINT stock_pkey PRIMARY KEY (id); | |
| 2695 | 2863 | |
| 2696 | 2864 | |
| 2697 | 2865 | -- |
| 2698 | --- TOC entry 3302 (class 2606 OID 26121) | |
| 2866 | +-- TOC entry 2491 (class 2606 OID 20315) | |
| 2699 | 2867 | -- Name: tax_group_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2700 | 2868 | -- |
| 2701 | 2869 | |
| 2702 | 2870 | ALTER TABLE ONLY tax_group |
| 2703 | - ADD CONSTRAINT tax_group_pkey PRIMARY KEY (tax_group_id); | |
| 2871 | + ADD CONSTRAINT tax_group_pkey PRIMARY KEY (id); | |
| 2704 | 2872 | |
| 2705 | 2873 | |
| 2706 | 2874 | -- |
| 2707 | --- TOC entry 3306 (class 2606 OID 26123) | |
| 2875 | +-- TOC entry 2497 (class 2606 OID 20317) | |
| 2708 | 2876 | -- Name: tax_group_to_category_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2709 | 2877 | -- |
| 2710 | 2878 | |
| ... | ... | @@ -2713,16 +2881,16 @@ ALTER TABLE ONLY tax_group_to_category |
| 2713 | 2881 | |
| 2714 | 2882 | |
| 2715 | 2883 | -- |
| 2716 | --- TOC entry 3308 (class 2606 OID 26125) | |
| 2884 | +-- TOC entry 2499 (class 2606 OID 20319) | |
| 2717 | 2885 | -- Name: tax_option_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2718 | 2886 | -- |
| 2719 | 2887 | |
| 2720 | 2888 | ALTER TABLE ONLY tax_option |
| 2721 | - ADD CONSTRAINT tax_option_pkey PRIMARY KEY (tax_option_id); | |
| 2889 | + ADD CONSTRAINT tax_option_pkey PRIMARY KEY (id); | |
| 2722 | 2890 | |
| 2723 | 2891 | |
| 2724 | 2892 | -- |
| 2725 | --- TOC entry 3213 (class 2606 OID 25429) | |
| 2893 | +-- TOC entry 2382 (class 2606 OID 19839) | |
| 2726 | 2894 | -- Name: user_email_key; Type: CONSTRAINT; Schema: public; Owner: - |
| 2727 | 2895 | -- |
| 2728 | 2896 | |
| ... | ... | @@ -2731,7 +2899,7 @@ ALTER TABLE ONLY "user" |
| 2731 | 2899 | |
| 2732 | 2900 | |
| 2733 | 2901 | -- |
| 2734 | --- TOC entry 3215 (class 2606 OID 25431) | |
| 2902 | +-- TOC entry 2384 (class 2606 OID 19837) | |
| 2735 | 2903 | -- Name: user_password_reset_token_key; Type: CONSTRAINT; Schema: public; Owner: - |
| 2736 | 2904 | -- |
| 2737 | 2905 | |
| ... | ... | @@ -2740,7 +2908,7 @@ ALTER TABLE ONLY "user" |
| 2740 | 2908 | |
| 2741 | 2909 | |
| 2742 | 2910 | -- |
| 2743 | --- TOC entry 3217 (class 2606 OID 25433) | |
| 2911 | +-- TOC entry 2386 (class 2606 OID 19833) | |
| 2744 | 2912 | -- Name: user_pkey; Type: CONSTRAINT; Schema: public; Owner: - |
| 2745 | 2913 | -- |
| 2746 | 2914 | |
| ... | ... | @@ -2749,7 +2917,7 @@ ALTER TABLE ONLY "user" |
| 2749 | 2917 | |
| 2750 | 2918 | |
| 2751 | 2919 | -- |
| 2752 | --- TOC entry 3219 (class 2606 OID 25435) | |
| 2920 | +-- TOC entry 2388 (class 2606 OID 19835) | |
| 2753 | 2921 | -- Name: user_username_key; Type: CONSTRAINT; Schema: public; Owner: - |
| 2754 | 2922 | -- |
| 2755 | 2923 | |
| ... | ... | @@ -2758,31 +2926,23 @@ ALTER TABLE ONLY "user" |
| 2758 | 2926 | |
| 2759 | 2927 | |
| 2760 | 2928 | -- |
| 2761 | --- TOC entry 3226 (class 1259 OID 26136) | |
| 2762 | --- Name: artbox_like_unique; Type: INDEX; Schema: public; Owner: - | |
| 2763 | --- | |
| 2764 | - | |
| 2765 | -CREATE UNIQUE INDEX artbox_like_unique ON artbox_like USING btree (artbox_comment_id, user_id, is_like); | |
| 2766 | - | |
| 2767 | - | |
| 2768 | --- | |
| 2769 | --- TOC entry 3325 (class 1259 OID 29035) | |
| 2929 | +-- TOC entry 2402 (class 1259 OID 19942) | |
| 2770 | 2930 | -- Name: articles_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 2771 | 2931 | -- |
| 2772 | 2932 | |
| 2773 | -CREATE UNIQUE INDEX articles_lang_alias ON articles_lang USING btree (alias); | |
| 2933 | +CREATE UNIQUE INDEX articles_lang_alias ON article_lang USING btree (alias); | |
| 2774 | 2934 | |
| 2775 | 2935 | |
| 2776 | 2936 | -- |
| 2777 | --- TOC entry 3326 (class 1259 OID 28419) | |
| 2937 | +-- TOC entry 2403 (class 1259 OID 19941) | |
| 2778 | 2938 | -- Name: articles_lang_article_language_key; Type: INDEX; Schema: public; Owner: - |
| 2779 | 2939 | -- |
| 2780 | 2940 | |
| 2781 | -CREATE UNIQUE INDEX articles_lang_article_language_key ON articles_lang USING btree (articles_id, language_id); | |
| 2941 | +CREATE UNIQUE INDEX articles_lang_article_language_key ON article_lang USING btree (article_id, language_id); | |
| 2782 | 2942 | |
| 2783 | 2943 | |
| 2784 | 2944 | -- |
| 2785 | --- TOC entry 3329 (class 1259 OID 28502) | |
| 2945 | +-- TOC entry 2406 (class 1259 OID 20320) | |
| 2786 | 2946 | -- Name: banner_lang_banner_language_key; Type: INDEX; Schema: public; Owner: - |
| 2787 | 2947 | -- |
| 2788 | 2948 | |
| ... | ... | @@ -2790,7 +2950,7 @@ CREATE UNIQUE INDEX banner_lang_banner_language_key ON banner_lang USING btree ( |
| 2790 | 2950 | |
| 2791 | 2951 | |
| 2792 | 2952 | -- |
| 2793 | --- TOC entry 3330 (class 1259 OID 28516) | |
| 2953 | +-- TOC entry 2409 (class 1259 OID 20321) | |
| 2794 | 2954 | -- Name: bg_lang_bg_language_key; Type: INDEX; Schema: public; Owner: - |
| 2795 | 2955 | -- |
| 2796 | 2956 | |
| ... | ... | @@ -2798,7 +2958,7 @@ CREATE UNIQUE INDEX bg_lang_bg_language_key ON bg_lang USING btree (bg_id, langu |
| 2798 | 2958 | |
| 2799 | 2959 | |
| 2800 | 2960 | -- |
| 2801 | --- TOC entry 3331 (class 1259 OID 29036) | |
| 2961 | +-- TOC entry 2413 (class 1259 OID 20322) | |
| 2802 | 2962 | -- Name: brand_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 2803 | 2963 | -- |
| 2804 | 2964 | |
| ... | ... | @@ -2806,7 +2966,7 @@ CREATE UNIQUE INDEX brand_lang_alias ON brand_lang USING btree (alias); |
| 2806 | 2966 | |
| 2807 | 2967 | |
| 2808 | 2968 | -- |
| 2809 | --- TOC entry 3332 (class 1259 OID 28539) | |
| 2969 | +-- TOC entry 2414 (class 1259 OID 20323) | |
| 2810 | 2970 | -- Name: brand_lang_brand_language_key; Type: INDEX; Schema: public; Owner: - |
| 2811 | 2971 | -- |
| 2812 | 2972 | |
| ... | ... | @@ -2814,7 +2974,7 @@ CREATE UNIQUE INDEX brand_lang_brand_language_key ON brand_lang USING btree (bra |
| 2814 | 2974 | |
| 2815 | 2975 | |
| 2816 | 2976 | -- |
| 2817 | --- TOC entry 3237 (class 1259 OID 29110) | |
| 2977 | +-- TOC entry 2412 (class 1259 OID 20324) | |
| 2818 | 2978 | -- Name: brand_remote_id_uindex; Type: INDEX; Schema: public; Owner: - |
| 2819 | 2979 | -- |
| 2820 | 2980 | |
| ... | ... | @@ -2822,7 +2982,7 @@ CREATE UNIQUE INDEX brand_remote_id_uindex ON brand USING btree (remote_id); |
| 2822 | 2982 | |
| 2823 | 2983 | |
| 2824 | 2984 | -- |
| 2825 | --- TOC entry 3333 (class 1259 OID 29037) | |
| 2985 | +-- TOC entry 2418 (class 1259 OID 20325) | |
| 2826 | 2986 | -- Name: category_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 2827 | 2987 | -- |
| 2828 | 2988 | |
| ... | ... | @@ -2830,7 +2990,7 @@ CREATE UNIQUE INDEX category_lang_alias ON category_lang USING btree (alias); |
| 2830 | 2990 | |
| 2831 | 2991 | |
| 2832 | 2992 | -- |
| 2833 | --- TOC entry 3334 (class 1259 OID 28556) | |
| 2993 | +-- TOC entry 2419 (class 1259 OID 20326) | |
| 2834 | 2994 | -- Name: category_lang_category_language_key; Type: INDEX; Schema: public; Owner: - |
| 2835 | 2995 | -- |
| 2836 | 2996 | |
| ... | ... | @@ -2838,7 +2998,7 @@ CREATE UNIQUE INDEX category_lang_category_language_key ON category_lang USING b |
| 2838 | 2998 | |
| 2839 | 2999 | |
| 2840 | 3000 | -- |
| 2841 | --- TOC entry 3240 (class 1259 OID 29119) | |
| 3001 | +-- TOC entry 2417 (class 1259 OID 20327) | |
| 2842 | 3002 | -- Name: category_remote_id_uindex; Type: INDEX; Schema: public; Owner: - |
| 2843 | 3003 | -- |
| 2844 | 3004 | |
| ... | ... | @@ -2846,7 +3006,7 @@ CREATE UNIQUE INDEX category_remote_id_uindex ON category USING btree (remote_id |
| 2846 | 3006 | |
| 2847 | 3007 | |
| 2848 | 3008 | -- |
| 2849 | --- TOC entry 3335 (class 1259 OID 29038) | |
| 3009 | +-- TOC entry 2424 (class 1259 OID 20328) | |
| 2850 | 3010 | -- Name: event_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 2851 | 3011 | -- |
| 2852 | 3012 | |
| ... | ... | @@ -2854,7 +3014,7 @@ CREATE UNIQUE INDEX event_lang_alias ON event_lang USING btree (alias); |
| 2854 | 3014 | |
| 2855 | 3015 | |
| 2856 | 3016 | -- |
| 2857 | --- TOC entry 3336 (class 1259 OID 28594) | |
| 3017 | +-- TOC entry 2425 (class 1259 OID 20329) | |
| 2858 | 3018 | -- Name: event_lang_event_language_key; Type: INDEX; Schema: public; Owner: - |
| 2859 | 3019 | -- |
| 2860 | 3020 | |
| ... | ... | @@ -2862,15 +3022,15 @@ CREATE UNIQUE INDEX event_lang_event_language_key ON event_lang USING btree (eve |
| 2862 | 3022 | |
| 2863 | 3023 | |
| 2864 | 3024 | -- |
| 2865 | --- TOC entry 3253 (class 1259 OID 29219) | |
| 3025 | +-- TOC entry 2436 (class 1259 OID 20330) | |
| 2866 | 3026 | -- Name: fki_orders_products_product_variant_product_variant_id_fk; Type: INDEX; Schema: public; Owner: - |
| 2867 | 3027 | -- |
| 2868 | 3028 | |
| 2869 | -CREATE INDEX fki_orders_products_product_variant_product_variant_id_fk ON orders_products USING btree (mod_id); | |
| 3029 | +CREATE INDEX fki_orders_products_product_variant_product_variant_id_fk ON order_product USING btree (product_variant_id); | |
| 2870 | 3030 | |
| 2871 | 3031 | |
| 2872 | 3032 | -- |
| 2873 | --- TOC entry 3258 (class 1259 OID 26138) | |
| 3033 | +-- TOC entry 2443 (class 1259 OID 20331) | |
| 2874 | 3034 | -- Name: fki_product_brand_fk; Type: INDEX; Schema: public; Owner: - |
| 2875 | 3035 | -- |
| 2876 | 3036 | |
| ... | ... | @@ -2878,7 +3038,7 @@ CREATE INDEX fki_product_brand_fk ON product USING btree (brand_id); |
| 2878 | 3038 | |
| 2879 | 3039 | |
| 2880 | 3040 | -- |
| 2881 | --- TOC entry 3262 (class 1259 OID 26139) | |
| 3041 | +-- TOC entry 2447 (class 1259 OID 20332) | |
| 2882 | 3042 | -- Name: fki_product_id_fk; Type: INDEX; Schema: public; Owner: - |
| 2883 | 3043 | -- |
| 2884 | 3044 | |
| ... | ... | @@ -2886,15 +3046,7 @@ CREATE INDEX fki_product_id_fk ON product_image USING btree (product_id); |
| 2886 | 3046 | |
| 2887 | 3047 | |
| 2888 | 3048 | -- |
| 2889 | --- TOC entry 3268 (class 1259 OID 26140) | |
| 2890 | --- Name: fki_product_stock_product_id_fkey; Type: INDEX; Schema: public; Owner: - | |
| 2891 | --- | |
| 2892 | - | |
| 2893 | -CREATE INDEX fki_product_stock_product_id_fkey ON product_stock USING btree (product_id); | |
| 2894 | - | |
| 2895 | - | |
| 2896 | --- | |
| 2897 | --- TOC entry 3269 (class 1259 OID 26141) | |
| 3049 | +-- TOC entry 2455 (class 1259 OID 20334) | |
| 2898 | 3050 | -- Name: fki_product_stock_product_variant_id_fkey; Type: INDEX; Schema: public; Owner: - |
| 2899 | 3051 | -- |
| 2900 | 3052 | |
| ... | ... | @@ -2902,7 +3054,7 @@ CREATE INDEX fki_product_stock_product_variant_id_fkey ON product_stock USING bt |
| 2902 | 3054 | |
| 2903 | 3055 | |
| 2904 | 3056 | -- |
| 2905 | --- TOC entry 3270 (class 1259 OID 26142) | |
| 3057 | +-- TOC entry 2456 (class 1259 OID 20335) | |
| 2906 | 3058 | -- Name: fki_product_stock_stock_id_fkey; Type: INDEX; Schema: public; Owner: - |
| 2907 | 3059 | -- |
| 2908 | 3060 | |
| ... | ... | @@ -2910,7 +3062,7 @@ CREATE INDEX fki_product_stock_stock_id_fkey ON product_stock USING btree (stock |
| 2910 | 3062 | |
| 2911 | 3063 | |
| 2912 | 3064 | -- |
| 2913 | --- TOC entry 3263 (class 1259 OID 26143) | |
| 3065 | +-- TOC entry 2448 (class 1259 OID 20336) | |
| 2914 | 3066 | -- Name: fki_product_variant_id_fkey; Type: INDEX; Schema: public; Owner: - |
| 2915 | 3067 | -- |
| 2916 | 3068 | |
| ... | ... | @@ -2918,7 +3070,7 @@ CREATE INDEX fki_product_variant_id_fkey ON product_image USING btree (product_v |
| 2918 | 3070 | |
| 2919 | 3071 | |
| 2920 | 3072 | -- |
| 2921 | --- TOC entry 3281 (class 1259 OID 26144) | |
| 3073 | +-- TOC entry 2467 (class 1259 OID 20337) | |
| 2922 | 3074 | -- Name: fki_product_variant_option_id; Type: INDEX; Schema: public; Owner: - |
| 2923 | 3075 | -- |
| 2924 | 3076 | |
| ... | ... | @@ -2926,23 +3078,7 @@ CREATE INDEX fki_product_variant_option_id ON product_variant_option USING btree |
| 2926 | 3078 | |
| 2927 | 3079 | |
| 2928 | 3080 | -- |
| 2929 | --- TOC entry 3292 (class 1259 OID 26146) | |
| 2930 | --- Name: fki_share_product_id_fkey; Type: INDEX; Schema: public; Owner: - | |
| 2931 | --- | |
| 2932 | - | |
| 2933 | -CREATE INDEX fki_share_product_id_fkey ON share USING btree (product_id); | |
| 2934 | - | |
| 2935 | - | |
| 2936 | --- | |
| 2937 | --- TOC entry 3293 (class 1259 OID 26147) | |
| 2938 | --- Name: fki_share_user_id_fkey; Type: INDEX; Schema: public; Owner: - | |
| 2939 | --- | |
| 2940 | - | |
| 2941 | -CREATE INDEX fki_share_user_id_fkey ON share USING btree (user_id); | |
| 2942 | - | |
| 2943 | - | |
| 2944 | --- | |
| 2945 | --- TOC entry 3203 (class 1259 OID 25448) | |
| 3081 | +-- TOC entry 2395 (class 1259 OID 19881) | |
| 2946 | 3082 | -- Name: idx-auth_item-type; Type: INDEX; Schema: public; Owner: - |
| 2947 | 3083 | -- |
| 2948 | 3084 | |
| ... | ... | @@ -2950,23 +3086,23 @@ CREATE INDEX "idx-auth_item-type" ON auth_item USING btree (type); |
| 2950 | 3086 | |
| 2951 | 3087 | |
| 2952 | 3088 | -- |
| 2953 | --- TOC entry 3337 (class 1259 OID 28619) | |
| 3089 | +-- TOC entry 2432 (class 1259 OID 20338) | |
| 2954 | 3090 | -- Name: orders_delivery_lang_orders_delivery_language_key; Type: INDEX; Schema: public; Owner: - |
| 2955 | 3091 | -- |
| 2956 | 3092 | |
| 2957 | -CREATE UNIQUE INDEX orders_delivery_lang_orders_delivery_language_key ON orders_delivery_lang USING btree (orders_delivery_id, language_id); | |
| 3093 | +CREATE UNIQUE INDEX orders_delivery_lang_orders_delivery_language_key ON order_delivery_lang USING btree (order_delivery_id, language_id); | |
| 2958 | 3094 | |
| 2959 | 3095 | |
| 2960 | 3096 | -- |
| 2961 | --- TOC entry 3338 (class 1259 OID 28653) | |
| 3097 | +-- TOC entry 2435 (class 1259 OID 20339) | |
| 2962 | 3098 | -- Name: orders_label_lang_orders_label_language_key; Type: INDEX; Schema: public; Owner: - |
| 2963 | 3099 | -- |
| 2964 | 3100 | |
| 2965 | -CREATE UNIQUE INDEX orders_label_lang_orders_label_language_key ON orders_label_lang USING btree (orders_label_id, language_id); | |
| 3101 | +CREATE UNIQUE INDEX orders_label_lang_orders_label_language_key ON order_label_lang USING btree (order_label_id, language_id); | |
| 2966 | 3102 | |
| 2967 | 3103 | |
| 2968 | 3104 | -- |
| 2969 | --- TOC entry 3327 (class 1259 OID 29039) | |
| 3105 | +-- TOC entry 2441 (class 1259 OID 20340) | |
| 2970 | 3106 | -- Name: page_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 2971 | 3107 | -- |
| 2972 | 3108 | |
| ... | ... | @@ -2974,7 +3110,7 @@ CREATE UNIQUE INDEX page_lang_alias ON page_lang USING btree (alias); |
| 2974 | 3110 | |
| 2975 | 3111 | |
| 2976 | 3112 | -- |
| 2977 | --- TOC entry 3328 (class 1259 OID 28462) | |
| 3113 | +-- TOC entry 2442 (class 1259 OID 20341) | |
| 2978 | 3114 | -- Name: page_lang_page_language_key; Type: INDEX; Schema: public; Owner: - |
| 2979 | 3115 | -- |
| 2980 | 3116 | |
| ... | ... | @@ -2982,7 +3118,7 @@ CREATE UNIQUE INDEX page_lang_page_language_key ON page_lang USING btree (page_i |
| 2982 | 3118 | |
| 2983 | 3119 | |
| 2984 | 3120 | -- |
| 2985 | --- TOC entry 3339 (class 1259 OID 29040) | |
| 3121 | +-- TOC entry 2451 (class 1259 OID 20342) | |
| 2986 | 3122 | -- Name: product_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 2987 | 3123 | -- |
| 2988 | 3124 | |
| ... | ... | @@ -2990,7 +3126,7 @@ CREATE UNIQUE INDEX product_lang_alias ON product_lang USING btree (alias); |
| 2990 | 3126 | |
| 2991 | 3127 | |
| 2992 | 3128 | -- |
| 2993 | --- TOC entry 3340 (class 1259 OID 28689) | |
| 3129 | +-- TOC entry 2452 (class 1259 OID 20343) | |
| 2994 | 3130 | -- Name: product_lang_product_language_key; Type: INDEX; Schema: public; Owner: - |
| 2995 | 3131 | -- |
| 2996 | 3132 | |
| ... | ... | @@ -2998,7 +3134,7 @@ CREATE UNIQUE INDEX product_lang_product_language_key ON product_lang USING btre |
| 2998 | 3134 | |
| 2999 | 3135 | |
| 3000 | 3136 | -- |
| 3001 | --- TOC entry 3261 (class 1259 OID 29128) | |
| 3137 | +-- TOC entry 2446 (class 1259 OID 20344) | |
| 3002 | 3138 | -- Name: product_remote_id_uindex; Type: INDEX; Schema: public; Owner: - |
| 3003 | 3139 | -- |
| 3004 | 3140 | |
| ... | ... | @@ -3006,23 +3142,7 @@ CREATE UNIQUE INDEX product_remote_id_uindex ON product USING btree (remote_id); |
| 3006 | 3142 | |
| 3007 | 3143 | |
| 3008 | 3144 | -- |
| 3009 | --- TOC entry 3341 (class 1259 OID 28706) | |
| 3010 | --- Name: product_spec_lang_product_spec_language_key; Type: INDEX; Schema: public; Owner: - | |
| 3011 | --- | |
| 3012 | - | |
| 3013 | -CREATE UNIQUE INDEX product_spec_lang_product_spec_language_key ON product_spec_lang USING btree (product_spec_id, language_id); | |
| 3014 | - | |
| 3015 | - | |
| 3016 | --- | |
| 3017 | --- TOC entry 3318 (class 1259 OID 28292) | |
| 3018 | --- Name: product_to_project_product_variant_id_project_id_uindex; Type: INDEX; Schema: public; Owner: - | |
| 3019 | --- | |
| 3020 | - | |
| 3021 | -CREATE UNIQUE INDEX product_to_project_product_variant_id_project_id_uindex ON product_to_project USING btree (product_variant_id, project_id); | |
| 3022 | - | |
| 3023 | - | |
| 3024 | --- | |
| 3025 | --- TOC entry 3342 (class 1259 OID 28729) | |
| 3145 | +-- TOC entry 2461 (class 1259 OID 20345) | |
| 3026 | 3146 | -- Name: product_unit_lang_product_unit_language_key; Type: INDEX; Schema: public; Owner: - |
| 3027 | 3147 | -- |
| 3028 | 3148 | |
| ... | ... | @@ -3030,7 +3150,7 @@ CREATE UNIQUE INDEX product_unit_lang_product_unit_language_key ON product_unit_ |
| 3030 | 3150 | |
| 3031 | 3151 | |
| 3032 | 3152 | -- |
| 3033 | --- TOC entry 3343 (class 1259 OID 28744) | |
| 3153 | +-- TOC entry 2466 (class 1259 OID 20346) | |
| 3034 | 3154 | -- Name: product_variant_lang_product_variant_language_key; Type: INDEX; Schema: public; Owner: - |
| 3035 | 3155 | -- |
| 3036 | 3156 | |
| ... | ... | @@ -3038,7 +3158,7 @@ CREATE UNIQUE INDEX product_variant_lang_product_variant_language_key ON product |
| 3038 | 3158 | |
| 3039 | 3159 | |
| 3040 | 3160 | -- |
| 3041 | --- TOC entry 3279 (class 1259 OID 26148) | |
| 3161 | +-- TOC entry 2464 (class 1259 OID 20347) | |
| 3042 | 3162 | -- Name: product_variant_product_id_index; Type: INDEX; Schema: public; Owner: - |
| 3043 | 3163 | -- |
| 3044 | 3164 | |
| ... | ... | @@ -3046,7 +3166,7 @@ CREATE INDEX product_variant_product_id_index ON product_variant USING btree (pr |
| 3046 | 3166 | |
| 3047 | 3167 | |
| 3048 | 3168 | -- |
| 3049 | --- TOC entry 3280 (class 1259 OID 29138) | |
| 3169 | +-- TOC entry 2465 (class 1259 OID 20348) | |
| 3050 | 3170 | -- Name: product_variant_remote_id_uindex; Type: INDEX; Schema: public; Owner: - |
| 3051 | 3171 | -- |
| 3052 | 3172 | |
| ... | ... | @@ -3054,23 +3174,7 @@ CREATE UNIQUE INDEX product_variant_remote_id_uindex ON product_variant USING bt |
| 3054 | 3174 | |
| 3055 | 3175 | |
| 3056 | 3176 | -- |
| 3057 | --- TOC entry 3344 (class 1259 OID 29041) | |
| 3058 | --- Name: project_lang_alias; Type: INDEX; Schema: public; Owner: - | |
| 3059 | --- | |
| 3060 | - | |
| 3061 | -CREATE UNIQUE INDEX project_lang_alias ON project_lang USING btree (alias); | |
| 3062 | - | |
| 3063 | - | |
| 3064 | --- | |
| 3065 | --- TOC entry 3345 (class 1259 OID 28763) | |
| 3066 | --- Name: project_lang_project_language_key; Type: INDEX; Schema: public; Owner: - | |
| 3067 | --- | |
| 3068 | - | |
| 3069 | -CREATE UNIQUE INDEX project_lang_project_language_key ON project_lang USING btree (project_id, language_id); | |
| 3070 | - | |
| 3071 | - | |
| 3072 | --- | |
| 3073 | --- TOC entry 3347 (class 1259 OID 28816) | |
| 3177 | +-- TOC entry 2474 (class 1259 OID 20349) | |
| 3074 | 3178 | -- Name: seo_category_lang_seo_category_language_key; Type: INDEX; Schema: public; Owner: - |
| 3075 | 3179 | -- |
| 3076 | 3180 | |
| ... | ... | @@ -3078,7 +3182,7 @@ CREATE UNIQUE INDEX seo_category_lang_seo_category_language_key ON seo_category_ |
| 3078 | 3182 | |
| 3079 | 3183 | |
| 3080 | 3184 | -- |
| 3081 | --- TOC entry 3348 (class 1259 OID 28833) | |
| 3185 | +-- TOC entry 2477 (class 1259 OID 20350) | |
| 3082 | 3186 | -- Name: seo_dynamic_lang_seo_dynamic_language_key; Type: INDEX; Schema: public; Owner: - |
| 3083 | 3187 | -- |
| 3084 | 3188 | |
| ... | ... | @@ -3086,7 +3190,7 @@ CREATE UNIQUE INDEX seo_dynamic_lang_seo_dynamic_language_key ON seo_dynamic_lan |
| 3086 | 3190 | |
| 3087 | 3191 | |
| 3088 | 3192 | -- |
| 3089 | --- TOC entry 3346 (class 1259 OID 28802) | |
| 3193 | +-- TOC entry 2478 (class 1259 OID 20351) | |
| 3090 | 3194 | -- Name: seo_lang_seo_language_key; Type: INDEX; Schema: public; Owner: - |
| 3091 | 3195 | -- |
| 3092 | 3196 | |
| ... | ... | @@ -3094,7 +3198,7 @@ CREATE UNIQUE INDEX seo_lang_seo_language_key ON seo_lang USING btree (seo_id, l |
| 3094 | 3198 | |
| 3095 | 3199 | |
| 3096 | 3200 | -- |
| 3097 | --- TOC entry 3349 (class 1259 OID 29042) | |
| 3201 | +-- TOC entry 2481 (class 1259 OID 20352) | |
| 3098 | 3202 | -- Name: service_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 3099 | 3203 | -- |
| 3100 | 3204 | |
| ... | ... | @@ -3102,7 +3206,7 @@ CREATE UNIQUE INDEX service_lang_alias ON service_lang USING btree (alias); |
| 3102 | 3206 | |
| 3103 | 3207 | |
| 3104 | 3208 | -- |
| 3105 | --- TOC entry 3350 (class 1259 OID 28901) | |
| 3209 | +-- TOC entry 2482 (class 1259 OID 20353) | |
| 3106 | 3210 | -- Name: service_lang_service_language_key; Type: INDEX; Schema: public; Owner: - |
| 3107 | 3211 | -- |
| 3108 | 3212 | |
| ... | ... | @@ -3110,7 +3214,7 @@ CREATE UNIQUE INDEX service_lang_service_language_key ON service_lang USING btre |
| 3110 | 3214 | |
| 3111 | 3215 | |
| 3112 | 3216 | -- |
| 3113 | --- TOC entry 3351 (class 1259 OID 28935) | |
| 3217 | +-- TOC entry 2487 (class 1259 OID 20354) | |
| 3114 | 3218 | -- Name: slider_image_lang_slider_image_language_key; Type: INDEX; Schema: public; Owner: - |
| 3115 | 3219 | -- |
| 3116 | 3220 | |
| ... | ... | @@ -3118,7 +3222,7 @@ CREATE UNIQUE INDEX slider_image_lang_slider_image_language_key ON slider_image_ |
| 3118 | 3222 | |
| 3119 | 3223 | |
| 3120 | 3224 | -- |
| 3121 | --- TOC entry 3356 (class 1259 OID 29093) | |
| 3225 | +-- TOC entry 2488 (class 1259 OID 20355) | |
| 3122 | 3226 | -- Name: stock_lang_stock_language_key; Type: INDEX; Schema: public; Owner: - |
| 3123 | 3227 | -- |
| 3124 | 3228 | |
| ... | ... | @@ -3126,7 +3230,7 @@ CREATE UNIQUE INDEX stock_lang_stock_language_key ON stock_lang USING btree (sto |
| 3126 | 3230 | |
| 3127 | 3231 | |
| 3128 | 3232 | -- |
| 3129 | --- TOC entry 3300 (class 1259 OID 26150) | |
| 3233 | +-- TOC entry 2489 (class 1259 OID 20356) | |
| 3130 | 3234 | -- Name: tax_group_is_filter_index; Type: INDEX; Schema: public; Owner: - |
| 3131 | 3235 | -- |
| 3132 | 3236 | |
| ... | ... | @@ -3134,7 +3238,7 @@ CREATE INDEX tax_group_is_filter_index ON tax_group USING btree (is_filter); |
| 3134 | 3238 | |
| 3135 | 3239 | |
| 3136 | 3240 | -- |
| 3137 | --- TOC entry 3352 (class 1259 OID 29043) | |
| 3241 | +-- TOC entry 2494 (class 1259 OID 20357) | |
| 3138 | 3242 | -- Name: tax_group_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 3139 | 3243 | -- |
| 3140 | 3244 | |
| ... | ... | @@ -3142,7 +3246,7 @@ CREATE UNIQUE INDEX tax_group_lang_alias ON tax_group_lang USING btree (alias); |
| 3142 | 3246 | |
| 3143 | 3247 | |
| 3144 | 3248 | -- |
| 3145 | --- TOC entry 3353 (class 1259 OID 28969) | |
| 3249 | +-- TOC entry 2495 (class 1259 OID 20358) | |
| 3146 | 3250 | -- Name: tax_group_lang_tax_group_language_key; Type: INDEX; Schema: public; Owner: - |
| 3147 | 3251 | -- |
| 3148 | 3252 | |
| ... | ... | @@ -3150,7 +3254,7 @@ CREATE UNIQUE INDEX tax_group_lang_tax_group_language_key ON tax_group_lang USIN |
| 3150 | 3254 | |
| 3151 | 3255 | |
| 3152 | 3256 | -- |
| 3153 | --- TOC entry 3303 (class 1259 OID 29155) | |
| 3257 | +-- TOC entry 2492 (class 1259 OID 20359) | |
| 3154 | 3258 | -- Name: tax_group_remote_id_uindex; Type: INDEX; Schema: public; Owner: - |
| 3155 | 3259 | -- |
| 3156 | 3260 | |
| ... | ... | @@ -3158,7 +3262,7 @@ CREATE UNIQUE INDEX tax_group_remote_id_uindex ON tax_group USING btree (remote_ |
| 3158 | 3262 | |
| 3159 | 3263 | |
| 3160 | 3264 | -- |
| 3161 | --- TOC entry 3304 (class 1259 OID 26151) | |
| 3265 | +-- TOC entry 2493 (class 1259 OID 20360) | |
| 3162 | 3266 | -- Name: tax_group_sort_index; Type: INDEX; Schema: public; Owner: - |
| 3163 | 3267 | -- |
| 3164 | 3268 | |
| ... | ... | @@ -3166,7 +3270,7 @@ CREATE INDEX tax_group_sort_index ON tax_group USING btree (sort); |
| 3166 | 3270 | |
| 3167 | 3271 | |
| 3168 | 3272 | -- |
| 3169 | --- TOC entry 3354 (class 1259 OID 29044) | |
| 3273 | +-- TOC entry 2503 (class 1259 OID 20361) | |
| 3170 | 3274 | -- Name: tax_option_lang_alias; Type: INDEX; Schema: public; Owner: - |
| 3171 | 3275 | -- |
| 3172 | 3276 | |
| ... | ... | @@ -3174,7 +3278,7 @@ CREATE UNIQUE INDEX tax_option_lang_alias ON tax_option_lang USING btree (alias) |
| 3174 | 3278 | |
| 3175 | 3279 | |
| 3176 | 3280 | -- |
| 3177 | --- TOC entry 3355 (class 1259 OID 29000) | |
| 3281 | +-- TOC entry 2504 (class 1259 OID 20362) | |
| 3178 | 3282 | -- Name: tax_option_lang_tax_option_language_key; Type: INDEX; Schema: public; Owner: - |
| 3179 | 3283 | -- |
| 3180 | 3284 | |
| ... | ... | @@ -3182,7 +3286,7 @@ CREATE UNIQUE INDEX tax_option_lang_tax_option_language_key ON tax_option_lang U |
| 3182 | 3286 | |
| 3183 | 3287 | |
| 3184 | 3288 | -- |
| 3185 | --- TOC entry 3309 (class 1259 OID 29163) | |
| 3289 | +-- TOC entry 2500 (class 1259 OID 20363) | |
| 3186 | 3290 | -- Name: tax_option_remote_id_uindex; Type: INDEX; Schema: public; Owner: - |
| 3187 | 3291 | -- |
| 3188 | 3292 | |
| ... | ... | @@ -3190,7 +3294,7 @@ CREATE UNIQUE INDEX tax_option_remote_id_uindex ON tax_option USING btree (remot |
| 3190 | 3294 | |
| 3191 | 3295 | |
| 3192 | 3296 | -- |
| 3193 | --- TOC entry 3310 (class 1259 OID 26153) | |
| 3297 | +-- TOC entry 2501 (class 1259 OID 20364) | |
| 3194 | 3298 | -- Name: tax_option_sort_index; Type: INDEX; Schema: public; Owner: - |
| 3195 | 3299 | -- |
| 3196 | 3300 | |
| ... | ... | @@ -3198,7 +3302,7 @@ CREATE INDEX tax_option_sort_index ON tax_option USING btree (sort); |
| 3198 | 3302 | |
| 3199 | 3303 | |
| 3200 | 3304 | -- |
| 3201 | --- TOC entry 3311 (class 1259 OID 26154) | |
| 3305 | +-- TOC entry 2502 (class 1259 OID 20365) | |
| 3202 | 3306 | -- Name: tax_option_tax_group_id_index; Type: INDEX; Schema: public; Owner: - |
| 3203 | 3307 | -- |
| 3204 | 3308 | |
| ... | ... | @@ -3206,88 +3310,61 @@ CREATE INDEX tax_option_tax_group_id_index ON tax_option USING btree (tax_group_ |
| 3206 | 3310 | |
| 3207 | 3311 | |
| 3208 | 3312 | -- |
| 3209 | --- TOC entry 3365 (class 2606 OID 26157) | |
| 3210 | --- Name: artbox_comment_id_artbox_comment; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3211 | --- | |
| 3212 | - | |
| 3213 | -ALTER TABLE ONLY artbox_like | |
| 3214 | - ADD CONSTRAINT artbox_comment_id_artbox_comment FOREIGN KEY (artbox_comment_id) REFERENCES artbox_comment(artbox_comment_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3215 | - | |
| 3216 | - | |
| 3217 | --- | |
| 3218 | --- TOC entry 3361 (class 2606 OID 26162) | |
| 3219 | --- Name: artbox_comment_pid_artbox_comment; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3220 | --- | |
| 3221 | - | |
| 3222 | -ALTER TABLE ONLY artbox_comment | |
| 3223 | - ADD CONSTRAINT artbox_comment_pid_artbox_comment FOREIGN KEY (artbox_comment_pid) REFERENCES artbox_comment(artbox_comment_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3224 | - | |
| 3225 | - | |
| 3226 | --- | |
| 3227 | --- TOC entry 3367 (class 2606 OID 26167) | |
| 3228 | --- Name: article_to_rating_article; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3229 | --- | |
| 3230 | - | |
| 3231 | -ALTER TABLE ONLY article_to_rating | |
| 3232 | - ADD CONSTRAINT article_to_rating_article FOREIGN KEY (articles_id) REFERENCES articles(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3233 | - | |
| 3234 | - | |
| 3235 | --- | |
| 3236 | --- TOC entry 3400 (class 2606 OID 28420) | |
| 3237 | --- Name: articles_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3313 | +-- TOC entry 2509 (class 2606 OID 19931) | |
| 3314 | +-- Name: article_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3238 | 3315 | -- |
| 3239 | 3316 | |
| 3240 | -ALTER TABLE ONLY articles_lang | |
| 3241 | - ADD CONSTRAINT articles_fk FOREIGN KEY (articles_id) REFERENCES articles(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3317 | +ALTER TABLE ONLY article_lang | |
| 3318 | + ADD CONSTRAINT article_fk FOREIGN KEY (article_id) REFERENCES article(id); | |
| 3242 | 3319 | |
| 3243 | 3320 | |
| 3244 | 3321 | -- |
| 3245 | --- TOC entry 3357 (class 2606 OID 25473) | |
| 3322 | +-- TOC entry 2508 (class 2606 OID 19902) | |
| 3246 | 3323 | -- Name: auth_assignment_item_name_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3247 | 3324 | -- |
| 3248 | 3325 | |
| 3249 | 3326 | ALTER TABLE ONLY auth_assignment |
| 3250 | - ADD CONSTRAINT auth_assignment_item_name_fkey FOREIGN KEY (item_name) REFERENCES auth_item(name); | |
| 3327 | + ADD CONSTRAINT auth_assignment_item_name_fkey FOREIGN KEY (item_name) REFERENCES auth_item(name) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3251 | 3328 | |
| 3252 | 3329 | |
| 3253 | 3330 | -- |
| 3254 | --- TOC entry 3359 (class 2606 OID 25478) | |
| 3331 | +-- TOC entry 2507 (class 2606 OID 19892) | |
| 3255 | 3332 | -- Name: auth_item_child_child_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3256 | 3333 | -- |
| 3257 | 3334 | |
| 3258 | 3335 | ALTER TABLE ONLY auth_item_child |
| 3259 | - ADD CONSTRAINT auth_item_child_child_fkey FOREIGN KEY (child) REFERENCES auth_item(name); | |
| 3336 | + ADD CONSTRAINT auth_item_child_child_fkey FOREIGN KEY (child) REFERENCES auth_item(name) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3260 | 3337 | |
| 3261 | 3338 | |
| 3262 | 3339 | -- |
| 3263 | --- TOC entry 3360 (class 2606 OID 25483) | |
| 3340 | +-- TOC entry 2506 (class 2606 OID 19887) | |
| 3264 | 3341 | -- Name: auth_item_child_parent_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3265 | 3342 | -- |
| 3266 | 3343 | |
| 3267 | 3344 | ALTER TABLE ONLY auth_item_child |
| 3268 | - ADD CONSTRAINT auth_item_child_parent_fkey FOREIGN KEY (parent) REFERENCES auth_item(name); | |
| 3345 | + ADD CONSTRAINT auth_item_child_parent_fkey FOREIGN KEY (parent) REFERENCES auth_item(name) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3269 | 3346 | |
| 3270 | 3347 | |
| 3271 | 3348 | -- |
| 3272 | --- TOC entry 3358 (class 2606 OID 25488) | |
| 3349 | +-- TOC entry 2505 (class 2606 OID 19876) | |
| 3273 | 3350 | -- Name: auth_item_rule_name_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3274 | 3351 | -- |
| 3275 | 3352 | |
| 3276 | 3353 | ALTER TABLE ONLY auth_item |
| 3277 | - ADD CONSTRAINT auth_item_rule_name_fkey FOREIGN KEY (rule_name) REFERENCES auth_rule(name); | |
| 3354 | + ADD CONSTRAINT auth_item_rule_name_fkey FOREIGN KEY (rule_name) REFERENCES auth_rule(name) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3278 | 3355 | |
| 3279 | 3356 | |
| 3280 | 3357 | -- |
| 3281 | --- TOC entry 3404 (class 2606 OID 28503) | |
| 3358 | +-- TOC entry 2511 (class 2606 OID 20366) | |
| 3282 | 3359 | -- Name: banner_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3283 | 3360 | -- |
| 3284 | 3361 | |
| 3285 | 3362 | ALTER TABLE ONLY banner_lang |
| 3286 | - ADD CONSTRAINT banner_fk FOREIGN KEY (banner_id) REFERENCES banner(banner_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3363 | + ADD CONSTRAINT banner_fk FOREIGN KEY (banner_id) REFERENCES banner(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3287 | 3364 | |
| 3288 | 3365 | |
| 3289 | 3366 | -- |
| 3290 | --- TOC entry 3406 (class 2606 OID 28517) | |
| 3367 | +-- TOC entry 2513 (class 2606 OID 20371) | |
| 3291 | 3368 | -- Name: bg_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3292 | 3369 | -- |
| 3293 | 3370 | |
| ... | ... | @@ -3296,331 +3373,313 @@ ALTER TABLE ONLY bg_lang |
| 3296 | 3373 | |
| 3297 | 3374 | |
| 3298 | 3375 | -- |
| 3299 | --- TOC entry 3408 (class 2606 OID 28540) | |
| 3376 | +-- TOC entry 2515 (class 2606 OID 20376) | |
| 3300 | 3377 | -- Name: brand_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3301 | 3378 | -- |
| 3302 | 3379 | |
| 3303 | 3380 | ALTER TABLE ONLY brand_lang |
| 3304 | - ADD CONSTRAINT brand_fk FOREIGN KEY (brand_id) REFERENCES brand(brand_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3381 | + ADD CONSTRAINT brand_fk FOREIGN KEY (brand_id) REFERENCES brand(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3305 | 3382 | |
| 3306 | 3383 | |
| 3307 | 3384 | -- |
| 3308 | --- TOC entry 3393 (class 2606 OID 27377) | |
| 3385 | +-- TOC entry 2567 (class 2606 OID 20381) | |
| 3309 | 3386 | -- Name: category_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3310 | 3387 | -- |
| 3311 | 3388 | |
| 3312 | 3389 | ALTER TABLE ONLY tax_group_to_category |
| 3313 | - ADD CONSTRAINT category_fk FOREIGN KEY (category_id) REFERENCES category(category_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3390 | + ADD CONSTRAINT category_fk FOREIGN KEY (category_id) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3314 | 3391 | |
| 3315 | 3392 | |
| 3316 | 3393 | -- |
| 3317 | --- TOC entry 3410 (class 2606 OID 28557) | |
| 3394 | +-- TOC entry 2518 (class 2606 OID 20386) | |
| 3318 | 3395 | -- Name: category_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3319 | 3396 | -- |
| 3320 | 3397 | |
| 3321 | 3398 | ALTER TABLE ONLY category_lang |
| 3322 | - ADD CONSTRAINT category_fk FOREIGN KEY (category_id) REFERENCES category(category_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3399 | + ADD CONSTRAINT category_fk FOREIGN KEY (category_id) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3323 | 3400 | |
| 3324 | 3401 | |
| 3325 | 3402 | -- |
| 3326 | --- TOC entry 3368 (class 2606 OID 26177) | |
| 3403 | +-- TOC entry 2517 (class 2606 OID 20391) | |
| 3327 | 3404 | -- Name: category_product_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3328 | 3405 | -- |
| 3329 | 3406 | |
| 3330 | 3407 | ALTER TABLE ONLY category |
| 3331 | - ADD CONSTRAINT category_product_unit_fkey FOREIGN KEY (product_unit_id) REFERENCES product_unit(product_unit_id); | |
| 3408 | + ADD CONSTRAINT category_product_unit_fkey FOREIGN KEY (product_unit_id) REFERENCES product_unit(id); | |
| 3332 | 3409 | |
| 3333 | 3410 | |
| 3334 | 3411 | -- |
| 3335 | --- TOC entry 3412 (class 2606 OID 28595) | |
| 3412 | +-- TOC entry 2520 (class 2606 OID 20396) | |
| 3336 | 3413 | -- Name: event_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3337 | 3414 | -- |
| 3338 | 3415 | |
| 3339 | 3416 | ALTER TABLE ONLY event_lang |
| 3340 | - ADD CONSTRAINT event_fk FOREIGN KEY (event_id) REFERENCES event(event_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3417 | + ADD CONSTRAINT event_fk FOREIGN KEY (event_id) REFERENCES event(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3341 | 3418 | |
| 3342 | 3419 | |
| 3343 | 3420 | -- |
| 3344 | --- TOC entry 3375 (class 2606 OID 27402) | |
| 3421 | +-- TOC entry 2533 (class 2606 OID 20401) | |
| 3345 | 3422 | -- Name: fki_category_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3346 | 3423 | -- |
| 3347 | 3424 | |
| 3348 | 3425 | ALTER TABLE ONLY product_category |
| 3349 | - ADD CONSTRAINT fki_category_id FOREIGN KEY (category_id) REFERENCES category(category_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3426 | + ADD CONSTRAINT fki_category_id FOREIGN KEY (category_id) REFERENCES category(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3350 | 3427 | |
| 3351 | 3428 | |
| 3352 | 3429 | -- |
| 3353 | --- TOC entry 3374 (class 2606 OID 27397) | |
| 3430 | +-- TOC entry 2534 (class 2606 OID 20406) | |
| 3354 | 3431 | -- Name: fki_product_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3355 | 3432 | -- |
| 3356 | 3433 | |
| 3357 | 3434 | ALTER TABLE ONLY product_category |
| 3358 | - ADD CONSTRAINT fki_product_id FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3435 | + ADD CONSTRAINT fki_product_id FOREIGN KEY (product_id) REFERENCES product(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3359 | 3436 | |
| 3360 | 3437 | |
| 3361 | 3438 | -- |
| 3362 | --- TOC entry 3394 (class 2606 OID 27382) | |
| 3439 | +-- TOC entry 2569 (class 2606 OID 20411) | |
| 3363 | 3440 | -- Name: fki_tax_option_tax_group_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3364 | 3441 | -- |
| 3365 | 3442 | |
| 3366 | 3443 | ALTER TABLE ONLY tax_option |
| 3367 | - 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; | |
| 3444 | + ADD CONSTRAINT fki_tax_option_tax_group_id FOREIGN KEY (tax_group_id) REFERENCES tax_group(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3368 | 3445 | |
| 3369 | 3446 | |
| 3370 | 3447 | -- |
| 3371 | --- TOC entry 3401 (class 2606 OID 28425) | |
| 3448 | +-- TOC entry 2510 (class 2606 OID 19936) | |
| 3372 | 3449 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3373 | 3450 | -- |
| 3374 | 3451 | |
| 3375 | -ALTER TABLE ONLY articles_lang | |
| 3376 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3452 | +ALTER TABLE ONLY article_lang | |
| 3453 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id); | |
| 3377 | 3454 | |
| 3378 | 3455 | |
| 3379 | 3456 | -- |
| 3380 | --- TOC entry 3403 (class 2606 OID 28468) | |
| 3457 | +-- TOC entry 2530 (class 2606 OID 20416) | |
| 3381 | 3458 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3382 | 3459 | -- |
| 3383 | 3460 | |
| 3384 | 3461 | ALTER TABLE ONLY page_lang |
| 3385 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3462 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3386 | 3463 | |
| 3387 | 3464 | |
| 3388 | 3465 | -- |
| 3389 | --- TOC entry 3405 (class 2606 OID 28508) | |
| 3466 | +-- TOC entry 2512 (class 2606 OID 20421) | |
| 3390 | 3467 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3391 | 3468 | -- |
| 3392 | 3469 | |
| 3393 | 3470 | ALTER TABLE ONLY banner_lang |
| 3394 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3471 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3395 | 3472 | |
| 3396 | 3473 | |
| 3397 | 3474 | -- |
| 3398 | --- TOC entry 3407 (class 2606 OID 28522) | |
| 3475 | +-- TOC entry 2514 (class 2606 OID 20426) | |
| 3399 | 3476 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3400 | 3477 | -- |
| 3401 | 3478 | |
| 3402 | 3479 | ALTER TABLE ONLY bg_lang |
| 3403 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3480 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3404 | 3481 | |
| 3405 | 3482 | |
| 3406 | 3483 | -- |
| 3407 | --- TOC entry 3409 (class 2606 OID 28545) | |
| 3484 | +-- TOC entry 2516 (class 2606 OID 20431) | |
| 3408 | 3485 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3409 | 3486 | -- |
| 3410 | 3487 | |
| 3411 | 3488 | ALTER TABLE ONLY brand_lang |
| 3412 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3489 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3413 | 3490 | |
| 3414 | 3491 | |
| 3415 | 3492 | -- |
| 3416 | --- TOC entry 3411 (class 2606 OID 28562) | |
| 3493 | +-- TOC entry 2519 (class 2606 OID 20436) | |
| 3417 | 3494 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3418 | 3495 | -- |
| 3419 | 3496 | |
| 3420 | 3497 | ALTER TABLE ONLY category_lang |
| 3421 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3498 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3422 | 3499 | |
| 3423 | 3500 | |
| 3424 | 3501 | -- |
| 3425 | --- TOC entry 3413 (class 2606 OID 28600) | |
| 3502 | +-- TOC entry 2521 (class 2606 OID 20441) | |
| 3426 | 3503 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3427 | 3504 | -- |
| 3428 | 3505 | |
| 3429 | 3506 | ALTER TABLE ONLY event_lang |
| 3430 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3507 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3431 | 3508 | |
| 3432 | 3509 | |
| 3433 | 3510 | -- |
| 3434 | --- TOC entry 3415 (class 2606 OID 28625) | |
| 3511 | +-- TOC entry 2524 (class 2606 OID 20446) | |
| 3435 | 3512 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3436 | 3513 | -- |
| 3437 | 3514 | |
| 3438 | -ALTER TABLE ONLY orders_delivery_lang | |
| 3439 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3515 | +ALTER TABLE ONLY order_delivery_lang | |
| 3516 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3440 | 3517 | |
| 3441 | 3518 | |
| 3442 | 3519 | -- |
| 3443 | --- TOC entry 3417 (class 2606 OID 28659) | |
| 3520 | +-- TOC entry 2526 (class 2606 OID 20451) | |
| 3444 | 3521 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3445 | 3522 | -- |
| 3446 | 3523 | |
| 3447 | -ALTER TABLE ONLY orders_label_lang | |
| 3448 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3524 | +ALTER TABLE ONLY order_label_lang | |
| 3525 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3449 | 3526 | |
| 3450 | 3527 | |
| 3451 | 3528 | -- |
| 3452 | --- TOC entry 3419 (class 2606 OID 28695) | |
| 3529 | +-- TOC entry 2537 (class 2606 OID 20456) | |
| 3453 | 3530 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3454 | 3531 | -- |
| 3455 | 3532 | |
| 3456 | 3533 | ALTER TABLE ONLY product_lang |
| 3457 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3534 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3458 | 3535 | |
| 3459 | 3536 | |
| 3460 | 3537 | -- |
| 3461 | --- TOC entry 3421 (class 2606 OID 28712) | |
| 3462 | --- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3463 | --- | |
| 3464 | - | |
| 3465 | -ALTER TABLE ONLY product_spec_lang | |
| 3466 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3467 | - | |
| 3468 | - | |
| 3469 | --- | |
| 3470 | --- TOC entry 3423 (class 2606 OID 28735) | |
| 3538 | +-- TOC entry 2543 (class 2606 OID 20461) | |
| 3471 | 3539 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3472 | 3540 | -- |
| 3473 | 3541 | |
| 3474 | 3542 | ALTER TABLE ONLY product_unit_lang |
| 3475 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3543 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3476 | 3544 | |
| 3477 | 3545 | |
| 3478 | 3546 | -- |
| 3479 | --- TOC entry 3425 (class 2606 OID 28750) | |
| 3547 | +-- TOC entry 2547 (class 2606 OID 20466) | |
| 3480 | 3548 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3481 | 3549 | -- |
| 3482 | 3550 | |
| 3483 | 3551 | ALTER TABLE ONLY product_variant_lang |
| 3484 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3485 | - | |
| 3486 | - | |
| 3487 | --- | |
| 3488 | --- TOC entry 3427 (class 2606 OID 28769) | |
| 3489 | --- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3490 | --- | |
| 3491 | - | |
| 3492 | -ALTER TABLE ONLY project_lang | |
| 3493 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3552 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3494 | 3553 | |
| 3495 | 3554 | |
| 3496 | 3555 | -- |
| 3497 | --- TOC entry 3429 (class 2606 OID 28808) | |
| 3556 | +-- TOC entry 2556 (class 2606 OID 20471) | |
| 3498 | 3557 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3499 | 3558 | -- |
| 3500 | 3559 | |
| 3501 | 3560 | ALTER TABLE ONLY seo_lang |
| 3502 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3561 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3503 | 3562 | |
| 3504 | 3563 | |
| 3505 | 3564 | -- |
| 3506 | --- TOC entry 3431 (class 2606 OID 28822) | |
| 3565 | +-- TOC entry 2551 (class 2606 OID 20476) | |
| 3507 | 3566 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3508 | 3567 | -- |
| 3509 | 3568 | |
| 3510 | 3569 | ALTER TABLE ONLY seo_category_lang |
| 3511 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3570 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3512 | 3571 | |
| 3513 | 3572 | |
| 3514 | 3573 | -- |
| 3515 | --- TOC entry 3433 (class 2606 OID 28839) | |
| 3574 | +-- TOC entry 2554 (class 2606 OID 20481) | |
| 3516 | 3575 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3517 | 3576 | -- |
| 3518 | 3577 | |
| 3519 | 3578 | ALTER TABLE ONLY seo_dynamic_lang |
| 3520 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3579 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3521 | 3580 | |
| 3522 | 3581 | |
| 3523 | 3582 | -- |
| 3524 | --- TOC entry 3435 (class 2606 OID 28907) | |
| 3583 | +-- TOC entry 2558 (class 2606 OID 20486) | |
| 3525 | 3584 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3526 | 3585 | -- |
| 3527 | 3586 | |
| 3528 | 3587 | ALTER TABLE ONLY service_lang |
| 3529 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3588 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3530 | 3589 | |
| 3531 | 3590 | |
| 3532 | 3591 | -- |
| 3533 | --- TOC entry 3437 (class 2606 OID 28941) | |
| 3592 | +-- TOC entry 2561 (class 2606 OID 20491) | |
| 3534 | 3593 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3535 | 3594 | -- |
| 3536 | 3595 | |
| 3537 | 3596 | ALTER TABLE ONLY slider_image_lang |
| 3538 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3597 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3539 | 3598 | |
| 3540 | 3599 | |
| 3541 | 3600 | -- |
| 3542 | --- TOC entry 3439 (class 2606 OID 28975) | |
| 3601 | +-- TOC entry 2565 (class 2606 OID 20496) | |
| 3543 | 3602 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3544 | 3603 | -- |
| 3545 | 3604 | |
| 3546 | 3605 | ALTER TABLE ONLY tax_group_lang |
| 3547 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3606 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3548 | 3607 | |
| 3549 | 3608 | |
| 3550 | 3609 | -- |
| 3551 | --- TOC entry 3441 (class 2606 OID 29006) | |
| 3610 | +-- TOC entry 2570 (class 2606 OID 20501) | |
| 3552 | 3611 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3553 | 3612 | -- |
| 3554 | 3613 | |
| 3555 | 3614 | ALTER TABLE ONLY tax_option_lang |
| 3556 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3615 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3557 | 3616 | |
| 3558 | 3617 | |
| 3559 | 3618 | -- |
| 3560 | --- TOC entry 3443 (class 2606 OID 29099) | |
| 3619 | +-- TOC entry 2563 (class 2606 OID 20506) | |
| 3561 | 3620 | -- Name: language_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3562 | 3621 | -- |
| 3563 | 3622 | |
| 3564 | 3623 | ALTER TABLE ONLY stock_lang |
| 3565 | - ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(language_id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3624 | + ADD CONSTRAINT language_fk FOREIGN KEY (language_id) REFERENCES language(id) ON UPDATE CASCADE ON DELETE RESTRICT; | |
| 3566 | 3625 | |
| 3567 | 3626 | |
| 3568 | 3627 | -- |
| 3569 | --- TOC entry 3414 (class 2606 OID 28620) | |
| 3628 | +-- TOC entry 2525 (class 2606 OID 20511) | |
| 3570 | 3629 | -- Name: orders_delivery_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3571 | 3630 | -- |
| 3572 | 3631 | |
| 3573 | -ALTER TABLE ONLY orders_delivery_lang | |
| 3574 | - ADD CONSTRAINT orders_delivery_fk FOREIGN KEY (orders_delivery_id) REFERENCES orders_delivery(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3632 | +ALTER TABLE ONLY order_delivery_lang | |
| 3633 | + ADD CONSTRAINT orders_delivery_fk FOREIGN KEY (order_delivery_id) REFERENCES order_delivery(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3575 | 3634 | |
| 3576 | 3635 | |
| 3577 | 3636 | -- |
| 3578 | --- TOC entry 3416 (class 2606 OID 28654) | |
| 3637 | +-- TOC entry 2527 (class 2606 OID 20516) | |
| 3579 | 3638 | -- Name: orders_label_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3580 | 3639 | -- |
| 3581 | 3640 | |
| 3582 | -ALTER TABLE ONLY orders_label_lang | |
| 3583 | - ADD CONSTRAINT orders_label_fk FOREIGN KEY (orders_label_id) REFERENCES orders_label(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3641 | +ALTER TABLE ONLY order_label_lang | |
| 3642 | + ADD CONSTRAINT orders_label_fk FOREIGN KEY (order_label_id) REFERENCES order_label(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3584 | 3643 | |
| 3585 | 3644 | |
| 3586 | 3645 | -- |
| 3587 | --- TOC entry 3370 (class 2606 OID 27251) | |
| 3646 | +-- TOC entry 2522 (class 2606 OID 20521) | |
| 3588 | 3647 | -- Name: orders_orders_delivery_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3589 | 3648 | -- |
| 3590 | 3649 | |
| 3591 | -ALTER TABLE ONLY orders | |
| 3592 | - ADD CONSTRAINT orders_orders_delivery_id_fk FOREIGN KEY (delivery) REFERENCES orders_delivery(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3650 | +ALTER TABLE ONLY "order" | |
| 3651 | + ADD CONSTRAINT orders_orders_delivery_id_fk FOREIGN KEY (delivery) REFERENCES order_delivery(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3593 | 3652 | |
| 3594 | 3653 | |
| 3595 | 3654 | -- |
| 3596 | --- TOC entry 3369 (class 2606 OID 27239) | |
| 3655 | +-- TOC entry 2523 (class 2606 OID 20526) | |
| 3597 | 3656 | -- Name: orders_orders_label_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3598 | 3657 | -- |
| 3599 | 3658 | |
| 3600 | -ALTER TABLE ONLY orders | |
| 3601 | - ADD CONSTRAINT orders_orders_label_id_fk FOREIGN KEY (label) REFERENCES orders_label(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3659 | +ALTER TABLE ONLY "order" | |
| 3660 | + ADD CONSTRAINT orders_orders_label_id_fk FOREIGN KEY (label) REFERENCES order_label(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3602 | 3661 | |
| 3603 | 3662 | |
| 3604 | 3663 | -- |
| 3605 | --- TOC entry 3371 (class 2606 OID 27267) | |
| 3664 | +-- TOC entry 2528 (class 2606 OID 20531) | |
| 3606 | 3665 | -- Name: orders_products_orders_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3607 | 3666 | -- |
| 3608 | 3667 | |
| 3609 | -ALTER TABLE ONLY orders_products | |
| 3610 | - ADD CONSTRAINT orders_products_orders_id_fk FOREIGN KEY (order_id) REFERENCES orders(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3668 | +ALTER TABLE ONLY order_product | |
| 3669 | + ADD CONSTRAINT orders_products_orders_id_fk FOREIGN KEY (order_id) REFERENCES "order"(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3611 | 3670 | |
| 3612 | 3671 | |
| 3613 | 3672 | -- |
| 3614 | --- TOC entry 3372 (class 2606 OID 29220) | |
| 3673 | +-- TOC entry 2529 (class 2606 OID 20536) | |
| 3615 | 3674 | -- Name: orders_products_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3616 | 3675 | -- |
| 3617 | 3676 | |
| 3618 | -ALTER TABLE ONLY orders_products | |
| 3619 | - 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; | |
| 3677 | +ALTER TABLE ONLY order_product | |
| 3678 | + ADD CONSTRAINT orders_products_product_variant_product_variant_id_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3620 | 3679 | |
| 3621 | 3680 | |
| 3622 | 3681 | -- |
| 3623 | --- TOC entry 3402 (class 2606 OID 28463) | |
| 3682 | +-- TOC entry 2531 (class 2606 OID 20541) | |
| 3624 | 3683 | -- Name: page_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3625 | 3684 | -- |
| 3626 | 3685 | |
| ... | ... | @@ -3629,366 +3688,231 @@ ALTER TABLE ONLY page_lang |
| 3629 | 3688 | |
| 3630 | 3689 | |
| 3631 | 3690 | -- |
| 3632 | --- TOC entry 3373 (class 2606 OID 27277) | |
| 3691 | +-- TOC entry 2532 (class 2606 OID 20546) | |
| 3633 | 3692 | -- Name: product_brand_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3634 | 3693 | -- |
| 3635 | 3694 | |
| 3636 | 3695 | ALTER TABLE ONLY product |
| 3637 | - ADD CONSTRAINT product_brand_fk FOREIGN KEY (brand_id) REFERENCES brand(brand_id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3638 | - | |
| 3639 | - | |
| 3640 | --- | |
| 3641 | --- TOC entry 3399 (class 2606 OID 28332) | |
| 3642 | --- Name: product_certificate_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3643 | --- | |
| 3644 | - | |
| 3645 | -ALTER TABLE ONLY product_certificate | |
| 3646 | - ADD CONSTRAINT product_certificate_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3696 | + ADD CONSTRAINT product_brand_fk FOREIGN KEY (brand_id) REFERENCES brand(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3647 | 3697 | |
| 3648 | 3698 | |
| 3649 | 3699 | -- |
| 3650 | --- TOC entry 3418 (class 2606 OID 28690) | |
| 3700 | +-- TOC entry 2538 (class 2606 OID 20551) | |
| 3651 | 3701 | -- Name: product_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3652 | 3702 | -- |
| 3653 | 3703 | |
| 3654 | 3704 | ALTER TABLE ONLY product_lang |
| 3655 | - ADD CONSTRAINT product_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3705 | + ADD CONSTRAINT product_fk FOREIGN KEY (product_id) REFERENCES product(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3656 | 3706 | |
| 3657 | 3707 | |
| 3658 | 3708 | -- |
| 3659 | --- TOC entry 3377 (class 2606 OID 27297) | |
| 3709 | +-- TOC entry 2535 (class 2606 OID 20556) | |
| 3660 | 3710 | -- Name: product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3661 | 3711 | -- |
| 3662 | 3712 | |
| 3663 | 3713 | ALTER TABLE ONLY product_image |
| 3664 | - ADD CONSTRAINT product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3714 | + ADD CONSTRAINT product_id_fk FOREIGN KEY (product_id) REFERENCES product(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3665 | 3715 | |
| 3666 | 3716 | |
| 3667 | 3717 | -- |
| 3668 | --- TOC entry 3378 (class 2606 OID 27302) | |
| 3718 | +-- TOC entry 2539 (class 2606 OID 20561) | |
| 3669 | 3719 | -- Name: product_option_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3670 | 3720 | -- |
| 3671 | 3721 | |
| 3672 | 3722 | ALTER TABLE ONLY product_option |
| 3673 | - ADD CONSTRAINT product_option_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3723 | + ADD CONSTRAINT product_option_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3674 | 3724 | |
| 3675 | 3725 | |
| 3676 | 3726 | -- |
| 3677 | --- TOC entry 3379 (class 2606 OID 27307) | |
| 3727 | +-- TOC entry 2540 (class 2606 OID 20566) | |
| 3678 | 3728 | -- Name: product_option_tax_option_tax_option_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3679 | 3729 | -- |
| 3680 | 3730 | |
| 3681 | 3731 | ALTER TABLE ONLY product_option |
| 3682 | - 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; | |
| 3683 | - | |
| 3684 | - | |
| 3685 | --- | |
| 3686 | --- TOC entry 3420 (class 2606 OID 28707) | |
| 3687 | --- Name: product_spec_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3688 | --- | |
| 3689 | - | |
| 3690 | -ALTER TABLE ONLY product_spec_lang | |
| 3691 | - ADD CONSTRAINT product_spec_fk FOREIGN KEY (product_spec_id) REFERENCES product_spec(product_spec_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3692 | - | |
| 3693 | - | |
| 3694 | --- | |
| 3695 | --- TOC entry 3398 (class 2606 OID 28318) | |
| 3696 | --- Name: product_spec_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3697 | --- | |
| 3698 | - | |
| 3699 | -ALTER TABLE ONLY product_spec | |
| 3700 | - ADD CONSTRAINT product_spec_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3701 | - | |
| 3702 | - | |
| 3703 | --- | |
| 3704 | --- TOC entry 3382 (class 2606 OID 27317) | |
| 3705 | --- Name: product_stock_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3706 | --- | |
| 3707 | - | |
| 3708 | -ALTER TABLE ONLY product_stock | |
| 3709 | - ADD CONSTRAINT product_stock_product_id_fkey FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3732 | + ADD CONSTRAINT product_option_tax_option_tax_option_id_fk FOREIGN KEY (option_id) REFERENCES tax_option(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3710 | 3733 | |
| 3711 | 3734 | |
| 3712 | 3735 | -- |
| 3713 | --- TOC entry 3381 (class 2606 OID 27312) | |
| 3736 | +-- TOC entry 2541 (class 2606 OID 20576) | |
| 3714 | 3737 | -- Name: product_stock_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3715 | 3738 | -- |
| 3716 | 3739 | |
| 3717 | 3740 | ALTER TABLE ONLY product_stock |
| 3718 | - 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; | |
| 3741 | + ADD CONSTRAINT product_stock_product_variant_product_variant_id_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3719 | 3742 | |
| 3720 | 3743 | |
| 3721 | 3744 | -- |
| 3722 | --- TOC entry 3380 (class 2606 OID 27194) | |
| 3745 | +-- TOC entry 2542 (class 2606 OID 20581) | |
| 3723 | 3746 | -- Name: product_stock_stock_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3724 | 3747 | -- |
| 3725 | 3748 | |
| 3726 | 3749 | ALTER TABLE ONLY product_stock |
| 3727 | - ADD CONSTRAINT product_stock_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES stock(stock_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3728 | - | |
| 3729 | - | |
| 3730 | --- | |
| 3731 | --- TOC entry 3396 (class 2606 OID 28282) | |
| 3732 | --- Name: product_to_project_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3733 | --- | |
| 3734 | - | |
| 3735 | -ALTER TABLE ONLY product_to_project | |
| 3736 | - 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; | |
| 3737 | - | |
| 3738 | - | |
| 3739 | --- | |
| 3740 | --- TOC entry 3397 (class 2606 OID 28287) | |
| 3741 | --- Name: product_to_project_project_project_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3742 | --- | |
| 3743 | - | |
| 3744 | -ALTER TABLE ONLY product_to_project | |
| 3745 | - ADD CONSTRAINT product_to_project_project_project_id_fk FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3746 | - | |
| 3747 | - | |
| 3748 | --- | |
| 3749 | --- TOC entry 3383 (class 2606 OID 26247) | |
| 3750 | --- Name: product_to_rating_product; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3751 | --- | |
| 3752 | - | |
| 3753 | -ALTER TABLE ONLY product_to_rating | |
| 3754 | - ADD CONSTRAINT product_to_rating_product FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3750 | + ADD CONSTRAINT product_stock_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES stock(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3755 | 3751 | |
| 3756 | 3752 | |
| 3757 | 3753 | -- |
| 3758 | --- TOC entry 3422 (class 2606 OID 28730) | |
| 3754 | +-- TOC entry 2544 (class 2606 OID 20586) | |
| 3759 | 3755 | -- Name: product_unit_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3760 | 3756 | -- |
| 3761 | 3757 | |
| 3762 | 3758 | ALTER TABLE ONLY product_unit_lang |
| 3763 | - ADD CONSTRAINT product_unit_fk FOREIGN KEY (product_unit_id) REFERENCES product_unit(product_unit_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3759 | + ADD CONSTRAINT product_unit_fk FOREIGN KEY (product_unit_id) REFERENCES product_unit(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3764 | 3760 | |
| 3765 | 3761 | |
| 3766 | 3762 | -- |
| 3767 | --- TOC entry 3424 (class 2606 OID 28745) | |
| 3763 | +-- TOC entry 2548 (class 2606 OID 20591) | |
| 3768 | 3764 | -- Name: product_variant_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3769 | 3765 | -- |
| 3770 | 3766 | |
| 3771 | 3767 | ALTER TABLE ONLY product_variant_lang |
| 3772 | - ADD CONSTRAINT product_variant_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3768 | + ADD CONSTRAINT product_variant_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3773 | 3769 | |
| 3774 | 3770 | |
| 3775 | 3771 | -- |
| 3776 | --- TOC entry 3376 (class 2606 OID 27292) | |
| 3772 | +-- TOC entry 2536 (class 2606 OID 20596) | |
| 3777 | 3773 | -- Name: product_variant_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3778 | 3774 | -- |
| 3779 | 3775 | |
| 3780 | 3776 | ALTER TABLE ONLY product_image |
| 3781 | - ADD CONSTRAINT product_variant_id_fkey FOREIGN KEY (product_variant_id) REFERENCES product_variant(product_variant_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3777 | + ADD CONSTRAINT product_variant_id_fkey FOREIGN KEY (product_variant_id) REFERENCES product_variant(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3782 | 3778 | |
| 3783 | 3779 | |
| 3784 | 3780 | -- |
| 3785 | --- TOC entry 3386 (class 2606 OID 27352) | |
| 3781 | +-- TOC entry 2549 (class 2606 OID 20601) | |
| 3786 | 3782 | -- Name: product_variant_option_product_variant_product_variant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3787 | 3783 | -- |
| 3788 | 3784 | |
| 3789 | 3785 | ALTER TABLE ONLY product_variant_option |
| 3790 | - 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; | |
| 3786 | + ADD CONSTRAINT product_variant_option_product_variant_product_variant_id_fk FOREIGN KEY (product_variant_id) REFERENCES product_variant(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3791 | 3787 | |
| 3792 | 3788 | |
| 3793 | 3789 | -- |
| 3794 | --- TOC entry 3387 (class 2606 OID 27357) | |
| 3790 | +-- TOC entry 2550 (class 2606 OID 20606) | |
| 3795 | 3791 | -- Name: product_variant_option_tax_option_tax_option_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3796 | 3792 | -- |
| 3797 | 3793 | |
| 3798 | 3794 | ALTER TABLE ONLY product_variant_option |
| 3799 | - 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; | |
| 3795 | + ADD CONSTRAINT product_variant_option_tax_option_tax_option_id_fk FOREIGN KEY (option_id) REFERENCES tax_option(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3800 | 3796 | |
| 3801 | 3797 | |
| 3802 | 3798 | -- |
| 3803 | --- TOC entry 3384 (class 2606 OID 27342) | |
| 3799 | +-- TOC entry 2545 (class 2606 OID 20611) | |
| 3804 | 3800 | -- Name: product_variant_product_product_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3805 | 3801 | -- |
| 3806 | 3802 | |
| 3807 | 3803 | ALTER TABLE ONLY product_variant |
| 3808 | - ADD CONSTRAINT product_variant_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(product_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3804 | + ADD CONSTRAINT product_variant_product_product_id_fk FOREIGN KEY (product_id) REFERENCES product(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3809 | 3805 | |
| 3810 | 3806 | |
| 3811 | 3807 | -- |
| 3812 | --- TOC entry 3385 (class 2606 OID 27347) | |
| 3808 | +-- TOC entry 2546 (class 2606 OID 20616) | |
| 3813 | 3809 | -- Name: product_variant_product_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3814 | 3810 | -- |
| 3815 | 3811 | |
| 3816 | 3812 | ALTER TABLE ONLY product_variant |
| 3817 | - 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; | |
| 3818 | - | |
| 3819 | - | |
| 3820 | --- | |
| 3821 | --- TOC entry 3426 (class 2606 OID 28764) | |
| 3822 | --- Name: project_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3823 | --- | |
| 3824 | - | |
| 3825 | -ALTER TABLE ONLY project_lang | |
| 3826 | - ADD CONSTRAINT project_fk FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3827 | - | |
| 3828 | - | |
| 3829 | --- | |
| 3830 | --- TOC entry 3395 (class 2606 OID 27441) | |
| 3831 | --- Name: project_image_project_project_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3832 | --- | |
| 3833 | - | |
| 3834 | -ALTER TABLE ONLY project_image | |
| 3835 | - ADD CONSTRAINT project_image_project_project_id_fk FOREIGN KEY (project_id) REFERENCES project(project_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3836 | - | |
| 3837 | - | |
| 3838 | --- | |
| 3839 | --- TOC entry 3362 (class 2606 OID 26272) | |
| 3840 | --- Name: related_id_artbox_comment; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3841 | --- | |
| 3842 | - | |
| 3843 | -ALTER TABLE ONLY artbox_comment | |
| 3844 | - ADD CONSTRAINT related_id_artbox_comment FOREIGN KEY (related_id) REFERENCES artbox_comment(artbox_comment_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3813 | + ADD CONSTRAINT product_variant_product_unit_fkey FOREIGN KEY (product_unit_id) REFERENCES product_unit(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3845 | 3814 | |
| 3846 | 3815 | |
| 3847 | 3816 | -- |
| 3848 | --- TOC entry 3430 (class 2606 OID 28817) | |
| 3817 | +-- TOC entry 2552 (class 2606 OID 20621) | |
| 3849 | 3818 | -- Name: seo_category_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3850 | 3819 | -- |
| 3851 | 3820 | |
| 3852 | 3821 | ALTER TABLE ONLY seo_category_lang |
| 3853 | - ADD CONSTRAINT seo_category_fk FOREIGN KEY (seo_category_id) REFERENCES seo_category(seo_category_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3822 | + ADD CONSTRAINT seo_category_fk FOREIGN KEY (seo_category_id) REFERENCES seo_category(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3854 | 3823 | |
| 3855 | 3824 | |
| 3856 | 3825 | -- |
| 3857 | --- TOC entry 3388 (class 2606 OID 27362) | |
| 3826 | +-- TOC entry 2553 (class 2606 OID 20626) | |
| 3858 | 3827 | -- Name: seo_category_seo_dynamic_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3859 | 3828 | -- |
| 3860 | 3829 | |
| 3861 | 3830 | ALTER TABLE ONLY seo_dynamic |
| 3862 | - 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; | |
| 3831 | + ADD CONSTRAINT seo_category_seo_dynamic_fk FOREIGN KEY (seo_category_id) REFERENCES seo_category(id) ON UPDATE CASCADE ON DELETE SET NULL; | |
| 3863 | 3832 | |
| 3864 | 3833 | |
| 3865 | 3834 | -- |
| 3866 | --- TOC entry 3432 (class 2606 OID 28834) | |
| 3835 | +-- TOC entry 2555 (class 2606 OID 20631) | |
| 3867 | 3836 | -- Name: seo_dynamic_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3868 | 3837 | -- |
| 3869 | 3838 | |
| 3870 | 3839 | ALTER TABLE ONLY seo_dynamic_lang |
| 3871 | - ADD CONSTRAINT seo_dynamic_fk FOREIGN KEY (seo_dynamic_id) REFERENCES seo_dynamic(seo_dynamic_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3840 | + ADD CONSTRAINT seo_dynamic_fk FOREIGN KEY (seo_dynamic_id) REFERENCES seo_dynamic(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3872 | 3841 | |
| 3873 | 3842 | |
| 3874 | 3843 | -- |
| 3875 | --- TOC entry 3428 (class 2606 OID 28803) | |
| 3844 | +-- TOC entry 2557 (class 2606 OID 20636) | |
| 3876 | 3845 | -- Name: seo_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3877 | 3846 | -- |
| 3878 | 3847 | |
| 3879 | 3848 | ALTER TABLE ONLY seo_lang |
| 3880 | - ADD CONSTRAINT seo_fk FOREIGN KEY (seo_id) REFERENCES seo(seo_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3849 | + ADD CONSTRAINT seo_fk FOREIGN KEY (seo_id) REFERENCES seo(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3881 | 3850 | |
| 3882 | 3851 | |
| 3883 | 3852 | -- |
| 3884 | --- TOC entry 3434 (class 2606 OID 28902) | |
| 3853 | +-- TOC entry 2559 (class 2606 OID 20641) | |
| 3885 | 3854 | -- Name: service_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3886 | 3855 | -- |
| 3887 | 3856 | |
| 3888 | 3857 | ALTER TABLE ONLY service_lang |
| 3889 | - ADD CONSTRAINT service_fk FOREIGN KEY (service_id) REFERENCES service(service_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3890 | - | |
| 3891 | - | |
| 3892 | --- | |
| 3893 | --- TOC entry 3389 (class 2606 OID 26282) | |
| 3894 | --- Name: share_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3895 | --- | |
| 3896 | - | |
| 3897 | -ALTER TABLE ONLY share | |
| 3898 | - ADD CONSTRAINT share_product_id_fkey FOREIGN KEY (product_id) REFERENCES product(product_id); | |
| 3899 | - | |
| 3900 | - | |
| 3901 | --- | |
| 3902 | --- TOC entry 3390 (class 2606 OID 26287) | |
| 3903 | --- Name: share_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3904 | --- | |
| 3905 | - | |
| 3906 | -ALTER TABLE ONLY share | |
| 3907 | - ADD CONSTRAINT share_user_id_fkey FOREIGN KEY (user_id) REFERENCES customer(id); | |
| 3858 | + ADD CONSTRAINT service_fk FOREIGN KEY (service_id) REFERENCES service(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3908 | 3859 | |
| 3909 | 3860 | |
| 3910 | 3861 | -- |
| 3911 | --- TOC entry 3436 (class 2606 OID 28936) | |
| 3862 | +-- TOC entry 2562 (class 2606 OID 20646) | |
| 3912 | 3863 | -- Name: slider_image_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3913 | 3864 | -- |
| 3914 | 3865 | |
| 3915 | 3866 | ALTER TABLE ONLY slider_image_lang |
| 3916 | - ADD CONSTRAINT slider_image_fk FOREIGN KEY (slider_image_id) REFERENCES slider_image(slider_image_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3867 | + ADD CONSTRAINT slider_image_fk FOREIGN KEY (slider_image_id) REFERENCES slider_image(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3917 | 3868 | |
| 3918 | 3869 | |
| 3919 | 3870 | -- |
| 3920 | --- TOC entry 3391 (class 2606 OID 27367) | |
| 3871 | +-- TOC entry 2560 (class 2606 OID 20651) | |
| 3921 | 3872 | -- Name: slider_slider_image_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3922 | 3873 | -- |
| 3923 | 3874 | |
| 3924 | 3875 | ALTER TABLE ONLY slider_image |
| 3925 | - ADD CONSTRAINT slider_slider_image_fk FOREIGN KEY (slider_id) REFERENCES slider(slider_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3876 | + ADD CONSTRAINT slider_slider_image_fk FOREIGN KEY (slider_id) REFERENCES slider(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3926 | 3877 | |
| 3927 | 3878 | |
| 3928 | 3879 | -- |
| 3929 | --- TOC entry 3442 (class 2606 OID 29094) | |
| 3880 | +-- TOC entry 2564 (class 2606 OID 20656) | |
| 3930 | 3881 | -- Name: stock_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3931 | 3882 | -- |
| 3932 | 3883 | |
| 3933 | 3884 | ALTER TABLE ONLY stock_lang |
| 3934 | - ADD CONSTRAINT stock_fk FOREIGN KEY (stock_id) REFERENCES stock(stock_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3885 | + ADD CONSTRAINT stock_fk FOREIGN KEY (stock_id) REFERENCES stock(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3935 | 3886 | |
| 3936 | 3887 | |
| 3937 | 3888 | -- |
| 3938 | --- TOC entry 3392 (class 2606 OID 27372) | |
| 3889 | +-- TOC entry 2568 (class 2606 OID 20661) | |
| 3939 | 3890 | -- Name: tax_group_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3940 | 3891 | -- |
| 3941 | 3892 | |
| 3942 | 3893 | ALTER TABLE ONLY tax_group_to_category |
| 3943 | - ADD CONSTRAINT tax_group_fk FOREIGN KEY (tax_group_id) REFERENCES tax_group(tax_group_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3894 | + ADD CONSTRAINT tax_group_fk FOREIGN KEY (tax_group_id) REFERENCES tax_group(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3944 | 3895 | |
| 3945 | 3896 | |
| 3946 | 3897 | -- |
| 3947 | --- TOC entry 3438 (class 2606 OID 28970) | |
| 3898 | +-- TOC entry 2566 (class 2606 OID 20666) | |
| 3948 | 3899 | -- Name: tax_group_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3949 | 3900 | -- |
| 3950 | 3901 | |
| 3951 | 3902 | ALTER TABLE ONLY tax_group_lang |
| 3952 | - ADD CONSTRAINT tax_group_fk FOREIGN KEY (tax_group_id) REFERENCES tax_group(tax_group_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3903 | + ADD CONSTRAINT tax_group_fk FOREIGN KEY (tax_group_id) REFERENCES tax_group(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3953 | 3904 | |
| 3954 | 3905 | |
| 3955 | 3906 | -- |
| 3956 | --- TOC entry 3440 (class 2606 OID 29001) | |
| 3907 | +-- TOC entry 2571 (class 2606 OID 20671) | |
| 3957 | 3908 | -- Name: tax_option_fk; Type: FK CONSTRAINT; Schema: public; Owner: - |
| 3958 | 3909 | -- |
| 3959 | 3910 | |
| 3960 | 3911 | ALTER TABLE ONLY tax_option_lang |
| 3961 | - ADD CONSTRAINT tax_option_fk FOREIGN KEY (tax_option_id) REFERENCES tax_option(tax_option_id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3962 | - | |
| 3963 | - | |
| 3964 | --- | |
| 3965 | --- TOC entry 3363 (class 2606 OID 26312) | |
| 3966 | --- Name: user_id_user; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3967 | --- | |
| 3968 | - | |
| 3969 | -ALTER TABLE ONLY artbox_comment | |
| 3970 | - ADD CONSTRAINT user_id_user FOREIGN KEY (user_id) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3971 | - | |
| 3972 | - | |
| 3973 | --- | |
| 3974 | --- TOC entry 3366 (class 2606 OID 26317) | |
| 3975 | --- Name: user_id_user; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3976 | --- | |
| 3977 | - | |
| 3978 | -ALTER TABLE ONLY artbox_like | |
| 3979 | - ADD CONSTRAINT user_id_user FOREIGN KEY (user_id) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3980 | - | |
| 3981 | - | |
| 3982 | --- | |
| 3983 | --- TOC entry 3364 (class 2606 OID 26322) | |
| 3984 | --- Name: user_id_user; Type: FK CONSTRAINT; Schema: public; Owner: - | |
| 3985 | --- | |
| 3986 | - | |
| 3987 | -ALTER TABLE ONLY artbox_comment_rating | |
| 3988 | - ADD CONSTRAINT user_id_user FOREIGN KEY (user_id) REFERENCES customer(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3912 | + ADD CONSTRAINT tax_option_fk FOREIGN KEY (tax_option_id) REFERENCES tax_option(id) ON UPDATE CASCADE ON DELETE CASCADE; | |
| 3989 | 3913 | |
| 3990 | 3914 | |
| 3991 | --- Completed on 2016-10-28 16:08:21 EEST | |
| 3915 | +-- Completed on 2016-10-31 16:40:16 EET | |
| 3992 | 3916 | |
| 3993 | 3917 | -- |
| 3994 | 3918 | -- PostgreSQL database dump complete | ... | ... |
common/config/main.php
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | return [ |
| 3 | 4 | 'language' => 'ru', |
| 4 | 5 | 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', |
| ... | ... | @@ -40,13 +41,7 @@ |
| 40 | 41 | 'resize' => [ |
| 41 | 42 | 'width' => 360, |
| 42 | 43 | 'height' => 360, |
| 43 | - 'master' => NULL, | |
| 44 | - ], | |
| 45 | - ], | |
| 46 | - 'list' => [ | |
| 47 | - 'resize' => [ | |
| 48 | - 'width' => 360, | |
| 49 | - 'height' => 360, | |
| 44 | + 'master' => null, | |
| 50 | 45 | ], |
| 51 | 46 | ], |
| 52 | 47 | ], |
| ... | ... | @@ -59,8 +54,5 @@ |
| 59 | 54 | 'artbox-comment' => [ |
| 60 | 55 | 'class' => 'common\modules\comment\Module', |
| 61 | 56 | ], |
| 62 | - 'blog' => [ | |
| 63 | - 'class' => 'common\modules\blog\Module', | |
| 64 | - ], | |
| 65 | 57 | ], |
| 66 | 58 | ]; | ... | ... |
common/modules/blog/Module.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog; | |
| 4 | - | |
| 5 | - /** | |
| 6 | - * blog module definition class | |
| 7 | - */ | |
| 8 | - class Module extends \yii\base\Module | |
| 9 | - { | |
| 10 | - /** | |
| 11 | - * @inheritdoc | |
| 12 | - */ | |
| 13 | - public $controllerNamespace = 'common\modules\blog\controllers'; | |
| 14 | - | |
| 15 | - /** | |
| 16 | - * @inheritdoc | |
| 17 | - */ | |
| 18 | - public function init() | |
| 19 | - { | |
| 20 | - parent::init(); | |
| 21 | - | |
| 22 | - // custom initialization code goes here | |
| 23 | - } | |
| 24 | - } |
common/modules/blog/controllers/BlogArticleController.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\controllers; | |
| 4 | - | |
| 5 | - use common\modules\blog\models\BlogCategory; | |
| 6 | - use common\modules\blog\models\BlogTag; | |
| 7 | - use common\modules\product\models\Product; | |
| 8 | - use Yii; | |
| 9 | - use common\modules\blog\models\BlogArticle; | |
| 10 | - use common\modules\blog\models\BlogArticleSearch; | |
| 11 | - use yii\helpers\ArrayHelper; | |
| 12 | - use yii\web\Controller; | |
| 13 | - use yii\web\NotFoundHttpException; | |
| 14 | - use yii\filters\VerbFilter; | |
| 15 | - use yii\web\Response; | |
| 16 | - | |
| 17 | - /** | |
| 18 | - * BlogArticleController implements the CRUD actions for BlogArticle model. | |
| 19 | - */ | |
| 20 | - class BlogArticleController extends Controller | |
| 21 | - { | |
| 22 | - /** | |
| 23 | - * @inheritdoc | |
| 24 | - */ | |
| 25 | - public function behaviors() | |
| 26 | - { | |
| 27 | - return [ | |
| 28 | - 'verbs' => [ | |
| 29 | - 'class' => VerbFilter::className(), | |
| 30 | - 'actions' => [ | |
| 31 | - 'delete' => [ 'POST' ], | |
| 32 | - ], | |
| 33 | - ], | |
| 34 | - ]; | |
| 35 | - } | |
| 36 | - | |
| 37 | - /** | |
| 38 | - * Lists all BlogArticle models. | |
| 39 | - * | |
| 40 | - * @return mixed | |
| 41 | - */ | |
| 42 | - public function actionIndex() | |
| 43 | - { | |
| 44 | - $searchModel = new BlogArticleSearch(); | |
| 45 | - $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | |
| 46 | - | |
| 47 | - return $this->render( | |
| 48 | - 'index', | |
| 49 | - [ | |
| 50 | - 'searchModel' => $searchModel, | |
| 51 | - 'dataProvider' => $dataProvider, | |
| 52 | - ] | |
| 53 | - ); | |
| 54 | - } | |
| 55 | - | |
| 56 | - /** | |
| 57 | - * Displays a single BlogArticle model. | |
| 58 | - * | |
| 59 | - * @param integer $id | |
| 60 | - * | |
| 61 | - * @return mixed | |
| 62 | - */ | |
| 63 | - public function actionView($id) | |
| 64 | - { | |
| 65 | - return $this->render( | |
| 66 | - 'view', | |
| 67 | - [ | |
| 68 | - 'model' => $this->findModel($id), | |
| 69 | - ] | |
| 70 | - ); | |
| 71 | - } | |
| 72 | - | |
| 73 | - /** | |
| 74 | - * Creates a new BlogArticle model. | |
| 75 | - * If creation is successful, the browser will be redirected to the 'view' page. | |
| 76 | - * | |
| 77 | - * @return mixed | |
| 78 | - */ | |
| 79 | - public function actionCreate() | |
| 80 | - { | |
| 81 | - $model = new BlogArticle(); | |
| 82 | - $model->generateLangs(); | |
| 83 | - | |
| 84 | - $categories = ArrayHelper::map( | |
| 85 | - BlogCategory::find() | |
| 86 | - ->joinWith('lang') | |
| 87 | - ->all(), | |
| 88 | - 'id', | |
| 89 | - 'lang.title' | |
| 90 | - ); | |
| 91 | - | |
| 92 | - $tags = ArrayHelper::map( | |
| 93 | - BlogTag::find() | |
| 94 | - ->joinWith('lang') | |
| 95 | - ->all(), | |
| 96 | - 'id', | |
| 97 | - 'lang.label' | |
| 98 | - ); | |
| 99 | - | |
| 100 | - if ($model->load(Yii::$app->request->post())) { | |
| 101 | - $model->loadLangs(\Yii::$app->request); | |
| 102 | - if ($model->save() && $model->transactionStatus) { | |
| 103 | - | |
| 104 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'blogCategories' ] )) { | |
| 105 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'blogCategories' ] as $item) { | |
| 106 | - if ($category = BlogCategory::findOne($item)) { | |
| 107 | - $model->link('blogCategories', $category); | |
| 108 | - } | |
| 109 | - } | |
| 110 | - } | |
| 111 | - | |
| 112 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'blogTags' ] )) { | |
| 113 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'blogTags' ] as $item) { | |
| 114 | - if ($category = BlogTag::findOne($item)) { | |
| 115 | - $model->link('blogTags', $category); | |
| 116 | - } | |
| 117 | - } | |
| 118 | - } | |
| 119 | - | |
| 120 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'products' ] )) { | |
| 121 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'products' ] as $item) { | |
| 122 | - if ($product = Product::findOne($item)) { | |
| 123 | - $model->link('products', $product); | |
| 124 | - } | |
| 125 | - } | |
| 126 | - } | |
| 127 | - | |
| 128 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'blogArticles' ] )) { | |
| 129 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'blogArticles' ] as $item) { | |
| 130 | - if ($article = Product::findOne($item)) { | |
| 131 | - $model->link('blogArticles', $article); | |
| 132 | - } | |
| 133 | - } | |
| 134 | - } | |
| 135 | - | |
| 136 | - return $this->redirect( | |
| 137 | - [ | |
| 138 | - 'view', | |
| 139 | - 'id' => $model->id, | |
| 140 | - ] | |
| 141 | - ); | |
| 142 | - } | |
| 143 | - } | |
| 144 | - return $this->render( | |
| 145 | - 'create', | |
| 146 | - [ | |
| 147 | - 'model' => $model, | |
| 148 | - 'modelLangs' => $model->modelLangs, | |
| 149 | - 'categories' => $categories, | |
| 150 | - 'tags' => $tags, | |
| 151 | - 'products' => [], | |
| 152 | - 'articles' => [], | |
| 153 | - ] | |
| 154 | - ); | |
| 155 | - | |
| 156 | - } | |
| 157 | - | |
| 158 | - /** | |
| 159 | - * Updates an existing BlogArticle model. | |
| 160 | - * If update is successful, the browser will be redirected to the 'view' page. | |
| 161 | - * | |
| 162 | - * @param integer $id | |
| 163 | - * | |
| 164 | - * @return mixed | |
| 165 | - */ | |
| 166 | - public function actionUpdate($id) | |
| 167 | - { | |
| 168 | - $model = $this->findModel($id); | |
| 169 | - $model->generateLangs(); | |
| 170 | - | |
| 171 | - $categories = ArrayHelper::map( | |
| 172 | - BlogCategory::find() | |
| 173 | - ->joinWith('lang') | |
| 174 | - ->all(), | |
| 175 | - 'id', | |
| 176 | - 'lang.title' | |
| 177 | - ); | |
| 178 | - | |
| 179 | - $tags = ArrayHelper::map( | |
| 180 | - BlogTag::find() | |
| 181 | - ->joinWith('lang') | |
| 182 | - ->all(), | |
| 183 | - 'id', | |
| 184 | - 'lang.label' | |
| 185 | - ); | |
| 186 | - | |
| 187 | - $products = ArrayHelper::map( | |
| 188 | - $model->getProducts() | |
| 189 | - ->joinWith('lang') | |
| 190 | - ->asArray() | |
| 191 | - ->all(), | |
| 192 | - 'id', | |
| 193 | - 'lang.title' | |
| 194 | - ); | |
| 195 | - | |
| 196 | - $articles = ArrayHelper::map( | |
| 197 | - $model->getBlogArticles() | |
| 198 | - ->joinWith('lang') | |
| 199 | - ->asArray() | |
| 200 | - ->all(), | |
| 201 | - 'id', | |
| 202 | - 'lang.title' | |
| 203 | - ); | |
| 204 | - | |
| 205 | - if ($model->load(Yii::$app->request->post())) { | |
| 206 | - $model->loadLangs(\Yii::$app->request); | |
| 207 | - if ($model->save() && $model->transactionStatus) { | |
| 208 | - | |
| 209 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'blogCategories' ] )) { | |
| 210 | - $model->unlinkAll('blogCategories', true); | |
| 211 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'blogCategories' ] as $item) { | |
| 212 | - if ($category = BlogCategory::findOne($item)) { | |
| 213 | - $model->link('blogCategories', $category); | |
| 214 | - } | |
| 215 | - } | |
| 216 | - } | |
| 217 | - | |
| 218 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'blogTags' ] )) { | |
| 219 | - $model->unlinkAll('blogTags', true); | |
| 220 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'blogTags' ] as $item) { | |
| 221 | - if ($tag = BlogTag::findOne($item)) { | |
| 222 | - $model->link('blogTags', $tag); | |
| 223 | - } | |
| 224 | - } | |
| 225 | - } | |
| 226 | - | |
| 227 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'products' ] )) { | |
| 228 | - $model->unlinkAll('products', true); | |
| 229 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'products' ] as $item) { | |
| 230 | - if ($product = Product::findOne($item)) { | |
| 231 | - $model->link('products', $product); | |
| 232 | - } | |
| 233 | - } | |
| 234 | - } | |
| 235 | - | |
| 236 | - if (!empty( \Yii::$app->request->post('BlogArticle')[ 'blogArticles' ] )) { | |
| 237 | - $model->unlinkAll('blogArticles', true); | |
| 238 | - foreach (\Yii::$app->request->post('BlogArticle')[ 'blogArticles' ] as $item) { | |
| 239 | - if ($article = BlogArticle::findOne($item)) { | |
| 240 | - $model->link('blogArticles', $article); | |
| 241 | - } | |
| 242 | - } | |
| 243 | - } | |
| 244 | - | |
| 245 | - return $this->redirect( | |
| 246 | - [ | |
| 247 | - 'view', | |
| 248 | - 'id' => $model->id, | |
| 249 | - ] | |
| 250 | - ); | |
| 251 | - } | |
| 252 | - } | |
| 253 | - return $this->render( | |
| 254 | - 'update', | |
| 255 | - [ | |
| 256 | - 'model' => $model, | |
| 257 | - 'modelLangs' => $model->modelLangs, | |
| 258 | - 'categories' => $categories, | |
| 259 | - 'tags' => $tags, | |
| 260 | - 'products' => $products, | |
| 261 | - 'articles' => $articles, | |
| 262 | - ] | |
| 263 | - ); | |
| 264 | - | |
| 265 | - } | |
| 266 | - | |
| 267 | - /** | |
| 268 | - * Deletes an existing BlogArticle model. | |
| 269 | - * If deletion is successful, the browser will be redirected to the 'index' page. | |
| 270 | - * | |
| 271 | - * @param integer $id | |
| 272 | - * | |
| 273 | - * @return mixed | |
| 274 | - */ | |
| 275 | - public function actionDelete($id) | |
| 276 | - { | |
| 277 | - $this->findModel($id) | |
| 278 | - ->delete(); | |
| 279 | - | |
| 280 | - return $this->redirect([ 'index' ]); | |
| 281 | - } | |
| 282 | - | |
| 283 | - /** | |
| 284 | - * Finds the BlogArticle model based on its primary key value. | |
| 285 | - * If the model is not found, a 404 HTTP exception will be thrown. | |
| 286 | - * | |
| 287 | - * @param integer $id | |
| 288 | - * | |
| 289 | - * @return BlogArticle the loaded model | |
| 290 | - * @throws NotFoundHttpException if the model cannot be found | |
| 291 | - */ | |
| 292 | - protected function findModel($id) | |
| 293 | - { | |
| 294 | - if (( $model = BlogArticle::findOne($id) ) !== NULL) { | |
| 295 | - return $model; | |
| 296 | - } else { | |
| 297 | - throw new NotFoundHttpException('The requested page does not exist.'); | |
| 298 | - } | |
| 299 | - } | |
| 300 | - | |
| 301 | - /** | |
| 302 | - * @param string $q | |
| 303 | - * @param null $id | |
| 304 | - * | |
| 305 | - * @return array | |
| 306 | - */ | |
| 307 | - public function actionProductList($q = NULL, $id = NULL) | |
| 308 | - { | |
| 309 | - \Yii::$app->response->format = Response::FORMAT_JSON; | |
| 310 | - $out = [ | |
| 311 | - 'results' => [ | |
| 312 | - 'id' => '', | |
| 313 | - 'text' => '', | |
| 314 | - ], | |
| 315 | - ]; | |
| 316 | - if (!is_null($q)) { | |
| 317 | - $out[ 'results' ] = Product::find() | |
| 318 | - ->joinWith('lang') | |
| 319 | - ->select( | |
| 320 | - [ | |
| 321 | - 'id', | |
| 322 | - 'product_lang.title as text', | |
| 323 | - ] | |
| 324 | - ) | |
| 325 | - ->where( | |
| 326 | - [ | |
| 327 | - 'like', | |
| 328 | - 'product_lang.title', | |
| 329 | - $q, | |
| 330 | - ] | |
| 331 | - ) | |
| 332 | - ->limit(20) | |
| 333 | - ->asArray() | |
| 334 | - ->all(); | |
| 335 | - } elseif ($id > 0) { | |
| 336 | - $out[ 'results' ] = [ | |
| 337 | - 'id' => $id, | |
| 338 | - 'text' => Product::find() | |
| 339 | - ->joinWith('lang') | |
| 340 | - ->where([ 'id' => $id ]) | |
| 341 | - ->one()->title, | |
| 342 | - ]; | |
| 343 | - } | |
| 344 | - return $out; | |
| 345 | - } | |
| 346 | - | |
| 347 | - /** | |
| 348 | - * @param string $q | |
| 349 | - * @param integer $id | |
| 350 | - * | |
| 351 | - * @return array | |
| 352 | - */ | |
| 353 | - public function actionArticleList($q = NULL, $id = NULL) | |
| 354 | - { | |
| 355 | - \Yii::$app->response->format = Response::FORMAT_JSON; | |
| 356 | - $out = [ | |
| 357 | - 'results' => [ | |
| 358 | - 'id' => '', | |
| 359 | - 'text' => '', | |
| 360 | - ], | |
| 361 | - ]; | |
| 362 | - if (!is_null($q)) { | |
| 363 | - $out[ 'results' ] = BlogArticle::find() | |
| 364 | - ->joinWith('lang') | |
| 365 | - ->select( | |
| 366 | - [ | |
| 367 | - 'blog_article.id as id', | |
| 368 | - 'blog_article_lang.title as text', | |
| 369 | - ] | |
| 370 | - ) | |
| 371 | - ->where( | |
| 372 | - [ | |
| 373 | - 'like', | |
| 374 | - 'blog_article_lang.title', | |
| 375 | - $q, | |
| 376 | - ] | |
| 377 | - ) | |
| 378 | - ->andWhere( | |
| 379 | - [ | |
| 380 | - '!=', | |
| 381 | - 'blog_article.id', | |
| 382 | - $id, | |
| 383 | - ] | |
| 384 | - ) | |
| 385 | - ->limit(20) | |
| 386 | - ->asArray() | |
| 387 | - ->all(); | |
| 388 | - } | |
| 389 | - return $out; | |
| 390 | - } | |
| 391 | - } |
common/modules/blog/controllers/BlogCategoryController.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\controllers; | |
| 4 | - | |
| 5 | - use Yii; | |
| 6 | - use common\modules\blog\models\BlogCategory; | |
| 7 | - use common\modules\blog\models\BlogCategorySearch; | |
| 8 | - use yii\helpers\ArrayHelper; | |
| 9 | - use yii\web\Controller; | |
| 10 | - use yii\web\NotFoundHttpException; | |
| 11 | - use yii\filters\VerbFilter; | |
| 12 | - | |
| 13 | - /** | |
| 14 | - * BlogCategoryController implements the CRUD actions for BlogCategory model. | |
| 15 | - */ | |
| 16 | - class BlogCategoryController extends Controller | |
| 17 | - { | |
| 18 | - /** | |
| 19 | - * @inheritdoc | |
| 20 | - */ | |
| 21 | - public function behaviors() | |
| 22 | - { | |
| 23 | - return [ | |
| 24 | - 'verbs' => [ | |
| 25 | - 'class' => VerbFilter::className(), | |
| 26 | - 'actions' => [ | |
| 27 | - 'delete' => [ 'POST' ], | |
| 28 | - ], | |
| 29 | - ], | |
| 30 | - ]; | |
| 31 | - } | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * Lists all BlogCategory models. | |
| 35 | - * | |
| 36 | - * @return mixed | |
| 37 | - */ | |
| 38 | - public function actionIndex() | |
| 39 | - { | |
| 40 | - $searchModel = new BlogCategorySearch(); | |
| 41 | - $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | |
| 42 | - | |
| 43 | - return $this->render( | |
| 44 | - 'index', | |
| 45 | - [ | |
| 46 | - 'searchModel' => $searchModel, | |
| 47 | - 'dataProvider' => $dataProvider, | |
| 48 | - ] | |
| 49 | - ); | |
| 50 | - } | |
| 51 | - | |
| 52 | - /** | |
| 53 | - * Displays a single BlogCategory model. | |
| 54 | - * | |
| 55 | - * @param integer $id | |
| 56 | - * | |
| 57 | - * @return mixed | |
| 58 | - */ | |
| 59 | - public function actionView($id) | |
| 60 | - { | |
| 61 | - return $this->render( | |
| 62 | - 'view', | |
| 63 | - [ | |
| 64 | - 'model' => $this->findModel($id), | |
| 65 | - ] | |
| 66 | - ); | |
| 67 | - } | |
| 68 | - | |
| 69 | - /** | |
| 70 | - * Creates a new BlogCategory model. | |
| 71 | - * If creation is successful, the browser will be redirected to the 'view' page. | |
| 72 | - * | |
| 73 | - * @return mixed | |
| 74 | - */ | |
| 75 | - public function actionCreate() | |
| 76 | - { | |
| 77 | - $model = new BlogCategory(); | |
| 78 | - $model->generateLangs(); | |
| 79 | - $parentCategories = ArrayHelper::map( | |
| 80 | - BlogCategory::find() | |
| 81 | - ->joinWith('lang') | |
| 82 | - ->where( | |
| 83 | - [ | |
| 84 | - 'parent_id' => 0, | |
| 85 | - ] | |
| 86 | - ) | |
| 87 | - ->all(), | |
| 88 | - 'id', | |
| 89 | - 'lang.title' | |
| 90 | - ); | |
| 91 | - | |
| 92 | - if ($model->load(Yii::$app->request->post())) { | |
| 93 | - $model->loadLangs(\Yii::$app->request); | |
| 94 | - if ($model->save() && $model->transactionStatus) { | |
| 95 | - return $this->redirect( | |
| 96 | - [ | |
| 97 | - 'view', | |
| 98 | - 'id' => $model->id, | |
| 99 | - ] | |
| 100 | - ); | |
| 101 | - } | |
| 102 | - } | |
| 103 | - return $this->render( | |
| 104 | - 'create', | |
| 105 | - [ | |
| 106 | - 'model' => $model, | |
| 107 | - 'modelLangs' => $model->modelLangs, | |
| 108 | - 'parentCategories' => $parentCategories, | |
| 109 | - ] | |
| 110 | - ); | |
| 111 | - | |
| 112 | - } | |
| 113 | - | |
| 114 | - /** | |
| 115 | - * Updates an existing BlogCategory model. | |
| 116 | - * If update is successful, the browser will be redirected to the 'view' page. | |
| 117 | - * | |
| 118 | - * @param integer $id | |
| 119 | - * | |
| 120 | - * @return mixed | |
| 121 | - */ | |
| 122 | - public function actionUpdate($id) | |
| 123 | - { | |
| 124 | - $model = $this->findModel($id); | |
| 125 | - $model->generateLangs(); | |
| 126 | - $parentCategories = ArrayHelper::map( | |
| 127 | - BlogCategory::find() | |
| 128 | - ->joinWith('lang') | |
| 129 | - ->where( | |
| 130 | - [ | |
| 131 | - 'parent_id' => 0, | |
| 132 | - ] | |
| 133 | - ) | |
| 134 | - ->andWhere( | |
| 135 | - [ | |
| 136 | - '!=', | |
| 137 | - BlogCategory::tableName() . '_id', | |
| 138 | - $model->id, | |
| 139 | - ] | |
| 140 | - ) | |
| 141 | - ->all(), | |
| 142 | - 'id', | |
| 143 | - 'lang.title' | |
| 144 | - ); | |
| 145 | - | |
| 146 | - if ($model->load(Yii::$app->request->post())) { | |
| 147 | - $model->loadLangs(\Yii::$app->request); | |
| 148 | - if ($model->save() && $model->transactionStatus) { | |
| 149 | - return $this->redirect( | |
| 150 | - [ | |
| 151 | - 'view', | |
| 152 | - 'id' => $model->id, | |
| 153 | - ] | |
| 154 | - ); | |
| 155 | - } | |
| 156 | - } | |
| 157 | - return $this->render( | |
| 158 | - 'update', | |
| 159 | - [ | |
| 160 | - 'model' => $model, | |
| 161 | - 'modelLangs' => $model->modelLangs, | |
| 162 | - 'parentCategories' => $parentCategories, | |
| 163 | - ] | |
| 164 | - ); | |
| 165 | - | |
| 166 | - } | |
| 167 | - | |
| 168 | - /** | |
| 169 | - * Deletes an existing BlogCategory model. | |
| 170 | - * If deletion is successful, the browser will be redirected to the 'index' page. | |
| 171 | - * | |
| 172 | - * @param integer $id | |
| 173 | - * | |
| 174 | - * @return mixed | |
| 175 | - */ | |
| 176 | - public function actionDelete($id) | |
| 177 | - { | |
| 178 | - $this->findModel($id) | |
| 179 | - ->delete(); | |
| 180 | - | |
| 181 | - return $this->redirect([ 'index' ]); | |
| 182 | - } | |
| 183 | - | |
| 184 | - /** | |
| 185 | - * Finds the BlogCategory model based on its primary key value. | |
| 186 | - * If the model is not found, a 404 HTTP exception will be thrown. | |
| 187 | - * | |
| 188 | - * @param integer $id | |
| 189 | - * | |
| 190 | - * @return BlogCategory the loaded model | |
| 191 | - * @throws NotFoundHttpException if the model cannot be found | |
| 192 | - */ | |
| 193 | - protected function findModel($id) | |
| 194 | - { | |
| 195 | - if (( $model = BlogCategory::findOne($id) ) !== NULL) { | |
| 196 | - return $model; | |
| 197 | - } else { | |
| 198 | - throw new NotFoundHttpException('The requested page does not exist.'); | |
| 199 | - } | |
| 200 | - } | |
| 201 | - } |
common/modules/blog/controllers/BlogTagController.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\controllers; | |
| 4 | - | |
| 5 | - use Yii; | |
| 6 | - use common\modules\blog\models\BlogTag; | |
| 7 | - use common\modules\blog\models\BlogTagSearch; | |
| 8 | - use yii\web\Controller; | |
| 9 | - use yii\web\NotFoundHttpException; | |
| 10 | - use yii\filters\VerbFilter; | |
| 11 | - | |
| 12 | - /** | |
| 13 | - * BlogTagController implements the CRUD actions for BlogTag model. | |
| 14 | - */ | |
| 15 | - class BlogTagController extends Controller | |
| 16 | - { | |
| 17 | - /** | |
| 18 | - * @inheritdoc | |
| 19 | - */ | |
| 20 | - public function behaviors() | |
| 21 | - { | |
| 22 | - return [ | |
| 23 | - 'verbs' => [ | |
| 24 | - 'class' => VerbFilter::className(), | |
| 25 | - 'actions' => [ | |
| 26 | - 'delete' => [ 'POST' ], | |
| 27 | - ], | |
| 28 | - ], | |
| 29 | - ]; | |
| 30 | - } | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * Lists all BlogTag models. | |
| 34 | - * | |
| 35 | - * @return mixed | |
| 36 | - */ | |
| 37 | - public function actionIndex() | |
| 38 | - { | |
| 39 | - $searchModel = new BlogTagSearch(); | |
| 40 | - $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | |
| 41 | - | |
| 42 | - return $this->render( | |
| 43 | - 'index', | |
| 44 | - [ | |
| 45 | - 'searchModel' => $searchModel, | |
| 46 | - 'dataProvider' => $dataProvider, | |
| 47 | - ] | |
| 48 | - ); | |
| 49 | - } | |
| 50 | - | |
| 51 | - /** | |
| 52 | - * Displays a single BlogTag model. | |
| 53 | - * | |
| 54 | - * @param integer $id | |
| 55 | - * | |
| 56 | - * @return mixed | |
| 57 | - */ | |
| 58 | - public function actionView($id) | |
| 59 | - { | |
| 60 | - return $this->render( | |
| 61 | - 'view', | |
| 62 | - [ | |
| 63 | - 'model' => $this->findModel($id), | |
| 64 | - ] | |
| 65 | - ); | |
| 66 | - } | |
| 67 | - | |
| 68 | - /** | |
| 69 | - * Creates a new BlogTag model. | |
| 70 | - * If creation is successful, the browser will be redirected to the 'view' page. | |
| 71 | - * | |
| 72 | - * @return mixed | |
| 73 | - */ | |
| 74 | - public function actionCreate() | |
| 75 | - { | |
| 76 | - $model = new BlogTag(); | |
| 77 | - $model->generateLangs(); | |
| 78 | - | |
| 79 | - if (\Yii::$app->request->isPost) { | |
| 80 | - $model->loadLangs(\Yii::$app->request); | |
| 81 | - $model->markAttributeDirty('id'); | |
| 82 | - if ($model->save() && $model->transactionStatus) { | |
| 83 | - return $this->redirect( | |
| 84 | - [ | |
| 85 | - 'view', | |
| 86 | - 'id' => $model->id, | |
| 87 | - ] | |
| 88 | - ); | |
| 89 | - } | |
| 90 | - } | |
| 91 | - return $this->render( | |
| 92 | - 'create', | |
| 93 | - [ | |
| 94 | - 'model' => $model, | |
| 95 | - 'modelLangs' => $model->modelLangs, | |
| 96 | - ] | |
| 97 | - ); | |
| 98 | - | |
| 99 | - } | |
| 100 | - | |
| 101 | - /** | |
| 102 | - * Updates an existing BlogTag model. | |
| 103 | - * If update is successful, the browser will be redirected to the 'view' page. | |
| 104 | - * | |
| 105 | - * @param integer $id | |
| 106 | - * | |
| 107 | - * @return mixed | |
| 108 | - */ | |
| 109 | - public function actionUpdate($id) | |
| 110 | - { | |
| 111 | - $model = $this->findModel($id); | |
| 112 | - $model->generateLangs(); | |
| 113 | - | |
| 114 | - if (Yii::$app->request->isPost) { | |
| 115 | - $model->loadLangs(\Yii::$app->request); | |
| 116 | - $model->markAttributeDirty('id'); | |
| 117 | - if ($model->save() && $model->transactionStatus) { | |
| 118 | - return $this->redirect( | |
| 119 | - [ | |
| 120 | - 'view', | |
| 121 | - 'id' => $model->id, | |
| 122 | - ] | |
| 123 | - ); | |
| 124 | - } | |
| 125 | - } | |
| 126 | - return $this->render( | |
| 127 | - 'update', | |
| 128 | - [ | |
| 129 | - 'model' => $model, | |
| 130 | - 'modelLangs' => $model->modelLangs, | |
| 131 | - ] | |
| 132 | - ); | |
| 133 | - | |
| 134 | - } | |
| 135 | - | |
| 136 | - /** | |
| 137 | - * Deletes an existing BlogTag model. | |
| 138 | - * If deletion is successful, the browser will be redirected to the 'index' page. | |
| 139 | - * | |
| 140 | - * @param integer $id | |
| 141 | - * | |
| 142 | - * @return mixed | |
| 143 | - */ | |
| 144 | - public function actionDelete($id) | |
| 145 | - { | |
| 146 | - $this->findModel($id) | |
| 147 | - ->delete(); | |
| 148 | - | |
| 149 | - return $this->redirect([ 'index' ]); | |
| 150 | - } | |
| 151 | - | |
| 152 | - /** | |
| 153 | - * Finds the BlogTag model based on its primary key value. | |
| 154 | - * If the model is not found, a 404 HTTP exception will be thrown. | |
| 155 | - * | |
| 156 | - * @param integer $id | |
| 157 | - * | |
| 158 | - * @return BlogTag the loaded model | |
| 159 | - * @throws NotFoundHttpException if the model cannot be found | |
| 160 | - */ | |
| 161 | - protected function findModel($id) | |
| 162 | - { | |
| 163 | - if (( $model = BlogTag::findOne($id) ) !== NULL) { | |
| 164 | - return $model; | |
| 165 | - } else { | |
| 166 | - throw new NotFoundHttpException('The requested page does not exist.'); | |
| 167 | - } | |
| 168 | - } | |
| 169 | - } |
common/modules/blog/controllers/DefaultController.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -namespace common\modules\blog\controllers; | |
| 4 | - | |
| 5 | -use yii\web\Controller; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * Default controller for the `blog` module | |
| 9 | - */ | |
| 10 | -class DefaultController extends Controller | |
| 11 | -{ | |
| 12 | - /** | |
| 13 | - * Renders the index view for the module | |
| 14 | - * @return string | |
| 15 | - */ | |
| 16 | - public function actionIndex() | |
| 17 | - { | |
| 18 | - return $this->render('index'); | |
| 19 | - } | |
| 20 | -} |
common/modules/blog/models/BlogArticle.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use common\behaviors\SaveImgBehavior; | |
| 6 | - use yii\behaviors\TimestampBehavior; | |
| 7 | - use yii\db\ActiveRecord; | |
| 8 | - use common\modules\language\behaviors\LanguageBehavior; | |
| 9 | - use common\modules\language\models\Language; | |
| 10 | - use common\modules\product\models\Product; | |
| 11 | - use yii\db\ActiveQuery; | |
| 12 | - use yii\web\Request; | |
| 13 | - | |
| 14 | - /** | |
| 15 | - * This is the model class for table "blog_article". | |
| 16 | - * | |
| 17 | - * @property integer $id | |
| 18 | - * @property string $image | |
| 19 | - * @property integer $created_at | |
| 20 | - * @property integer $updated_at | |
| 21 | - * @property integer $deleted_at | |
| 22 | - * @property integer $sort | |
| 23 | - * @property boolean $status | |
| 24 | - * @property integer $author_id | |
| 25 | - * @property BlogArticleLang[] $blogArticleLangs | |
| 26 | - * @property Language[] $languages | |
| 27 | - * @property BlogArticle[] $relatedBlogArticles | |
| 28 | - * @property BlogArticle[] $blogArticles | |
| 29 | - * @property BlogCategory[] $blogCategories | |
| 30 | - * @property Product[] $products | |
| 31 | - * @property BlogTag[] $blogTags | |
| 32 | - * * * From language behavior * | |
| 33 | - * @property BlogArticleLang $lang | |
| 34 | - * @property BlogArticleLang[] $langs | |
| 35 | - * @property BlogArticleLang $objectLang | |
| 36 | - * @property string $ownerKey | |
| 37 | - * @property string $langKey | |
| 38 | - * @property BlogArticleLang[] $modelLangs | |
| 39 | - * @property bool $transactionStatus | |
| 40 | - * @method string getOwnerKey() | |
| 41 | - * @method void setOwnerKey( string $value ) | |
| 42 | - * @method string getLangKey() | |
| 43 | - * @method void setLangKey( string $value ) | |
| 44 | - * @method ActiveQuery getLangs() | |
| 45 | - * @method ActiveQuery getLang( integer $language_id ) | |
| 46 | - * @method BlogArticleLang[] generateLangs() | |
| 47 | - * @method void loadLangs( Request $request ) | |
| 48 | - * @method bool linkLangs() | |
| 49 | - * @method bool saveLangs() | |
| 50 | - * @method bool getTransactionStatus() | |
| 51 | - * * End language behavior * | |
| 52 | - * * From SaveImgBehavior | |
| 53 | - * @property string|null $imageFile | |
| 54 | - * @property string|null $imageUrl | |
| 55 | - * @method string|null getImageFile( int $field ) | |
| 56 | - * @method string|null getImageUrl( int $field ) | |
| 57 | - * * End SaveImgBehavior | |
| 58 | - */ | |
| 59 | - class BlogArticle extends ActiveRecord | |
| 60 | - { | |
| 61 | - /** | |
| 62 | - * @inheritdoc | |
| 63 | - */ | |
| 64 | - public static function tableName() | |
| 65 | - { | |
| 66 | - return 'blog_article'; | |
| 67 | - } | |
| 68 | - | |
| 69 | - public function behaviors() | |
| 70 | - { | |
| 71 | - return [ | |
| 72 | - [ | |
| 73 | - 'class' => TimestampBehavior::className(), | |
| 74 | - ], | |
| 75 | - [ | |
| 76 | - 'class' => SaveImgBehavior::className(), | |
| 77 | - 'fields' => [ | |
| 78 | - [ | |
| 79 | - 'name' => 'image', | |
| 80 | - 'directory' => 'blog/article', | |
| 81 | - ], | |
| 82 | - ], | |
| 83 | - ], | |
| 84 | - 'language' => [ | |
| 85 | - 'class' => LanguageBehavior::className(), | |
| 86 | - ], | |
| 87 | - ]; | |
| 88 | - } | |
| 89 | - /** | |
| 90 | - * @inheritdoc | |
| 91 | - */ | |
| 92 | - public function rules() | |
| 93 | - { | |
| 94 | - return [ | |
| 95 | - [ | |
| 96 | - [ | |
| 97 | - 'created_at', | |
| 98 | - 'updated_at', | |
| 99 | - 'deleted_at', | |
| 100 | - 'sort', | |
| 101 | - 'author_id', | |
| 102 | - ], | |
| 103 | - 'integer', | |
| 104 | - ], | |
| 105 | - [ | |
| 106 | - [ 'status' ], | |
| 107 | - 'boolean', | |
| 108 | - ], | |
| 109 | - [ | |
| 110 | - [ 'image' ], | |
| 111 | - 'string', | |
| 112 | - 'max' => 255, | |
| 113 | - ], | |
| 114 | - ]; | |
| 115 | - } | |
| 116 | - | |
| 117 | - /** | |
| 118 | - * @inheritdoc | |
| 119 | - */ | |
| 120 | - public function attributeLabels() | |
| 121 | - { | |
| 122 | - return [ | |
| 123 | - 'id' => 'ID', | |
| 124 | - 'image' => 'Image', | |
| 125 | - 'created_at' => 'Created At', | |
| 126 | - 'updated_at' => 'Updated At', | |
| 127 | - 'deleted_at' => 'Deleted At', | |
| 128 | - 'sort' => 'Sort', | |
| 129 | - 'status' => 'Status', | |
| 130 | - 'author_id' => 'Author ID', | |
| 131 | - ]; | |
| 132 | - } | |
| 133 | - | |
| 134 | - /** | |
| 135 | - * @return \yii\db\ActiveQuery | |
| 136 | - */ | |
| 137 | - public function getBlogArticleLangs() | |
| 138 | - { | |
| 139 | - return $this->hasMany(BlogArticleLang::className(), [ 'blog_article_id' => 'id' ]); | |
| 140 | - } | |
| 141 | - | |
| 142 | - /** | |
| 143 | - * @return \yii\db\ActiveQuery | |
| 144 | - */ | |
| 145 | - public function getLanguages() | |
| 146 | - { | |
| 147 | - return $this->hasMany(Language::className(), [ 'id' => 'language_id' ]) | |
| 148 | - ->viaTable('blog_article_lang', [ 'blog_article_id' => 'id' ]); | |
| 149 | - } | |
| 150 | - | |
| 151 | - /** | |
| 152 | - * @return \yii\db\ActiveQuery | |
| 153 | - */ | |
| 154 | - public function getRelatedBlogArticles() | |
| 155 | - { | |
| 156 | - return $this->hasMany(BlogArticle::className(), [ 'id' => 'related_blog_article_id' ]) | |
| 157 | - ->viaTable('blog_article_to_article', [ 'blog_article_id' => 'id' ]); | |
| 158 | - } | |
| 159 | - | |
| 160 | - /** | |
| 161 | - * @return \yii\db\ActiveQuery | |
| 162 | - */ | |
| 163 | - public function getBlogArticles() | |
| 164 | - { | |
| 165 | - return $this->hasMany(BlogArticle::className(), [ 'id' => 'blog_article_id' ]) | |
| 166 | - ->viaTable('blog_article_to_article', [ 'related_blog_article_id' => 'id' ]); | |
| 167 | - } | |
| 168 | - | |
| 169 | - /** | |
| 170 | - * @return \yii\db\ActiveQuery | |
| 171 | - */ | |
| 172 | - public function getBlogCategories() | |
| 173 | - { | |
| 174 | - return $this->hasMany(BlogCategory::className(), [ 'id' => 'blog_category_id' ]) | |
| 175 | - ->viaTable('blog_article_to_category', [ 'blog_article_id' => 'id' ]); | |
| 176 | - } | |
| 177 | - | |
| 178 | - /** | |
| 179 | - * @return \yii\db\ActiveQuery | |
| 180 | - */ | |
| 181 | - public function getProducts() | |
| 182 | - { | |
| 183 | - return $this->hasMany(Product::className(), [ 'id' => 'product_id' ]) | |
| 184 | - ->viaTable('blog_article_to_product', [ 'blog_article_id' => 'id' ]); | |
| 185 | - } | |
| 186 | - | |
| 187 | - /** | |
| 188 | - * @return \yii\db\ActiveQuery | |
| 189 | - */ | |
| 190 | - public function getBlogTags() | |
| 191 | - { | |
| 192 | - return $this->hasMany(BlogTag::className(), [ 'id' => 'blog_tag_id' ]) | |
| 193 | - ->viaTable('blog_article_to_tag', [ 'blog_article_id' => 'id' ]); | |
| 194 | - } | |
| 195 | - } |
common/modules/blog/models/BlogArticleLang.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use common\modules\language\models\Language; | |
| 6 | - use yii\db\ActiveRecord; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * This is the model class for table "blog_article_lang". | |
| 10 | - * | |
| 11 | - * @property integer $id | |
| 12 | - * @property integer $blog_article_id | |
| 13 | - * @property integer $language_id | |
| 14 | - * @property string $title | |
| 15 | - * @property string $body | |
| 16 | - * @property string $body_preview | |
| 17 | - * @property string $alias | |
| 18 | - * @property string $meta_title | |
| 19 | - * @property string $meta_description | |
| 20 | - * @property string $h1 | |
| 21 | - * @property string $seo_text | |
| 22 | - * @property BlogArticle $blogArticle | |
| 23 | - * @property Language $language | |
| 24 | - */ | |
| 25 | - class BlogArticleLang extends ActiveRecord | |
| 26 | - { | |
| 27 | - /** | |
| 28 | - * @inheritdoc | |
| 29 | - */ | |
| 30 | - public static function tableName() | |
| 31 | - { | |
| 32 | - return 'blog_article_lang'; | |
| 33 | - } | |
| 34 | - | |
| 35 | - public function behaviors() | |
| 36 | - { | |
| 37 | - return [ | |
| 38 | - 'slug' => [ | |
| 39 | - 'class' => 'common\behaviors\Slug', | |
| 40 | - ], | |
| 41 | - ]; | |
| 42 | - } | |
| 43 | - | |
| 44 | - /** | |
| 45 | - * @inheritdoc | |
| 46 | - */ | |
| 47 | - public function rules() | |
| 48 | - { | |
| 49 | - return [ | |
| 50 | - [ | |
| 51 | - [ | |
| 52 | - 'blog_article_id', | |
| 53 | - 'language_id', | |
| 54 | - ], | |
| 55 | - 'required', | |
| 56 | - ], | |
| 57 | - [ | |
| 58 | - [ | |
| 59 | - 'blog_article_id', | |
| 60 | - 'language_id', | |
| 61 | - ], | |
| 62 | - 'integer', | |
| 63 | - ], | |
| 64 | - [ | |
| 65 | - [ | |
| 66 | - 'body', | |
| 67 | - 'body_preview', | |
| 68 | - ], | |
| 69 | - 'string', | |
| 70 | - ], | |
| 71 | - [ | |
| 72 | - [ | |
| 73 | - 'title', | |
| 74 | - 'alias', | |
| 75 | - 'meta_title', | |
| 76 | - 'meta_description', | |
| 77 | - 'h1', | |
| 78 | - 'seo_text', | |
| 79 | - ], | |
| 80 | - 'string', | |
| 81 | - 'max' => 255, | |
| 82 | - ], | |
| 83 | - [ | |
| 84 | - [ 'alias' ], | |
| 85 | - 'unique', | |
| 86 | - ], | |
| 87 | - [ | |
| 88 | - [ | |
| 89 | - 'blog_article_id', | |
| 90 | - 'language_id', | |
| 91 | - ], | |
| 92 | - 'unique', | |
| 93 | - 'targetAttribute' => [ | |
| 94 | - 'blog_article_id', | |
| 95 | - 'language_id', | |
| 96 | - ], | |
| 97 | - 'message' => 'The combination of Blog Article ID and Language ID has already been taken.', | |
| 98 | - ], | |
| 99 | - [ | |
| 100 | - [ 'blog_article_id' ], | |
| 101 | - 'exist', | |
| 102 | - 'skipOnError' => true, | |
| 103 | - 'targetClass' => BlogArticle::className(), | |
| 104 | - 'targetAttribute' => [ 'blog_article_id' => 'id' ], | |
| 105 | - ], | |
| 106 | - [ | |
| 107 | - [ 'language_id' ], | |
| 108 | - 'exist', | |
| 109 | - 'skipOnError' => true, | |
| 110 | - 'targetClass' => Language::className(), | |
| 111 | - 'targetAttribute' => [ 'language_id' => 'id' ], | |
| 112 | - ], | |
| 113 | - ]; | |
| 114 | - } | |
| 115 | - | |
| 116 | - /** | |
| 117 | - * @inheritdoc | |
| 118 | - */ | |
| 119 | - public function attributeLabels() | |
| 120 | - { | |
| 121 | - return [ | |
| 122 | - 'id' => 'ID', | |
| 123 | - 'blog_article_id' => 'Blog Article ID', | |
| 124 | - 'language_id' => 'Language ID', | |
| 125 | - 'title' => 'Title', | |
| 126 | - 'body' => 'Body', | |
| 127 | - 'body_preview' => 'Body Preview', | |
| 128 | - 'alias' => 'Alias', | |
| 129 | - 'meta_title' => 'Meta Title', | |
| 130 | - 'meta_description' => 'Meta Description', | |
| 131 | - 'h1' => 'H1', | |
| 132 | - 'seo_text' => 'Seo Text', | |
| 133 | - ]; | |
| 134 | - } | |
| 135 | - | |
| 136 | - /** | |
| 137 | - * @return \yii\db\ActiveQuery | |
| 138 | - */ | |
| 139 | - public function getBlogArticle() | |
| 140 | - { | |
| 141 | - return $this->hasOne(BlogArticle::className(), [ 'id' => 'blog_article_id' ]); | |
| 142 | - } | |
| 143 | - | |
| 144 | - /** | |
| 145 | - * @return \yii\db\ActiveQuery | |
| 146 | - */ | |
| 147 | - public function getLanguage() | |
| 148 | - { | |
| 149 | - return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]); | |
| 150 | - } | |
| 151 | - } |
common/modules/blog/models/BlogArticleSearch.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use yii\base\Model; | |
| 6 | - use yii\data\ActiveDataProvider; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * BlogArticleSearch represents the model behind the search form about `common\modules\blog\models\BlogArticle`. | |
| 10 | - */ | |
| 11 | - class BlogArticleSearch extends BlogArticle | |
| 12 | - { | |
| 13 | - /** | |
| 14 | - * @var string | |
| 15 | - */ | |
| 16 | - public $title; | |
| 17 | - /** | |
| 18 | - * @inheritdoc | |
| 19 | - */ | |
| 20 | - public function rules() | |
| 21 | - { | |
| 22 | - return [ | |
| 23 | - [ | |
| 24 | - [ | |
| 25 | - 'id', | |
| 26 | - 'deleted_at', | |
| 27 | - 'sort', | |
| 28 | - 'author_id', | |
| 29 | - ], | |
| 30 | - 'integer', | |
| 31 | - ], | |
| 32 | - [ | |
| 33 | - [ 'image' ], | |
| 34 | - 'safe', | |
| 35 | - ], | |
| 36 | - [ | |
| 37 | - [ 'status' ], | |
| 38 | - 'boolean', | |
| 39 | - ], | |
| 40 | - [ | |
| 41 | - [ 'title' ], | |
| 42 | - 'string', | |
| 43 | - ], | |
| 44 | - ]; | |
| 45 | - } | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * @inheritdoc | |
| 49 | - */ | |
| 50 | - public function behaviors() | |
| 51 | - { | |
| 52 | - return []; | |
| 53 | - } | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * @inheritdoc | |
| 57 | - */ | |
| 58 | - public function scenarios() | |
| 59 | - { | |
| 60 | - // bypass scenarios() implementation in the parent class | |
| 61 | - return Model::scenarios(); | |
| 62 | - } | |
| 63 | - | |
| 64 | - /** | |
| 65 | - * Creates data provider instance with search query applied | |
| 66 | - * | |
| 67 | - * @param array $params | |
| 68 | - * | |
| 69 | - * @return ActiveDataProvider | |
| 70 | - */ | |
| 71 | - public function search($params) | |
| 72 | - { | |
| 73 | - $query = BlogArticle::find() | |
| 74 | - ->joinWith('lang'); | |
| 75 | - | |
| 76 | - // add conditions that should always apply here | |
| 77 | - | |
| 78 | - $dataProvider = new ActiveDataProvider( | |
| 79 | - [ | |
| 80 | - 'query' => $query, | |
| 81 | - 'sort' => [ | |
| 82 | - 'attributes' => [ | |
| 83 | - 'id', | |
| 84 | - 'created_at', | |
| 85 | - 'updated_at', | |
| 86 | - 'title' => [ | |
| 87 | - 'asc' => [ 'blog_article_lang.title' => SORT_ASC ], | |
| 88 | - 'desc' => [ 'blog_article_lang.title' => SORT_DESC ], | |
| 89 | - ], | |
| 90 | - ], | |
| 91 | - ], | |
| 92 | - ] | |
| 93 | - ); | |
| 94 | - | |
| 95 | - $this->load($params); | |
| 96 | - | |
| 97 | - if (!$this->validate()) { | |
| 98 | - // uncomment the following line if you do not want to return any records when validation fails | |
| 99 | - // $query->where('0=1'); | |
| 100 | - return $dataProvider; | |
| 101 | - } | |
| 102 | - | |
| 103 | - // grid filtering conditions | |
| 104 | - $query->andFilterWhere( | |
| 105 | - [ | |
| 106 | - 'id' => $this->id, | |
| 107 | - 'status' => $this->status, | |
| 108 | - 'author_id' => $this->author_id, | |
| 109 | - ] | |
| 110 | - ); | |
| 111 | - | |
| 112 | - $query->andFilterWhere( | |
| 113 | - [ | |
| 114 | - 'like', | |
| 115 | - 'image', | |
| 116 | - $this->image, | |
| 117 | - ] | |
| 118 | - ); | |
| 119 | - | |
| 120 | - $query->andFilterWhere( | |
| 121 | - [ | |
| 122 | - 'like', | |
| 123 | - 'blog_article_lang.title', | |
| 124 | - $this->title, | |
| 125 | - ] | |
| 126 | - ); | |
| 127 | - | |
| 128 | - return $dataProvider; | |
| 129 | - } | |
| 130 | - } |
common/modules/blog/models/BlogCategory.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use yii\db\ActiveRecord; | |
| 6 | - use common\modules\language\behaviors\LanguageBehavior; | |
| 7 | - use common\behaviors\SaveImgBehavior; | |
| 8 | - use common\modules\language\models\Language; | |
| 9 | - use yii\db\ActiveQuery; | |
| 10 | - use yii\web\Request; | |
| 11 | - | |
| 12 | - /** | |
| 13 | - * This is the model class for table "blog_category". | |
| 14 | - * | |
| 15 | - * @property integer $id | |
| 16 | - * @property integer $sort | |
| 17 | - * @property string $image | |
| 18 | - * @property integer $parent_id | |
| 19 | - * @property boolean $status | |
| 20 | - * @property BlogArticle[] $blogArticles | |
| 21 | - * @property BlogCategoryLang[] $blogCategoryLangs | |
| 22 | - * @property Language[] $languages | |
| 23 | - * @property BlogCategory $parent | |
| 24 | - * * From language behavior * | |
| 25 | - * @property BlogCategoryLang $lang | |
| 26 | - * @property BlogCategoryLang[] $langs | |
| 27 | - * @property BlogCategoryLang $objectLang | |
| 28 | - * @property string $ownerKey | |
| 29 | - * @property string $langKey | |
| 30 | - * @property BlogCategoryLang[] $modelLangs | |
| 31 | - * @property bool $transactionStatus | |
| 32 | - * @method string getOwnerKey() | |
| 33 | - * @method void setOwnerKey( string $value ) | |
| 34 | - * @method string getLangKey() | |
| 35 | - * @method void setLangKey( string $value ) | |
| 36 | - * @method ActiveQuery getLangs() | |
| 37 | - * @method ActiveQuery getLang( integer $language_id ) | |
| 38 | - * @method BlogCategoryLang[] generateLangs() | |
| 39 | - * @method void loadLangs( Request $request ) | |
| 40 | - * @method bool linkLangs() | |
| 41 | - * @method bool saveLangs() | |
| 42 | - * @method bool getTransactionStatus() | |
| 43 | - * * End language behavior * | |
| 44 | - * * From SaveImgBehavior * | |
| 45 | - * @property string|null $imageFile | |
| 46 | - * @property string|null $imageUrl | |
| 47 | - * @method string|null getImageFile( int $field ) | |
| 48 | - * @method string|null getImageUrl( int $field ) | |
| 49 | - * * End SaveImgBehavior | |
| 50 | - */ | |
| 51 | - class BlogCategory extends ActiveRecord | |
| 52 | - { | |
| 53 | - /** | |
| 54 | - * @inheritdoc | |
| 55 | - */ | |
| 56 | - public static function tableName() | |
| 57 | - { | |
| 58 | - return 'blog_category'; | |
| 59 | - } | |
| 60 | - | |
| 61 | - /** | |
| 62 | - * @inheritdoc | |
| 63 | - */ | |
| 64 | - public function behaviors() | |
| 65 | - { | |
| 66 | - return [ | |
| 67 | - [ | |
| 68 | - 'class' => SaveImgBehavior::className(), | |
| 69 | - 'fields' => [ | |
| 70 | - [ | |
| 71 | - 'name' => 'image', | |
| 72 | - 'directory' => 'blog/category', | |
| 73 | - ], | |
| 74 | - ], | |
| 75 | - ], | |
| 76 | - 'language' => [ | |
| 77 | - 'class' => LanguageBehavior::className(), | |
| 78 | - ], | |
| 79 | - 'Slug' => [ | |
| 80 | - 'class' => 'common\behaviors\Slug', | |
| 81 | - ], | |
| 82 | - ]; | |
| 83 | - } | |
| 84 | - | |
| 85 | - /** | |
| 86 | - * @inheritdoc | |
| 87 | - */ | |
| 88 | - public function rules() | |
| 89 | - { | |
| 90 | - return [ | |
| 91 | - [ | |
| 92 | - [ | |
| 93 | - 'sort', | |
| 94 | - 'parent_id', | |
| 95 | - ], | |
| 96 | - 'integer', | |
| 97 | - ], | |
| 98 | - [ | |
| 99 | - [ 'status' ], | |
| 100 | - 'boolean', | |
| 101 | - ], | |
| 102 | - [ | |
| 103 | - [ 'image' ], | |
| 104 | - 'string', | |
| 105 | - 'max' => 255, | |
| 106 | - ], | |
| 107 | - [ | |
| 108 | - [ 'parent_id' ], | |
| 109 | - 'default', | |
| 110 | - 'value' => 0, | |
| 111 | - ], | |
| 112 | - ]; | |
| 113 | - } | |
| 114 | - | |
| 115 | - /** | |
| 116 | - * @inheritdoc | |
| 117 | - */ | |
| 118 | - public function attributeLabels() | |
| 119 | - { | |
| 120 | - return [ | |
| 121 | - 'id' => 'ID', | |
| 122 | - 'sort' => 'Sort', | |
| 123 | - 'image' => 'Image', | |
| 124 | - 'parent_id' => 'Parent ID', | |
| 125 | - 'status' => 'Status', | |
| 126 | - ]; | |
| 127 | - } | |
| 128 | - | |
| 129 | - /** | |
| 130 | - * @return \yii\db\ActiveQuery | |
| 131 | - */ | |
| 132 | - public function getBlogArticles() | |
| 133 | - { | |
| 134 | - return $this->hasMany(BlogArticle::className(), [ 'id' => 'blog_article_id' ]) | |
| 135 | - ->viaTable('blog_article_to_category', [ 'blog_category_id' => 'id' ]); | |
| 136 | - } | |
| 137 | - | |
| 138 | - /** | |
| 139 | - * @return \yii\db\ActiveQuery | |
| 140 | - */ | |
| 141 | - public function getBlogCategoryLangs() | |
| 142 | - { | |
| 143 | - return $this->hasMany(BlogCategoryLang::className(), [ 'blog_category_id' => 'id' ]); | |
| 144 | - } | |
| 145 | - | |
| 146 | - /** | |
| 147 | - * @return \yii\db\ActiveQuery | |
| 148 | - */ | |
| 149 | - public function getLanguages() | |
| 150 | - { | |
| 151 | - return $this->hasMany(Language::className(), [ 'id' => 'language_id' ]) | |
| 152 | - ->viaTable('blog_category_lang', [ 'blog_category_id' => 'id' ]); | |
| 153 | - } | |
| 154 | - | |
| 155 | - public function getParent() | |
| 156 | - { | |
| 157 | - return $this->hasOne(BlogCategory::className(), [ 'id' => 'parent_id' ]); | |
| 158 | - } | |
| 159 | - } |
common/modules/blog/models/BlogCategoryLang.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use yii\db\ActiveRecord; | |
| 6 | - use common\modules\language\models\Language; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * This is the model class for table "blog_category_lang". | |
| 10 | - * | |
| 11 | - * @property integer $id | |
| 12 | - * @property integer $blog_category_id | |
| 13 | - * @property integer $language_id | |
| 14 | - * @property string $title | |
| 15 | - * @property string $alias | |
| 16 | - * @property string $description | |
| 17 | - * @property string $meta_title | |
| 18 | - * @property string $meta_description | |
| 19 | - * @property string $h1 | |
| 20 | - * @property string $seo_text | |
| 21 | - * @property BlogCategory $blogCategory | |
| 22 | - * @property Language $language | |
| 23 | - */ | |
| 24 | - class BlogCategoryLang extends ActiveRecord | |
| 25 | - { | |
| 26 | - /** | |
| 27 | - * @inheritdoc | |
| 28 | - */ | |
| 29 | - public static function tableName() | |
| 30 | - { | |
| 31 | - return 'blog_category_lang'; | |
| 32 | - } | |
| 33 | - | |
| 34 | - public function behaviors() | |
| 35 | - { | |
| 36 | - return [ | |
| 37 | - 'slug' => [ | |
| 38 | - 'class' => 'common\behaviors\Slug', | |
| 39 | - ], | |
| 40 | - ]; | |
| 41 | - } | |
| 42 | - | |
| 43 | - /** | |
| 44 | - * @inheritdoc | |
| 45 | - */ | |
| 46 | - public function rules() | |
| 47 | - { | |
| 48 | - return [ | |
| 49 | - [ | |
| 50 | - [ | |
| 51 | - 'blog_category_id', | |
| 52 | - 'language_id', | |
| 53 | - ], | |
| 54 | - 'required', | |
| 55 | - ], | |
| 56 | - [ | |
| 57 | - [ | |
| 58 | - 'blog_category_id', | |
| 59 | - 'language_id', | |
| 60 | - ], | |
| 61 | - 'integer', | |
| 62 | - ], | |
| 63 | - [ | |
| 64 | - [ 'description' ], | |
| 65 | - 'string', | |
| 66 | - ], | |
| 67 | - [ | |
| 68 | - [ | |
| 69 | - 'title', | |
| 70 | - 'alias', | |
| 71 | - 'meta_title', | |
| 72 | - 'meta_description', | |
| 73 | - 'h1', | |
| 74 | - 'seo_text', | |
| 75 | - ], | |
| 76 | - 'string', | |
| 77 | - 'max' => 255, | |
| 78 | - ], | |
| 79 | - [ | |
| 80 | - [ 'alias' ], | |
| 81 | - 'unique', | |
| 82 | - ], | |
| 83 | - [ | |
| 84 | - [ | |
| 85 | - 'blog_category_id', | |
| 86 | - 'language_id', | |
| 87 | - ], | |
| 88 | - 'unique', | |
| 89 | - 'targetAttribute' => [ | |
| 90 | - 'blog_category_id', | |
| 91 | - 'language_id', | |
| 92 | - ], | |
| 93 | - 'message' => 'The combination of Blog Category ID and Language ID has already been taken.', | |
| 94 | - ], | |
| 95 | - [ | |
| 96 | - [ 'blog_category_id' ], | |
| 97 | - 'exist', | |
| 98 | - 'skipOnError' => true, | |
| 99 | - 'targetClass' => BlogCategory::className(), | |
| 100 | - 'targetAttribute' => [ 'blog_category_id' => 'id' ], | |
| 101 | - ], | |
| 102 | - [ | |
| 103 | - [ 'language_id' ], | |
| 104 | - 'exist', | |
| 105 | - 'skipOnError' => true, | |
| 106 | - 'targetClass' => Language::className(), | |
| 107 | - 'targetAttribute' => [ 'language_id' => 'id' ], | |
| 108 | - ], | |
| 109 | - ]; | |
| 110 | - } | |
| 111 | - | |
| 112 | - /** | |
| 113 | - * @inheritdoc | |
| 114 | - */ | |
| 115 | - public function attributeLabels() | |
| 116 | - { | |
| 117 | - return [ | |
| 118 | - 'id' => 'ID', | |
| 119 | - 'blog_category_id' => 'Blog Category ID', | |
| 120 | - 'language_id' => 'Language ID', | |
| 121 | - 'title' => 'Title', | |
| 122 | - 'alias' => 'Alias', | |
| 123 | - 'description' => 'Description', | |
| 124 | - 'meta_title' => 'Meta Title', | |
| 125 | - 'meta_description' => 'Meta Description', | |
| 126 | - 'h1' => 'H1', | |
| 127 | - 'seo_text' => 'Seo Text', | |
| 128 | - ]; | |
| 129 | - } | |
| 130 | - | |
| 131 | - /** | |
| 132 | - * @return \yii\db\ActiveQuery | |
| 133 | - */ | |
| 134 | - public function getBlogCategory() | |
| 135 | - { | |
| 136 | - return $this->hasOne(BlogCategory::className(), [ 'id' => 'blog_category_id' ]); | |
| 137 | - } | |
| 138 | - | |
| 139 | - /** | |
| 140 | - * @return \yii\db\ActiveQuery | |
| 141 | - */ | |
| 142 | - public function getLanguage() | |
| 143 | - { | |
| 144 | - return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]); | |
| 145 | - } | |
| 146 | - } |
common/modules/blog/models/BlogCategorySearch.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use yii\base\Model; | |
| 6 | - use yii\data\ActiveDataProvider; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * BlogCategorySearch represents the model behind the search form about `common\modules\blog\models\BlogCategory`. | |
| 10 | - */ | |
| 11 | - class BlogCategorySearch extends BlogCategory | |
| 12 | - { | |
| 13 | - /** | |
| 14 | - * @var string | |
| 15 | - */ | |
| 16 | - public $title; | |
| 17 | - /** | |
| 18 | - * @inheritdoc | |
| 19 | - */ | |
| 20 | - public function rules() | |
| 21 | - { | |
| 22 | - return [ | |
| 23 | - [ | |
| 24 | - [ | |
| 25 | - 'id', | |
| 26 | - 'sort', | |
| 27 | - 'parent_id', | |
| 28 | - ], | |
| 29 | - 'integer', | |
| 30 | - ], | |
| 31 | - [ | |
| 32 | - [ 'image' ], | |
| 33 | - 'safe', | |
| 34 | - ], | |
| 35 | - [ | |
| 36 | - [ 'status' ], | |
| 37 | - 'boolean', | |
| 38 | - ], | |
| 39 | - [ | |
| 40 | - [ 'title' ], | |
| 41 | - 'string', | |
| 42 | - ], | |
| 43 | - ]; | |
| 44 | - } | |
| 45 | - | |
| 46 | - /** | |
| 47 | - * @inheritdoc | |
| 48 | - */ | |
| 49 | - public function behaviors() | |
| 50 | - { | |
| 51 | - return []; | |
| 52 | - } | |
| 53 | - | |
| 54 | - /** | |
| 55 | - * @inheritdoc | |
| 56 | - */ | |
| 57 | - public function scenarios() | |
| 58 | - { | |
| 59 | - // bypass scenarios() implementation in the parent class | |
| 60 | - return Model::scenarios(); | |
| 61 | - } | |
| 62 | - | |
| 63 | - /** | |
| 64 | - * Creates data provider instance with search query applied | |
| 65 | - * | |
| 66 | - * @param array $params | |
| 67 | - * | |
| 68 | - * @return ActiveDataProvider | |
| 69 | - */ | |
| 70 | - public function search($params) | |
| 71 | - { | |
| 72 | - $query = BlogCategory::find() | |
| 73 | - ->joinWith('lang', 'parent.lang'); | |
| 74 | - | |
| 75 | - // add conditions that should always apply here | |
| 76 | - | |
| 77 | - $dataProvider = new ActiveDataProvider( | |
| 78 | - [ | |
| 79 | - 'query' => $query, | |
| 80 | - 'sort' => [ | |
| 81 | - 'attributes' => [ | |
| 82 | - 'title' => [ | |
| 83 | - 'asc' => [ 'blog_category_lang.title' => SORT_ASC ], | |
| 84 | - 'desc' => [ 'blog_category_lang.title' => SORT_DESC ], | |
| 85 | - ], | |
| 86 | - 'id', | |
| 87 | - ], | |
| 88 | - ], | |
| 89 | - ] | |
| 90 | - ); | |
| 91 | - | |
| 92 | - $this->load($params); | |
| 93 | - | |
| 94 | - if (!$this->validate()) { | |
| 95 | - // uncomment the following line if you do not want to return any records when validation fails | |
| 96 | - // $query->where('0=1'); | |
| 97 | - return $dataProvider; | |
| 98 | - } | |
| 99 | - | |
| 100 | - // grid filtering conditions | |
| 101 | - $query->andFilterWhere( | |
| 102 | - [ | |
| 103 | - 'id' => $this->id, | |
| 104 | - 'sort' => $this->sort, | |
| 105 | - 'parent_id' => $this->parent_id, | |
| 106 | - 'status' => $this->status, | |
| 107 | - ] | |
| 108 | - ); | |
| 109 | - | |
| 110 | - $query->andFilterWhere( | |
| 111 | - [ | |
| 112 | - 'like', | |
| 113 | - 'image', | |
| 114 | - $this->image, | |
| 115 | - ] | |
| 116 | - ); | |
| 117 | - | |
| 118 | - $query->andFilterWhere( | |
| 119 | - [ | |
| 120 | - 'like', | |
| 121 | - 'blog_category_lang.title', | |
| 122 | - $this->title, | |
| 123 | - ] | |
| 124 | - ); | |
| 125 | - | |
| 126 | - return $dataProvider; | |
| 127 | - } | |
| 128 | - } |
common/modules/blog/models/BlogTag.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use yii\db\ActiveRecord; | |
| 6 | - use common\modules\language\behaviors\LanguageBehavior; | |
| 7 | - use common\modules\language\models\Language; | |
| 8 | - use yii\db\ActiveQuery; | |
| 9 | - use yii\web\Request; | |
| 10 | - | |
| 11 | - /** | |
| 12 | - * This is the model class for table "blog_tag". | |
| 13 | - * | |
| 14 | - * @property integer $id | |
| 15 | - * @property BlogArticle[] $blogArticles | |
| 16 | - * @property BlogTagLang[] $blogTagLangs | |
| 17 | - * @property Language[] $languages | |
| 18 | - * * From language behavior * | |
| 19 | - * @property BlogTagLang $lang | |
| 20 | - * @property BlogTagLang[] $langs | |
| 21 | - * @property BlogTagLang $objectLang | |
| 22 | - * @property string $ownerKey | |
| 23 | - * @property string $langKey | |
| 24 | - * @property BlogTagLang[] $modelLangs | |
| 25 | - * @property bool $transactionStatus | |
| 26 | - * @method string getOwnerKey() | |
| 27 | - * @method void setOwnerKey( string $value ) | |
| 28 | - * @method string getLangKey() | |
| 29 | - * @method void setLangKey( string $value ) | |
| 30 | - * @method ActiveQuery getLangs() | |
| 31 | - * @method ActiveQuery getLang( integer $language_id ) | |
| 32 | - * @method BlogTagLang[] generateLangs() | |
| 33 | - * @method void loadLangs( Request $request ) | |
| 34 | - * @method bool linkLangs() | |
| 35 | - * @method bool saveLangs() | |
| 36 | - * @method bool getTransactionStatus() | |
| 37 | - * * End language behavior * | |
| 38 | - */ | |
| 39 | - class BlogTag extends ActiveRecord | |
| 40 | - { | |
| 41 | - /** | |
| 42 | - * @inheritdoc | |
| 43 | - */ | |
| 44 | - public static function tableName() | |
| 45 | - { | |
| 46 | - return 'blog_tag'; | |
| 47 | - } | |
| 48 | - | |
| 49 | - /** | |
| 50 | - * @inheritdoc | |
| 51 | - */ | |
| 52 | - public function behaviors() | |
| 53 | - { | |
| 54 | - return [ | |
| 55 | - 'language' => [ | |
| 56 | - 'class' => LanguageBehavior::className(), | |
| 57 | - ], | |
| 58 | - ]; | |
| 59 | - } | |
| 60 | - | |
| 61 | - /** | |
| 62 | - * @inheritdoc | |
| 63 | - */ | |
| 64 | - public function rules() | |
| 65 | - { | |
| 66 | - return [ | |
| 67 | - [ | |
| 68 | - [ 'id' ], | |
| 69 | - 'integer', | |
| 70 | - ], | |
| 71 | - ]; | |
| 72 | - } | |
| 73 | - | |
| 74 | - /** | |
| 75 | - * @inheritdoc | |
| 76 | - */ | |
| 77 | - public function attributeLabels() | |
| 78 | - { | |
| 79 | - return [ | |
| 80 | - 'id' => 'ID', | |
| 81 | - ]; | |
| 82 | - } | |
| 83 | - | |
| 84 | - /** | |
| 85 | - * @return \yii\db\ActiveQuery | |
| 86 | - */ | |
| 87 | - public function getBlogArticles() | |
| 88 | - { | |
| 89 | - return $this->hasMany(BlogArticle::className(), [ 'id' => 'blog_article_id' ]) | |
| 90 | - ->viaTable('blog_article_to_tag', [ 'blog_tag_id' => 'id' ]); | |
| 91 | - } | |
| 92 | - | |
| 93 | - /** | |
| 94 | - * @return \yii\db\ActiveQuery | |
| 95 | - */ | |
| 96 | - public function getBlogTagLangs() | |
| 97 | - { | |
| 98 | - return $this->hasMany(BlogTagLang::className(), [ 'blog_tag_id' => 'id' ]); | |
| 99 | - } | |
| 100 | - | |
| 101 | - /** | |
| 102 | - * @return \yii\db\ActiveQuery | |
| 103 | - */ | |
| 104 | - public function getLanguages() | |
| 105 | - { | |
| 106 | - return $this->hasMany(Language::className(), [ 'id' => 'language_id' ]) | |
| 107 | - ->viaTable('blog_tag_lang', [ 'blog_tag_id' => 'id' ]); | |
| 108 | - } | |
| 109 | - } |
common/modules/blog/models/BlogTagLang.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use common\modules\language\models\Language; | |
| 6 | - use yii\db\ActiveRecord; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * This is the model class for table "blog_tag_lang". | |
| 10 | - * | |
| 11 | - * @property integer $id | |
| 12 | - * @property integer $blog_tag_id | |
| 13 | - * @property integer $language_id | |
| 14 | - * @property string $label | |
| 15 | - * @property BlogTag $blogTag | |
| 16 | - * @property Language $language | |
| 17 | - */ | |
| 18 | - class BlogTagLang extends ActiveRecord | |
| 19 | - { | |
| 20 | - /** | |
| 21 | - * @inheritdoc | |
| 22 | - */ | |
| 23 | - public static function tableName() | |
| 24 | - { | |
| 25 | - return 'blog_tag_lang'; | |
| 26 | - } | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * @inheritdoc | |
| 30 | - */ | |
| 31 | - public function rules() | |
| 32 | - { | |
| 33 | - return [ | |
| 34 | - [ | |
| 35 | - [ | |
| 36 | - 'blog_tag_id', | |
| 37 | - 'language_id', | |
| 38 | - ], | |
| 39 | - 'required', | |
| 40 | - ], | |
| 41 | - [ | |
| 42 | - [ | |
| 43 | - 'blog_tag_id', | |
| 44 | - 'language_id', | |
| 45 | - ], | |
| 46 | - 'integer', | |
| 47 | - ], | |
| 48 | - [ | |
| 49 | - [ 'label' ], | |
| 50 | - 'string', | |
| 51 | - 'max' => 255, | |
| 52 | - ], | |
| 53 | - [ | |
| 54 | - [ | |
| 55 | - 'blog_tag_id', | |
| 56 | - 'language_id', | |
| 57 | - ], | |
| 58 | - 'unique', | |
| 59 | - 'targetAttribute' => [ | |
| 60 | - 'blog_tag_id', | |
| 61 | - 'language_id', | |
| 62 | - ], | |
| 63 | - 'message' => 'The combination of Blog Tag ID and Language ID has already been taken.', | |
| 64 | - ], | |
| 65 | - [ | |
| 66 | - [ 'blog_tag_id' ], | |
| 67 | - 'exist', | |
| 68 | - 'skipOnError' => true, | |
| 69 | - 'targetClass' => BlogTag::className(), | |
| 70 | - 'targetAttribute' => [ 'blog_tag_id' => 'id' ], | |
| 71 | - ], | |
| 72 | - [ | |
| 73 | - [ 'language_id' ], | |
| 74 | - 'exist', | |
| 75 | - 'skipOnError' => true, | |
| 76 | - 'targetClass' => Language::className(), | |
| 77 | - 'targetAttribute' => [ 'language_id' => 'id' ], | |
| 78 | - ], | |
| 79 | - ]; | |
| 80 | - } | |
| 81 | - | |
| 82 | - /** | |
| 83 | - * @inheritdoc | |
| 84 | - */ | |
| 85 | - public function attributeLabels() | |
| 86 | - { | |
| 87 | - return [ | |
| 88 | - 'id' => 'ID', | |
| 89 | - 'blog_tag_id' => 'Blog Tag ID', | |
| 90 | - 'language_id' => 'Language ID', | |
| 91 | - 'label' => 'Label', | |
| 92 | - ]; | |
| 93 | - } | |
| 94 | - | |
| 95 | - /** | |
| 96 | - * @return \yii\db\ActiveQuery | |
| 97 | - */ | |
| 98 | - public function getBlogTag() | |
| 99 | - { | |
| 100 | - return $this->hasOne(BlogTag::className(), [ 'id' => 'blog_tag_id' ]); | |
| 101 | - } | |
| 102 | - | |
| 103 | - /** | |
| 104 | - * @return \yii\db\ActiveQuery | |
| 105 | - */ | |
| 106 | - public function getLanguage() | |
| 107 | - { | |
| 108 | - return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]); | |
| 109 | - } | |
| 110 | - } |
common/modules/blog/models/BlogTagSearch.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - namespace common\modules\blog\models; | |
| 4 | - | |
| 5 | - use yii\base\Model; | |
| 6 | - use yii\data\ActiveDataProvider; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * BlogTagSearch represents the model behind the search form about `common\modules\blog\models\BlogTag`. | |
| 10 | - */ | |
| 11 | - class BlogTagSearch extends BlogTag | |
| 12 | - { | |
| 13 | - /** | |
| 14 | - * @var string | |
| 15 | - */ | |
| 16 | - public $label; | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * @inheritdoc | |
| 20 | - */ | |
| 21 | - public function rules() | |
| 22 | - { | |
| 23 | - return [ | |
| 24 | - [ | |
| 25 | - [ 'id' ], | |
| 26 | - 'integer', | |
| 27 | - ], | |
| 28 | - [ | |
| 29 | - [ 'label' ], | |
| 30 | - 'string', | |
| 31 | - ], | |
| 32 | - ]; | |
| 33 | - } | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * @inheritdoc | |
| 37 | - */ | |
| 38 | - public function behaviors() | |
| 39 | - { | |
| 40 | - return []; | |
| 41 | - } | |
| 42 | - | |
| 43 | - /** | |
| 44 | - * @inheritdoc | |
| 45 | - */ | |
| 46 | - public function scenarios() | |
| 47 | - { | |
| 48 | - // bypass scenarios() implementation in the parent class | |
| 49 | - return Model::scenarios(); | |
| 50 | - } | |
| 51 | - | |
| 52 | - /** | |
| 53 | - * Creates data provider instance with search query applied | |
| 54 | - * | |
| 55 | - * @param array $params | |
| 56 | - * | |
| 57 | - * @return ActiveDataProvider | |
| 58 | - */ | |
| 59 | - public function search($params) | |
| 60 | - { | |
| 61 | - $query = BlogTag::find() | |
| 62 | - ->joinWith('lang'); | |
| 63 | - | |
| 64 | - // add conditions that should always apply here | |
| 65 | - | |
| 66 | - $dataProvider = new ActiveDataProvider( | |
| 67 | - [ | |
| 68 | - 'query' => $query, | |
| 69 | - 'sort' => [ | |
| 70 | - 'attributes' => [ | |
| 71 | - 'id', | |
| 72 | - 'label' => [ | |
| 73 | - 'asc' => [ 'blog_tag_lang.label' => SORT_ASC ], | |
| 74 | - 'desc' => [ 'blog_tag_lang.label' => SORT_DESC ], | |
| 75 | - ], | |
| 76 | - ], | |
| 77 | - ], | |
| 78 | - ] | |
| 79 | - ); | |
| 80 | - | |
| 81 | - $this->load($params); | |
| 82 | - | |
| 83 | - if (!$this->validate()) { | |
| 84 | - // uncomment the following line if you do not want to return any records when validation fails | |
| 85 | - // $query->where('0=1'); | |
| 86 | - return $dataProvider; | |
| 87 | - } | |
| 88 | - | |
| 89 | - // grid filtering conditions | |
| 90 | - $query->andFilterWhere( | |
| 91 | - [ | |
| 92 | - 'id' => $this->id, | |
| 93 | - ] | |
| 94 | - ); | |
| 95 | - | |
| 96 | - $query->andFilterWhere( | |
| 97 | - [ | |
| 98 | - 'like', | |
| 99 | - 'blog_tag_lang.label', | |
| 100 | - $this->label, | |
| 101 | - ] | |
| 102 | - ); | |
| 103 | - | |
| 104 | - return $dataProvider; | |
| 105 | - } | |
| 106 | - } |
common/modules/blog/views/blog-article/_form.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogArticle; | |
| 4 | - use common\modules\blog\models\BlogArticleLang; | |
| 5 | - use common\modules\blog\models\BlogCategory; | |
| 6 | - use common\modules\blog\models\BlogTag; | |
| 7 | - use kartik\select2\Select2; | |
| 8 | - use yii\helpers\Html; | |
| 9 | - use yii\web\View; | |
| 10 | - use yii\widgets\ActiveForm; | |
| 11 | - use common\modules\language\widgets\LanguageForm; | |
| 12 | - use yii\web\JsExpression; | |
| 13 | - | |
| 14 | - /** | |
| 15 | - * @var View $this | |
| 16 | - * @var BlogArticle $model | |
| 17 | - * @var ActiveForm $form | |
| 18 | - * @var BlogArticleLang[] $modelLangs | |
| 19 | - * @var BlogCategory[] $categories | |
| 20 | - * @var BlogTag[] $tags | |
| 21 | - * @var array $products | |
| 22 | - * @var array $articles | |
| 23 | - */ | |
| 24 | -?> | |
| 25 | - | |
| 26 | -<div class="blog-article-form"> | |
| 27 | - | |
| 28 | - <?php $form = ActiveForm::begin( | |
| 29 | - [ | |
| 30 | - 'options' => [ 'enctype' => 'multipart/form-data' ], | |
| 31 | - ] | |
| 32 | - ); ?> | |
| 33 | - | |
| 34 | - <?php | |
| 35 | - echo LanguageForm::widget( | |
| 36 | - [ | |
| 37 | - 'modelLangs' => $modelLangs, | |
| 38 | - 'formView' => '@common/modules/blog/views/blog-article/_form_language', | |
| 39 | - 'form' => $form, | |
| 40 | - ] | |
| 41 | - ); | |
| 42 | - ?> | |
| 43 | - | |
| 44 | - <?php | |
| 45 | - echo $form->field($model, 'blogCategories') | |
| 46 | - ->widget( | |
| 47 | - Select2::className(), | |
| 48 | - [ | |
| 49 | - 'data' => $categories, | |
| 50 | - 'theme' => Select2::THEME_BOOTSTRAP, | |
| 51 | - 'options' => [ | |
| 52 | - 'placeholder' => \Yii::t('blog', 'Select category'), | |
| 53 | - 'multiple' => true, | |
| 54 | - ], | |
| 55 | - 'pluginOptions' => [ | |
| 56 | - 'allowClear' => true, | |
| 57 | - ], | |
| 58 | - ] | |
| 59 | - ); | |
| 60 | - ?> | |
| 61 | - | |
| 62 | - <?php | |
| 63 | - echo $form->field($model, 'blogTags') | |
| 64 | - ->widget( | |
| 65 | - Select2::className(), | |
| 66 | - [ | |
| 67 | - 'data' => $tags, | |
| 68 | - 'theme' => Select2::THEME_BOOTSTRAP, | |
| 69 | - 'options' => [ | |
| 70 | - 'placeholder' => \Yii::t('blog', 'Select tag'), | |
| 71 | - 'multiple' => true, | |
| 72 | - ], | |
| 73 | - 'pluginOptions' => [ | |
| 74 | - 'allowClear' => true, | |
| 75 | - ], | |
| 76 | - ] | |
| 77 | - ); | |
| 78 | - ?> | |
| 79 | - | |
| 80 | - <?= $form->field($model, 'image') | |
| 81 | - ->widget( | |
| 82 | - \kartik\file\FileInput::className(), | |
| 83 | - [ | |
| 84 | - 'language' => 'ru', | |
| 85 | - 'options' => [ | |
| 86 | - 'accept' => 'image/*', | |
| 87 | - 'multiple' => false, | |
| 88 | - ], | |
| 89 | - 'pluginOptions' => [ | |
| 90 | - 'allowedFileExtensions' => [ | |
| 91 | - 'jpg', | |
| 92 | - 'gif', | |
| 93 | - 'png', | |
| 94 | - ], | |
| 95 | - 'initialPreview' => !empty( $model->imageUrl ) ? \common\components\artboximage\ArtboxImageHelper::getImage( | |
| 96 | - $model->imageUrl, | |
| 97 | - 'list' | |
| 98 | - ) : '', | |
| 99 | - 'overwriteInitial' => true, | |
| 100 | - 'showRemove' => false, | |
| 101 | - 'showUpload' => false, | |
| 102 | - 'previewFileType' => 'image', | |
| 103 | - ], | |
| 104 | - ] | |
| 105 | - ); ?> | |
| 106 | - | |
| 107 | - <?php | |
| 108 | - echo $form->field($model, 'products') | |
| 109 | - ->widget( | |
| 110 | - Select2::className(), | |
| 111 | - [ | |
| 112 | - 'data' => $products, | |
| 113 | - 'options' => [ | |
| 114 | - 'placeholder' => \Yii::t('blog', 'Select related products'), | |
| 115 | - 'multiple' => true, | |
| 116 | - ], | |
| 117 | - 'pluginOptions' => [ | |
| 118 | - 'allowClear' => true, | |
| 119 | - 'minimumInputLength' => 3, | |
| 120 | - 'language' => [ | |
| 121 | - 'errorLoading' => new JsExpression( | |
| 122 | - "function () { return '" . \Yii::t('blog', 'Waiting for results') . "'; }" | |
| 123 | - ), | |
| 124 | - ], | |
| 125 | - 'ajax' => [ | |
| 126 | - 'url' => yii\helpers\Url::to([ '/blog/blog-article/product-list' ]), | |
| 127 | - 'dataType' => 'json', | |
| 128 | - 'data' => new JsExpression('function(params) { return {q:params.term}; }'), | |
| 129 | - ], | |
| 130 | - 'templateResult' => new JsExpression('function(product) { return product.text; }'), | |
| 131 | - 'templateSelection' => new JsExpression('function (product) { return product.text; }'), | |
| 132 | - ], | |
| 133 | - ] | |
| 134 | - ); | |
| 135 | - ?> | |
| 136 | - | |
| 137 | - <?php | |
| 138 | - echo $form->field($model, 'blogArticles') | |
| 139 | - ->widget( | |
| 140 | - Select2::className(), | |
| 141 | - [ | |
| 142 | - 'data' => $articles, | |
| 143 | - 'options' => [ | |
| 144 | - 'placeholder' => \Yii::t('blog', 'Select related articles'), | |
| 145 | - 'multiple' => true, | |
| 146 | - ], | |
| 147 | - 'pluginOptions' => [ | |
| 148 | - 'allowClear' => true, | |
| 149 | - 'minimumInputLength' => 3, | |
| 150 | - 'language' => [ | |
| 151 | - 'errorLoading' => new JsExpression( | |
| 152 | - "function () { return '" . \Yii::t('blog', 'Waiting for results') . "'; }" | |
| 153 | - ), | |
| 154 | - ], | |
| 155 | - 'ajax' => [ | |
| 156 | - 'url' => yii\helpers\Url::to([ '/blog/blog-article/article-list' ]), | |
| 157 | - 'dataType' => 'json', | |
| 158 | - 'data' => new JsExpression( | |
| 159 | - 'function(params) { return {q:params.term, id:' . $model->id . '}; }' | |
| 160 | - ), | |
| 161 | - ], | |
| 162 | - 'templateResult' => new JsExpression('function(article) { return article.text; }'), | |
| 163 | - 'templateSelection' => new JsExpression('function (article) { return article.text; }'), | |
| 164 | - ], | |
| 165 | - ] | |
| 166 | - ); | |
| 167 | - ?> | |
| 168 | - | |
| 169 | - <?= $form->field($model, 'sort') | |
| 170 | - ->textInput() ?> | |
| 171 | - | |
| 172 | - <?= $form->field($model, 'status') | |
| 173 | - ->checkbox() ?> | |
| 174 | - | |
| 175 | - <?= $form->field($model, 'author_id') | |
| 176 | - ->textInput() ?> | |
| 177 | - | |
| 178 | - <div class="form-group"> | |
| 179 | - <?= Html::submitButton( | |
| 180 | - $model->isNewRecord ? 'Create' : 'Update', | |
| 181 | - [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ] | |
| 182 | - ) ?> | |
| 183 | - </div> | |
| 184 | - | |
| 185 | - <?php ActiveForm::end(); ?> | |
| 186 | - | |
| 187 | -</div> |
common/modules/blog/views/blog-article/_form_language.php deleted
| 1 | -<?php | |
| 2 | - use common\models\ArticleLang; | |
| 3 | - use common\modules\language\models\Language; | |
| 4 | - use mihaildev\ckeditor\CKEditor; | |
| 5 | - use mihaildev\elfinder\ElFinder; | |
| 6 | - use yii\web\View; | |
| 7 | - use yii\widgets\ActiveForm; | |
| 8 | - | |
| 9 | - /** | |
| 10 | - * @var ArticleLang $model_lang | |
| 11 | - * @var Language $language | |
| 12 | - * @var ActiveForm $form | |
| 13 | - * @var View $this | |
| 14 | - */ | |
| 15 | -?> | |
| 16 | -<?= $form->field($model_lang, '[' . $language->id . ']title') | |
| 17 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 18 | - | |
| 19 | -<?= $form->field($model_lang, '[' . $language->id . ']alias') | |
| 20 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 21 | - | |
| 22 | -<?= $form->field($model_lang, '[' . $language->id . ']body') | |
| 23 | - ->widget( | |
| 24 | - CKEditor::className(), | |
| 25 | - [ | |
| 26 | - 'editorOptions' => ElFinder::ckeditorOptions( | |
| 27 | - 'elfinder', | |
| 28 | - [ | |
| 29 | - 'preset' => 'full', | |
| 30 | - 'inline' => false, | |
| 31 | - 'filebrowserUploadUrl' => Yii::$app->getUrlManager() | |
| 32 | - ->createUrl('file/uploader/images-upload'), | |
| 33 | - ] | |
| 34 | - ), | |
| 35 | - ] | |
| 36 | - ) ?> | |
| 37 | - | |
| 38 | -<?= $form->field($model_lang, '[' . $language->id . ']body_preview') | |
| 39 | - ->textarea( | |
| 40 | - [ | |
| 41 | - 'rows' => '10', | |
| 42 | - ] | |
| 43 | - ) ?> | |
| 44 | - | |
| 45 | -<?= $form->field($model_lang, '[' . $language->id . ']meta_title') | |
| 46 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 47 | - | |
| 48 | -<?= $form->field($model_lang, '[' . $language->id . ']meta_description') | |
| 49 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 50 | - | |
| 51 | -<?= $form->field($model_lang, '[' . $language->id . ']seo_text') | |
| 52 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 53 | - | |
| 54 | -<?= $form->field($model_lang, '[' . $language->id . ']h1') | |
| 55 | - ->textInput([ 'maxlength' => true ]); ?> |
common/modules/blog/views/blog-article/_search.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use yii\helpers\Html; | |
| 4 | - use yii\widgets\ActiveForm; | |
| 5 | - | |
| 6 | - /* @var $this yii\web\View */ | |
| 7 | - /* @var $model common\modules\blog\models\BlogArticleSearch */ | |
| 8 | - /* @var $form yii\widgets\ActiveForm */ | |
| 9 | -?> | |
| 10 | - | |
| 11 | -<div class="blog-article-search"> | |
| 12 | - | |
| 13 | - <?php $form = ActiveForm::begin( | |
| 14 | - [ | |
| 15 | - 'action' => [ 'index' ], | |
| 16 | - 'method' => 'get', | |
| 17 | - ] | |
| 18 | - ); ?> | |
| 19 | - | |
| 20 | - <?= $form->field($model, 'id') ?> | |
| 21 | - | |
| 22 | - <?= $form->field($model, 'image') ?> | |
| 23 | - | |
| 24 | - <?= $form->field($model, 'created_at') ?> | |
| 25 | - | |
| 26 | - <?= $form->field($model, 'updated_at') ?> | |
| 27 | - | |
| 28 | - <?= $form->field($model, 'deleted_at') ?> | |
| 29 | - | |
| 30 | - <?php // echo $form->field($model, 'sort') ?> | |
| 31 | - | |
| 32 | - <?php // echo $form->field($model, 'status')->checkbox() ?> | |
| 33 | - | |
| 34 | - <?php // echo $form->field($model, 'author_id') ?> | |
| 35 | - | |
| 36 | - <div class="form-group"> | |
| 37 | - <?= Html::submitButton('Search', [ 'class' => 'btn btn-primary' ]) ?> | |
| 38 | - <?= Html::resetButton('Reset', [ 'class' => 'btn btn-default' ]) ?> | |
| 39 | - </div> | |
| 40 | - | |
| 41 | - <?php ActiveForm::end(); ?> | |
| 42 | - | |
| 43 | -</div> |
common/modules/blog/views/blog-article/create.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogArticle; | |
| 4 | - use common\modules\blog\models\BlogArticleLang; | |
| 5 | - use common\modules\blog\models\BlogCategory; | |
| 6 | - use common\modules\blog\models\BlogTag; | |
| 7 | - use yii\helpers\Html; | |
| 8 | - use yii\web\View; | |
| 9 | - | |
| 10 | - /** | |
| 11 | - * @var View $this | |
| 12 | - * @var BlogArticle $model | |
| 13 | - * @var BlogArticleLang[] $modelLangs | |
| 14 | - * @var BlogCategory[] $categories | |
| 15 | - * @var BlogTag[] $tags | |
| 16 | - * @var array $products | |
| 17 | - * @var array $articles | |
| 18 | - */ | |
| 19 | - | |
| 20 | - $this->title = \Yii::t('blog', 'Create Blog Article'); | |
| 21 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 22 | - 'label' => \Yii::t('blog', 'Blog Articles'), | |
| 23 | - 'url' => [ 'index' ], | |
| 24 | - ]; | |
| 25 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 26 | -?> | |
| 27 | -<div class="blog-article-create"> | |
| 28 | - | |
| 29 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 30 | - | |
| 31 | - <?= $this->render( | |
| 32 | - '_form', | |
| 33 | - [ | |
| 34 | - 'model' => $model, | |
| 35 | - 'modelLangs' => $modelLangs, | |
| 36 | - 'categories' => $categories, | |
| 37 | - 'tags' => $tags, | |
| 38 | - 'products' => $products, | |
| 39 | - 'articles' => $articles, | |
| 40 | - ] | |
| 41 | - ) ?> | |
| 42 | - | |
| 43 | -</div> |
common/modules/blog/views/blog-article/index.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogArticle; | |
| 4 | - use common\modules\blog\models\BlogArticleSearch; | |
| 5 | - use yii\data\ActiveDataProvider; | |
| 6 | - use yii\helpers\Html; | |
| 7 | - use yii\grid\GridView; | |
| 8 | - use yii\web\View; | |
| 9 | - | |
| 10 | - /** | |
| 11 | - * @var View $this | |
| 12 | - * @var BlogArticleSearch $searchModel | |
| 13 | - * @var ActiveDataProvider $dataProvider | |
| 14 | - */ | |
| 15 | - | |
| 16 | - $this->title = \Yii::t('blog', 'Blog Articles'); | |
| 17 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 18 | -?> | |
| 19 | -<div class="blog-article-index"> | |
| 20 | - | |
| 21 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 22 | - <?php // echo $this->render('_search', ['model' => $searchModel]); ?> | |
| 23 | - | |
| 24 | - <p> | |
| 25 | - <?= Html::a(\Yii::t('blog', 'Create Blog Article'), [ 'create' ], [ 'class' => 'btn btn-success' ]) ?> | |
| 26 | - </p> | |
| 27 | - <?= GridView::widget( | |
| 28 | - [ | |
| 29 | - 'dataProvider' => $dataProvider, | |
| 30 | - 'filterModel' => $searchModel, | |
| 31 | - 'columns' => [ | |
| 32 | - 'id', | |
| 33 | - [ | |
| 34 | - 'attribute' => 'title', | |
| 35 | - 'value' => 'lang.title', | |
| 36 | - ], | |
| 37 | - 'imageUrl:image', | |
| 38 | - [ | |
| 39 | - 'attribute' => 'status', | |
| 40 | - 'value' => function($model) { | |
| 41 | - /** | |
| 42 | - * @var BlogArticle $model | |
| 43 | - */ | |
| 44 | - return ( !$model->status ) ? \Yii::t('blog', 'Not active') : \Yii::t('blog', 'Active'); | |
| 45 | - }, | |
| 46 | - 'filter' => [ | |
| 47 | - 0 => \Yii::t('blog', 'Not active'), | |
| 48 | - 1 => \Yii::t('blog', 'Active'), | |
| 49 | - ], | |
| 50 | - ], | |
| 51 | - 'created_at:date', | |
| 52 | - 'updated_at:date', | |
| 53 | - [ 'class' => 'yii\grid\ActionColumn' ], | |
| 54 | - ], | |
| 55 | - ] | |
| 56 | - ); ?> | |
| 57 | -</div> |
common/modules/blog/views/blog-article/update.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogArticle; | |
| 4 | - use common\modules\blog\models\BlogArticleLang; | |
| 5 | - use common\modules\blog\models\BlogCategory; | |
| 6 | - use common\modules\blog\models\BlogTag; | |
| 7 | - use yii\helpers\Html; | |
| 8 | - use yii\web\View; | |
| 9 | - | |
| 10 | - /** | |
| 11 | - * @var View $this | |
| 12 | - * @var BlogArticle $model | |
| 13 | - * @var BlogArticleLang[] $modelLangs | |
| 14 | - * @var BlogCategory[] $categories | |
| 15 | - * @var BlogTag[] $tags | |
| 16 | - * @var array $products | |
| 17 | - * @var array $articles | |
| 18 | - */ | |
| 19 | - | |
| 20 | - $this->title = \Yii::t('blog', 'Update Blog Article: ') . $model->lang->title; | |
| 21 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 22 | - 'label' => \Yii::t('blog', 'Blog Articles'), | |
| 23 | - 'url' => [ 'index' ], | |
| 24 | - ]; | |
| 25 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 26 | - 'label' => $model->lang->title, | |
| 27 | - 'url' => [ | |
| 28 | - 'view', | |
| 29 | - 'id' => $model->id, | |
| 30 | - ], | |
| 31 | - ]; | |
| 32 | - $this->params[ 'breadcrumbs' ][] = \Yii::t('blog', 'Update'); | |
| 33 | -?> | |
| 34 | -<div class="blog-article-update"> | |
| 35 | - | |
| 36 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 37 | - | |
| 38 | - <?= $this->render( | |
| 39 | - '_form', | |
| 40 | - [ | |
| 41 | - 'model' => $model, | |
| 42 | - 'modelLangs' => $modelLangs, | |
| 43 | - 'categories' => $categories, | |
| 44 | - 'tags' => $tags, | |
| 45 | - 'products' => $products, | |
| 46 | - 'articles' => $articles, | |
| 47 | - ] | |
| 48 | - ) ?> | |
| 49 | - | |
| 50 | -</div> |
common/modules/blog/views/blog-article/view.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogArticle; | |
| 4 | - use yii\helpers\Html; | |
| 5 | - use yii\web\View; | |
| 6 | - use yii\widgets\DetailView; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogArticle $model | |
| 11 | - */ | |
| 12 | - | |
| 13 | - $this->title = $model->lang->title; | |
| 14 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 15 | - 'label' => \Yii::t('blog', 'Blog Articles'), | |
| 16 | - 'url' => [ 'index' ], | |
| 17 | - ]; | |
| 18 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 19 | -?> | |
| 20 | -<div class="blog-article-view"> | |
| 21 | - | |
| 22 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 23 | - | |
| 24 | - <p> | |
| 25 | - <?= Html::a( | |
| 26 | - 'Update', | |
| 27 | - [ | |
| 28 | - 'update', | |
| 29 | - 'id' => $model->id, | |
| 30 | - ], | |
| 31 | - [ 'class' => 'btn btn-primary' ] | |
| 32 | - ) ?> | |
| 33 | - <?= Html::a( | |
| 34 | - 'Delete', | |
| 35 | - [ | |
| 36 | - 'delete', | |
| 37 | - 'id' => $model->id, | |
| 38 | - ], | |
| 39 | - [ | |
| 40 | - 'class' => 'btn btn-danger', | |
| 41 | - 'data' => [ | |
| 42 | - 'confirm' => 'Are you sure you want to delete this item?', | |
| 43 | - 'method' => 'post', | |
| 44 | - ], | |
| 45 | - ] | |
| 46 | - ) ?> | |
| 47 | - </p> | |
| 48 | - | |
| 49 | - <?= DetailView::widget( | |
| 50 | - [ | |
| 51 | - 'model' => $model, | |
| 52 | - 'attributes' => [ | |
| 53 | - 'id', | |
| 54 | - 'imageUrl:image', | |
| 55 | - 'created_at:date', | |
| 56 | - 'updated_at:date', | |
| 57 | - [ | |
| 58 | - 'attribute' => 'status', | |
| 59 | - 'value' => ( !$model->status ) ? \Yii::t('blog', 'Not active') : \Yii::t('blog', 'Active'), | |
| 60 | - ], | |
| 61 | - 'lang.alias', | |
| 62 | - 'lang.body:html', | |
| 63 | - ], | |
| 64 | - ] | |
| 65 | - ) ?> | |
| 66 | - | |
| 67 | -</div> |
common/modules/blog/views/blog-category/_form.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogCategory; | |
| 4 | - use common\modules\blog\models\BlogCategoryLang; | |
| 5 | - use kartik\select2\Select2; | |
| 6 | - use yii\helpers\Html; | |
| 7 | - use yii\web\View; | |
| 8 | - use yii\widgets\ActiveForm; | |
| 9 | - use common\modules\language\widgets\LanguageForm; | |
| 10 | - | |
| 11 | - /** | |
| 12 | - * @var View $this | |
| 13 | - * @var BlogCategory $model | |
| 14 | - * @var ActiveForm $form | |
| 15 | - * @var BlogCategoryLang[] $modelLangs | |
| 16 | - * @var array $parentCategories | |
| 17 | - */ | |
| 18 | -?> | |
| 19 | - | |
| 20 | -<div class="blog-category-form"> | |
| 21 | - | |
| 22 | - <?php $form = ActiveForm::begin( | |
| 23 | - [ | |
| 24 | - 'options' => [ 'enctype' => 'multipart/form-data' ], | |
| 25 | - | |
| 26 | - ] | |
| 27 | - ); ?> | |
| 28 | - | |
| 29 | - <?php | |
| 30 | - echo LanguageForm::widget( | |
| 31 | - [ | |
| 32 | - 'modelLangs' => $modelLangs, | |
| 33 | - 'formView' => '@common/modules/blog/views/blog-category/_form_language', | |
| 34 | - 'form' => $form, | |
| 35 | - ] | |
| 36 | - ); | |
| 37 | - ?> | |
| 38 | - | |
| 39 | - <?= $form->field($model, 'image') | |
| 40 | - ->widget( | |
| 41 | - \kartik\file\FileInput::className(), | |
| 42 | - [ | |
| 43 | - 'language' => 'ru', | |
| 44 | - 'options' => [ | |
| 45 | - 'accept' => 'image/*', | |
| 46 | - 'multiple' => false, | |
| 47 | - ], | |
| 48 | - 'pluginOptions' => [ | |
| 49 | - 'allowedFileExtensions' => [ | |
| 50 | - 'jpg', | |
| 51 | - 'gif', | |
| 52 | - 'png', | |
| 53 | - ], | |
| 54 | - 'initialPreview' => !empty( $model->imageUrl ) ? \common\components\artboximage\ArtboxImageHelper::getImage( | |
| 55 | - $model->imageUrl, | |
| 56 | - 'list' | |
| 57 | - ) : '', | |
| 58 | - 'overwriteInitial' => true, | |
| 59 | - 'showRemove' => false, | |
| 60 | - 'showUpload' => false, | |
| 61 | - 'previewFileType' => 'image', | |
| 62 | - ], | |
| 63 | - ] | |
| 64 | - ); ?> | |
| 65 | - | |
| 66 | - <?= $form->field($model, 'sort') | |
| 67 | - ->textInput() ?> | |
| 68 | - | |
| 69 | - <?php echo $form->field($model, 'parent_id') | |
| 70 | - ->widget( | |
| 71 | - Select2::className(), | |
| 72 | - [ | |
| 73 | - 'data' => $parentCategories, | |
| 74 | - 'options' => [ 'placeholder' => \Yii::t('blog', 'Has no parent rubric') ], | |
| 75 | - 'pluginOptions' => [ | |
| 76 | - 'allowClear' => true, | |
| 77 | - ], | |
| 78 | - ] | |
| 79 | - ); | |
| 80 | - ?> | |
| 81 | - | |
| 82 | - <?= $form->field($model, 'status') | |
| 83 | - ->checkbox() ?> | |
| 84 | - | |
| 85 | - <div class="form-group"> | |
| 86 | - <?= Html::submitButton( | |
| 87 | - $model->isNewRecord ? 'Create' : 'Update', | |
| 88 | - [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ] | |
| 89 | - ) ?> | |
| 90 | - </div> | |
| 91 | - | |
| 92 | - <?php ActiveForm::end(); ?> | |
| 93 | - | |
| 94 | -</div> |
common/modules/blog/views/blog-category/_form_language.php deleted
| 1 | -<?php | |
| 2 | - use common\models\ArticleLang; | |
| 3 | - use common\modules\language\models\Language; | |
| 4 | - use yii\web\View; | |
| 5 | - use yii\widgets\ActiveForm; | |
| 6 | - | |
| 7 | - /** | |
| 8 | - * @var ArticleLang $model_lang | |
| 9 | - * @var Language $language | |
| 10 | - * @var ActiveForm $form | |
| 11 | - * @var View $this | |
| 12 | - */ | |
| 13 | -?> | |
| 14 | -<?= $form->field($model_lang, '[' . $language->id . ']title') | |
| 15 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 16 | - | |
| 17 | -<?= $form->field($model_lang, '[' . $language->id . ']alias') | |
| 18 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 19 | - | |
| 20 | -<?= $form->field($model_lang, '[' . $language->id . ']description') | |
| 21 | - ->textarea( | |
| 22 | - [ | |
| 23 | - 'rows' => '10', | |
| 24 | - ] | |
| 25 | - ) ?> | |
| 26 | - | |
| 27 | -<?= $form->field($model_lang, '[' . $language->id . ']meta_title') | |
| 28 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 29 | - | |
| 30 | -<?= $form->field($model_lang, '[' . $language->id . ']meta_description') | |
| 31 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 32 | - | |
| 33 | -<?= $form->field($model_lang, '[' . $language->id . ']seo_text') | |
| 34 | - ->textInput([ 'maxlength' => true ]); ?> | |
| 35 | - | |
| 36 | -<?= $form->field($model_lang, '[' . $language->id . ']h1') | |
| 37 | - ->textInput([ 'maxlength' => true ]); ?> |
common/modules/blog/views/blog-category/_search.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\helpers\Html; | |
| 4 | -use yii\widgets\ActiveForm; | |
| 5 | - | |
| 6 | -/* @var $this yii\web\View */ | |
| 7 | -/* @var $model common\modules\blog\models\BlogCategorySearch */ | |
| 8 | -/* @var $form yii\widgets\ActiveForm */ | |
| 9 | -?> | |
| 10 | - | |
| 11 | -<div class="blog-category-search"> | |
| 12 | - | |
| 13 | - <?php $form = ActiveForm::begin([ | |
| 14 | - 'action' => ['index'], | |
| 15 | - 'method' => 'get', | |
| 16 | - ]); ?> | |
| 17 | - | |
| 18 | - <?= $form->field($model, 'id') ?> | |
| 19 | - | |
| 20 | - <?= $form->field($model, 'sort') ?> | |
| 21 | - | |
| 22 | - <?= $form->field($model, 'image') ?> | |
| 23 | - | |
| 24 | - <?= $form->field($model, 'parent_id') ?> | |
| 25 | - | |
| 26 | - <?= $form->field($model, 'status')->checkbox() ?> | |
| 27 | - | |
| 28 | - <div class="form-group"> | |
| 29 | - <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?> | |
| 30 | - <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?> | |
| 31 | - </div> | |
| 32 | - | |
| 33 | - <?php ActiveForm::end(); ?> | |
| 34 | - | |
| 35 | -</div> |
common/modules/blog/views/blog-category/create.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogArticleLang; | |
| 4 | - use common\modules\blog\models\BlogCategory; | |
| 5 | - use yii\helpers\Html; | |
| 6 | - use yii\web\View; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogCategory $model | |
| 11 | - * @var BlogArticleLang[] $modelLangs | |
| 12 | - * @var array $parentCategories | |
| 13 | - */ | |
| 14 | - | |
| 15 | - $this->title = \Yii::t('blog', 'Create Blog Category'); | |
| 16 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 17 | - 'label' => \Yii::t('blog', 'Blog Categories'), | |
| 18 | - 'url' => [ 'index' ], | |
| 19 | - ]; | |
| 20 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 21 | -?> | |
| 22 | -<div class="blog-category-create"> | |
| 23 | - | |
| 24 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 25 | - | |
| 26 | - <?= $this->render( | |
| 27 | - '_form', | |
| 28 | - [ | |
| 29 | - 'model' => $model, | |
| 30 | - 'modelLangs' => $modelLangs, | |
| 31 | - 'parentCategories' => $parentCategories, | |
| 32 | - ] | |
| 33 | - ) ?> | |
| 34 | - | |
| 35 | -</div> |
common/modules/blog/views/blog-category/index.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogCategory; | |
| 4 | - use common\modules\blog\models\BlogCategorySearch; | |
| 5 | - use yii\data\ActiveDataProvider; | |
| 6 | - use yii\helpers\Html; | |
| 7 | - use yii\grid\GridView; | |
| 8 | - use yii\web\View; | |
| 9 | - | |
| 10 | - /** | |
| 11 | - * @var View $this | |
| 12 | - * @var BlogCategorySearch $searchModel | |
| 13 | - * @var ActiveDataProvider $dataProvider | |
| 14 | - */ | |
| 15 | - | |
| 16 | - $this->title = \Yii::t('blog', 'Blog Categories'); | |
| 17 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 18 | -?> | |
| 19 | -<div class="blog-category-index"> | |
| 20 | - | |
| 21 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 22 | - <?php // echo $this->render('_search', ['model' => $searchModel]); ?> | |
| 23 | - | |
| 24 | - <p> | |
| 25 | - <?= Html::a(\Yii::t('blog', 'Create Blog Category'), [ 'create' ], [ 'class' => 'btn btn-success' ]) ?> | |
| 26 | - </p> | |
| 27 | - <?= GridView::widget( | |
| 28 | - [ | |
| 29 | - 'dataProvider' => $dataProvider, | |
| 30 | - 'filterModel' => $searchModel, | |
| 31 | - 'columns' => [ | |
| 32 | - 'id', | |
| 33 | - [ | |
| 34 | - 'attribute' => 'title', | |
| 35 | - 'value' => 'lang.title', | |
| 36 | - ], | |
| 37 | - 'imageUrl:image', | |
| 38 | - [ | |
| 39 | - 'label' => \Yii::t('blog', 'Parent category'), | |
| 40 | - 'value' => function($model) { | |
| 41 | - /** | |
| 42 | - * @var BlogCategory $model | |
| 43 | - */ | |
| 44 | - if (!empty( $model->parent )) { | |
| 45 | - return $model->parent->lang->title; | |
| 46 | - } else { | |
| 47 | - return false; | |
| 48 | - }; | |
| 49 | - }, | |
| 50 | - ], | |
| 51 | - [ | |
| 52 | - 'attribute' => 'status', | |
| 53 | - 'value' => function($model) { | |
| 54 | - /** | |
| 55 | - * @var BlogCategory $model | |
| 56 | - */ | |
| 57 | - return ( !$model->status ) ? \Yii::t('blog', 'Not active') : \Yii::t('blog', 'Active'); | |
| 58 | - }, | |
| 59 | - 'filter' => [ | |
| 60 | - 0 => \Yii::t('blog', 'Not active'), | |
| 61 | - 1 => \Yii::t('blog', 'Active'), | |
| 62 | - ], | |
| 63 | - ], | |
| 64 | - [ 'class' => 'yii\grid\ActionColumn' ], | |
| 65 | - ], | |
| 66 | - ] | |
| 67 | - ); ?> | |
| 68 | -</div> |
common/modules/blog/views/blog-category/update.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogCategory; | |
| 4 | - use common\modules\blog\models\BlogCategoryLang; | |
| 5 | - use yii\helpers\Html; | |
| 6 | - use yii\web\View; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogCategory $model | |
| 11 | - * @var BlogCategoryLang $modelLangs | |
| 12 | - * @var array $parentCategories | |
| 13 | - */ | |
| 14 | - | |
| 15 | - $this->title = \Yii::t('blog', 'Update Blog Category: ') . $model->lang->title; | |
| 16 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 17 | - 'label' => \Yii::t('blog', 'Blog Categories'), | |
| 18 | - 'url' => [ 'index' ], | |
| 19 | - ]; | |
| 20 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 21 | - 'label' => $model->lang->title, | |
| 22 | - 'url' => [ | |
| 23 | - 'view', | |
| 24 | - 'id' => $model->id, | |
| 25 | - ], | |
| 26 | - ]; | |
| 27 | - $this->params[ 'breadcrumbs' ][] = \Yii::t('blog', 'Update'); | |
| 28 | -?> | |
| 29 | -<div class="blog-category-update"> | |
| 30 | - | |
| 31 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 32 | - | |
| 33 | - <?= $this->render( | |
| 34 | - '_form', | |
| 35 | - [ | |
| 36 | - 'model' => $model, | |
| 37 | - 'modelLangs' => $modelLangs, | |
| 38 | - 'parentCategories' => $parentCategories, | |
| 39 | - ] | |
| 40 | - ) ?> | |
| 41 | - | |
| 42 | -</div> |
common/modules/blog/views/blog-category/view.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogCategory; | |
| 4 | - use yii\helpers\Html; | |
| 5 | - use yii\web\View; | |
| 6 | - use yii\widgets\DetailView; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogCategory $model | |
| 11 | - */ | |
| 12 | - | |
| 13 | - $this->title = $model->lang->title; | |
| 14 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 15 | - 'label' => \Yii::t('blog', 'Blog Categories'), | |
| 16 | - 'url' => [ 'index' ], | |
| 17 | - ]; | |
| 18 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 19 | -?> | |
| 20 | -<div class="blog-category-view"> | |
| 21 | - | |
| 22 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 23 | - | |
| 24 | - <p> | |
| 25 | - <?= Html::a( | |
| 26 | - 'Update', | |
| 27 | - [ | |
| 28 | - 'update', | |
| 29 | - 'id' => $model->id, | |
| 30 | - ], | |
| 31 | - [ 'class' => 'btn btn-primary' ] | |
| 32 | - ) ?> | |
| 33 | - <?= Html::a( | |
| 34 | - 'Delete', | |
| 35 | - [ | |
| 36 | - 'delete', | |
| 37 | - 'id' => $model->id, | |
| 38 | - ], | |
| 39 | - [ | |
| 40 | - 'class' => 'btn btn-danger', | |
| 41 | - 'data' => [ | |
| 42 | - 'confirm' => 'Are you sure you want to delete this item?', | |
| 43 | - 'method' => 'post', | |
| 44 | - ], | |
| 45 | - ] | |
| 46 | - ) ?> | |
| 47 | - </p> | |
| 48 | - | |
| 49 | - <?= DetailView::widget( | |
| 50 | - [ | |
| 51 | - 'model' => $model, | |
| 52 | - 'attributes' => [ | |
| 53 | - 'id', | |
| 54 | - 'sort', | |
| 55 | - 'imageUrl:image', | |
| 56 | - [ | |
| 57 | - 'attribute' => 'parent_id', | |
| 58 | - 'value' => ( !empty( $model->parent ) ) ? $model->parent->lang->title : '', | |
| 59 | - ], | |
| 60 | - 'lang.alias', | |
| 61 | - 'lang.description:text', | |
| 62 | - [ | |
| 63 | - 'attribute' => 'status', | |
| 64 | - 'value' => ( $model->status ) ? \Yii::t('blog', 'Active') : \Yii::t('blog', 'Not active'), | |
| 65 | - ], | |
| 66 | - ], | |
| 67 | - ] | |
| 68 | - ) ?> | |
| 69 | - | |
| 70 | -</div> |
common/modules/blog/views/blog-tag/_form.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogTag; | |
| 4 | - use common\modules\blog\models\BlogTagLang; | |
| 5 | - use yii\helpers\Html; | |
| 6 | - use yii\web\View; | |
| 7 | - use yii\widgets\ActiveForm; | |
| 8 | - use common\modules\language\widgets\LanguageForm; | |
| 9 | - | |
| 10 | - /** | |
| 11 | - * @var View $this | |
| 12 | - * @var BlogTag $model | |
| 13 | - * @var ActiveForm $form | |
| 14 | - * @var BlogTagLang[] $modelLangs | |
| 15 | - */ | |
| 16 | -?> | |
| 17 | - | |
| 18 | -<div class="blog-tag-form"> | |
| 19 | - | |
| 20 | - <?php $form = ActiveForm::begin(); ?> | |
| 21 | - | |
| 22 | - <?php | |
| 23 | - echo LanguageForm::widget( | |
| 24 | - [ | |
| 25 | - 'modelLangs' => $modelLangs, | |
| 26 | - 'formView' => '@common/modules/blog/views/blog-tag/_form_language', | |
| 27 | - 'form' => $form, | |
| 28 | - ] | |
| 29 | - ); | |
| 30 | - ?> | |
| 31 | - | |
| 32 | - <div class="form-group"> | |
| 33 | - <?= Html::submitButton( | |
| 34 | - $model->isNewRecord ? 'Create' : 'Update', | |
| 35 | - [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ] | |
| 36 | - ) ?> | |
| 37 | - </div> | |
| 38 | - | |
| 39 | - <?php ActiveForm::end(); ?> | |
| 40 | - | |
| 41 | -</div> |
common/modules/blog/views/blog-tag/_form_language.php deleted
| 1 | -<?php | |
| 2 | - use common\models\ArticleLang; | |
| 3 | - use common\modules\language\models\Language; | |
| 4 | - use yii\web\View; | |
| 5 | - use yii\widgets\ActiveForm; | |
| 6 | - | |
| 7 | - /** | |
| 8 | - * @var ArticleLang $model_lang | |
| 9 | - * @var Language $language | |
| 10 | - * @var ActiveForm $form | |
| 11 | - * @var View $this | |
| 12 | - */ | |
| 13 | -?> | |
| 14 | -<?= $form->field($model_lang, '[' . $language->id . ']label') | |
| 15 | - ->textInput([ 'maxlength' => true ]); ?> |
common/modules/blog/views/blog-tag/_search.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\helpers\Html; | |
| 4 | -use yii\widgets\ActiveForm; | |
| 5 | - | |
| 6 | -/* @var $this yii\web\View */ | |
| 7 | -/* @var $model common\modules\blog\models\BlogTagSearch */ | |
| 8 | -/* @var $form yii\widgets\ActiveForm */ | |
| 9 | -?> | |
| 10 | - | |
| 11 | -<div class="blog-tag-search"> | |
| 12 | - | |
| 13 | - <?php $form = ActiveForm::begin([ | |
| 14 | - 'action' => ['index'], | |
| 15 | - 'method' => 'get', | |
| 16 | - ]); ?> | |
| 17 | - | |
| 18 | - <?= $form->field($model, 'id') ?> | |
| 19 | - | |
| 20 | - <div class="form-group"> | |
| 21 | - <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?> | |
| 22 | - <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?> | |
| 23 | - </div> | |
| 24 | - | |
| 25 | - <?php ActiveForm::end(); ?> | |
| 26 | - | |
| 27 | -</div> |
common/modules/blog/views/blog-tag/create.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogTag; | |
| 4 | - use common\modules\blog\models\BlogTagLang; | |
| 5 | - use yii\helpers\Html; | |
| 6 | - use yii\web\View; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogTagLang[] $modelLangs | |
| 11 | - * @var BlogTag $model | |
| 12 | - */ | |
| 13 | - | |
| 14 | - $this->title = \Yii::t('blog', 'Create Blog Tag'); | |
| 15 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 16 | - 'label' => \Yii::t('blog', 'Blog Tags'), | |
| 17 | - 'url' => [ 'index' ], | |
| 18 | - ]; | |
| 19 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 20 | -?> | |
| 21 | -<div class="blog-tag-create"> | |
| 22 | - | |
| 23 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 24 | - | |
| 25 | - <?= $this->render( | |
| 26 | - '_form', | |
| 27 | - [ | |
| 28 | - 'model' => $model, | |
| 29 | - 'modelLangs' => $modelLangs, | |
| 30 | - ] | |
| 31 | - ) ?> | |
| 32 | - | |
| 33 | -</div> |
common/modules/blog/views/blog-tag/index.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogTagSearch; | |
| 4 | - use yii\data\ActiveDataProvider; | |
| 5 | - use yii\helpers\Html; | |
| 6 | - use yii\grid\GridView; | |
| 7 | - use yii\web\View; | |
| 8 | - | |
| 9 | - /** | |
| 10 | - * @var View $this | |
| 11 | - * @var BlogTagSearch $searchModel | |
| 12 | - * @var ActiveDataProvider $dataProvider | |
| 13 | - */ | |
| 14 | - | |
| 15 | - $this->title = \Yii::t('blog', 'Blog Tags'); | |
| 16 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 17 | -?> | |
| 18 | -<div class="blog-tag-index"> | |
| 19 | - | |
| 20 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 21 | - <?php // echo $this->render('_search', ['model' => $searchModel]); ?> | |
| 22 | - | |
| 23 | - <p> | |
| 24 | - <?= Html::a(\Yii::t('blog', 'Create Blog Tag'), [ 'create' ], [ 'class' => 'btn btn-success' ]) ?> | |
| 25 | - </p> | |
| 26 | - <?= GridView::widget( | |
| 27 | - [ | |
| 28 | - 'dataProvider' => $dataProvider, | |
| 29 | - 'filterModel' => $searchModel, | |
| 30 | - 'columns' => [ | |
| 31 | - 'id', | |
| 32 | - [ | |
| 33 | - 'attribute' => 'label', | |
| 34 | - 'value' => 'lang.label', | |
| 35 | - ], | |
| 36 | - [ | |
| 37 | - 'class' => 'yii\grid\ActionColumn', | |
| 38 | - ], | |
| 39 | - ], | |
| 40 | - ] | |
| 41 | - ); ?> | |
| 42 | -</div> |
common/modules/blog/views/blog-tag/update.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogTag; | |
| 4 | - use common\modules\blog\models\BlogTagLang; | |
| 5 | - use yii\helpers\Html; | |
| 6 | - use yii\web\View; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogTagLang[] $modelLangs | |
| 11 | - * @var BlogTag $model | |
| 12 | - */ | |
| 13 | - | |
| 14 | - $this->title = \Yii::t('blog', 'Update Blog Tag: ') . $model->lang->label; | |
| 15 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 16 | - 'label' => \Yii::t('blog', 'Blog Tags'), | |
| 17 | - 'url' => [ 'index' ], | |
| 18 | - ]; | |
| 19 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 20 | - 'label' => $model->lang->label, | |
| 21 | - 'url' => [ | |
| 22 | - 'view', | |
| 23 | - 'id' => $model->id, | |
| 24 | - ], | |
| 25 | - ]; | |
| 26 | - $this->params[ 'breadcrumbs' ][] = \Yii::t('blog', 'Update'); | |
| 27 | -?> | |
| 28 | -<div class="blog-tag-update"> | |
| 29 | - | |
| 30 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 31 | - | |
| 32 | - <?= $this->render( | |
| 33 | - '_form', | |
| 34 | - [ | |
| 35 | - 'model' => $model, | |
| 36 | - 'modelLangs' => $modelLangs, | |
| 37 | - ] | |
| 38 | - ) ?> | |
| 39 | - | |
| 40 | -</div> |
common/modules/blog/views/blog-tag/view.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | - use common\modules\blog\models\BlogTag; | |
| 4 | - use yii\helpers\Html; | |
| 5 | - use yii\web\View; | |
| 6 | - use yii\widgets\DetailView; | |
| 7 | - | |
| 8 | - /** | |
| 9 | - * @var View $this | |
| 10 | - * @var BlogTag $model | |
| 11 | - */ | |
| 12 | - | |
| 13 | - $this->title = $model->lang->label; | |
| 14 | - $this->params[ 'breadcrumbs' ][] = [ | |
| 15 | - 'label' => \Yii::t('blog', 'Blog Tags'), | |
| 16 | - 'url' => [ 'index' ], | |
| 17 | - ]; | |
| 18 | - $this->params[ 'breadcrumbs' ][] = $this->title; | |
| 19 | -?> | |
| 20 | -<div class="blog-tag-view"> | |
| 21 | - | |
| 22 | - <h1><?= Html::encode($this->title) ?></h1> | |
| 23 | - | |
| 24 | - <p> | |
| 25 | - <?= Html::a( | |
| 26 | - 'Update', | |
| 27 | - [ | |
| 28 | - 'update', | |
| 29 | - 'id' => $model->id, | |
| 30 | - ], | |
| 31 | - [ 'class' => 'btn btn-primary' ] | |
| 32 | - ) ?> | |
| 33 | - <?= Html::a( | |
| 34 | - 'Delete', | |
| 35 | - [ | |
| 36 | - 'delete', | |
| 37 | - 'id' => $model->id, | |
| 38 | - ], | |
| 39 | - [ | |
| 40 | - 'class' => 'btn btn-danger', | |
| 41 | - 'data' => [ | |
| 42 | - 'confirm' => 'Are you sure you want to delete this item?', | |
| 43 | - 'method' => 'post', | |
| 44 | - ], | |
| 45 | - ] | |
| 46 | - ) ?> | |
| 47 | - </p> | |
| 48 | - | |
| 49 | - <?= DetailView::widget( | |
| 50 | - [ | |
| 51 | - 'model' => $model, | |
| 52 | - 'attributes' => [ | |
| 53 | - 'id', | |
| 54 | - 'lang.label', | |
| 55 | - ], | |
| 56 | - ] | |
| 57 | - ) ?> | |
| 58 | - | |
| 59 | -</div> |
common/modules/blog/views/default/index.php deleted
| 1 | -<div class="blog-default-index"> | |
| 2 | - <h1><?= $this->context->action->uniqueId ?></h1> | |
| 3 | - <p> | |
| 4 | - This is the view content for action "<?= $this->context->action->id ?>". | |
| 5 | - The action belongs to the controller "<?= get_class($this->context) ?>" | |
| 6 | - in the "<?= $this->context->module->id ?>" module. | |
| 7 | - </p> | |
| 8 | - <p> | |
| 9 | - You may customize this page by editing the following file:<br> | |
| 10 | - <code><?= __FILE__ ?></code> | |
| 11 | - </p> | |
| 12 | -</div> |
common/modules/product/helpers/ProductHelper.php
| ... | ... | @@ -2,83 +2,32 @@ |
| 2 | 2 | |
| 3 | 3 | namespace common\modules\product\helpers; |
| 4 | 4 | |
| 5 | - use common\modules\product\models\Brand; | |
| 6 | 5 | use common\modules\product\models\Category; |
| 7 | 6 | use common\modules\product\models\Product; |
| 8 | - use common\modules\product\models\ProductVariant; | |
| 9 | 7 | use yii\base\Object; |
| 10 | 8 | use Yii; |
| 11 | 9 | use yii\db\ActiveQuery; |
| 10 | + use yii\helpers\ArrayHelper; | |
| 12 | 11 | |
| 13 | 12 | class ProductHelper extends Object |
| 14 | 13 | { |
| 15 | 14 | |
| 16 | - const PRODUCT_TAX_GROUP_ID_TARGET = 20; | |
| 17 | - const PRODUCT_TAX_GROUP_ID_YEAR = 21; | |
| 18 | - const PRODUCT_TAX_GROUP_ID_SEX = 22; | |
| 19 | - | |
| 15 | + /** | |
| 16 | + * @todo ArtboxTree | |
| 17 | + * @return array | |
| 18 | + */ | |
| 20 | 19 | public static function getCategories() |
| 21 | 20 | { |
| 22 | 21 | return Category::find() |
| 23 | 22 | ->getTree(null, 'lang'); |
| 24 | 23 | } |
| 25 | 24 | |
| 26 | - public static function getBrands() | |
| 27 | - { | |
| 28 | - return Brand::find(); | |
| 29 | - } | |
| 30 | - | |
| 31 | - /* | |
| 32 | - * Return custom filter-option link | |
| 33 | - * @var array $filter | |
| 34 | - * @var array $options | |
| 35 | - * @return array | |
| 25 | + /** | |
| 26 | + * Add $product_id to last products in session. Limit 16 products. | |
| 27 | + * | |
| 28 | + * @param int $product_id | |
| 36 | 29 | */ |
| 37 | - public static function getFilterForOption($filter, $key, $value, $remove = false) | |
| 38 | - { | |
| 39 | - $result = $filter; | |
| 40 | - if (is_array($value)) { | |
| 41 | - foreach ($value as $value_key => $value_items) { | |
| 42 | - if (!is_array($value_items)) { | |
| 43 | - $value_items = [ $value_items ]; | |
| 44 | - } | |
| 45 | - foreach ($value_items as $value_item) { | |
| 46 | - if ($remove && isset( $result[ $key ] ) && ( $i = array_search( | |
| 47 | - $value_item, | |
| 48 | - $result[ $key ][ $value_key ] | |
| 49 | - ) ) !== false | |
| 50 | - ) { | |
| 51 | - unset( $result[ $key ][ $value_key ][ $i ] ); | |
| 52 | - if (empty( $result[ $key ][ $value_key ] )) { | |
| 53 | - unset( $result[ $key ][ $value_key ] ); | |
| 54 | - } | |
| 55 | - } else { | |
| 56 | - if (!isset( $result[ $key ][ $value_key ] ) || array_search( | |
| 57 | - $value_item, | |
| 58 | - $result[ $key ][ $value_key ] | |
| 59 | - ) === false | |
| 60 | - ) { | |
| 61 | - $result[ $key ][ $value_key ][] = $value_item; | |
| 62 | - } | |
| 63 | - } | |
| 64 | - } | |
| 65 | - } | |
| 66 | - } else { | |
| 67 | - if ($remove && isset( $result[ $key ] ) && ( $i = array_search($value, $result[ $key ]) ) !== false) { | |
| 68 | - unset( $result[ $key ][ $i ] ); | |
| 69 | - if (empty( $result[ $key ] )) { | |
| 70 | - unset( $result[ $key ] ); | |
| 71 | - } | |
| 72 | - } else { | |
| 73 | - if (!isset( $result[ $key ] ) || array_search($value, $result[ $key ]) === false) { | |
| 74 | - $result[ $key ][] = $value; | |
| 75 | - } | |
| 76 | - } | |
| 77 | - } | |
| 78 | - return $result; | |
| 79 | - } | |
| 80 | - | |
| 81 | - public static function addLastProsucts($product_id) | |
| 30 | + public static function addLastProducts(int $product_id) | |
| 82 | 31 | { |
| 83 | 32 | $last_products = self::getLastProducts(); |
| 84 | 33 | if (!in_array($product_id, $last_products)) { |
| ... | ... | @@ -90,28 +39,48 @@ |
| 90 | 39 | } |
| 91 | 40 | } |
| 92 | 41 | |
| 93 | - public static function getLastProducts($as_object = false) | |
| 42 | + /** | |
| 43 | + * Get last products ids from session or last Product models with ProductVariant, which are in stock if | |
| 44 | + * $as_object is true | |
| 45 | + * | |
| 46 | + * @param bool $as_object | |
| 47 | + * | |
| 48 | + * @return array | |
| 49 | + */ | |
| 50 | + public static function getLastProducts(bool $as_object = false) | |
| 94 | 51 | { |
| 95 | 52 | $last_products = Yii::$app->session->get('last_products', []); |
| 96 | 53 | if ($as_object) { |
| 97 | 54 | $last_products = Product::find() |
| 98 | 55 | ->joinWith([ 'variant' ]) |
| 99 | - ->where([ Product::tableName() . '.id' => $last_products ]) | |
| 56 | + ->where([ 'product.id' => $last_products ]) | |
| 100 | 57 | ->andWhere( |
| 101 | 58 | [ |
| 102 | 59 | '!=', |
| 103 | - ProductVariant::tableName() . '.stock', | |
| 60 | + 'product_variant.stock', | |
| 104 | 61 | 0, |
| 105 | 62 | ] |
| 106 | 63 | ) |
| 64 | + ->indexBy('id') | |
| 107 | 65 | ->all(); |
| 108 | 66 | } |
| 109 | 67 | return array_reverse($last_products); |
| 110 | 68 | } |
| 111 | 69 | |
| 112 | - public static function getSpecialProducts($type, $count, $sort = null) | |
| 70 | + /** | |
| 71 | + * Get special Products array with ProductVariants, which are in stock | |
| 72 | + * Available types: | |
| 73 | + * * top | |
| 74 | + * * new | |
| 75 | + * * promo | |
| 76 | + * | |
| 77 | + * @param string $type | |
| 78 | + * @param int $count | |
| 79 | + * | |
| 80 | + * @return Product[] | |
| 81 | + */ | |
| 82 | + public static function getSpecialProducts(string $type, int $count) | |
| 113 | 83 | { |
| 114 | - $data = []; | |
| 115 | 84 | switch ($type) { |
| 116 | 85 | case 'top': |
| 117 | 86 | $data = [ 'is_top' => true ]; |
| ... | ... | @@ -122,6 +91,9 @@ |
| 122 | 91 | case 'promo': |
| 123 | 92 | $data = [ 'is_discount' => true ]; |
| 124 | 93 | break; |
| 94 | + default: | |
| 95 | + return []; | |
| 96 | + break; | |
| 125 | 97 | } |
| 126 | 98 | return Product::find() |
| 127 | 99 | ->with('lang') |
| ... | ... | @@ -130,7 +102,7 @@ |
| 130 | 102 | ->andWhere( |
| 131 | 103 | [ |
| 132 | 104 | '!=', |
| 133 | - ProductVariant::tableName() . '.stock', | |
| 105 | + 'productVariant.stock', | |
| 134 | 106 | 0, |
| 135 | 107 | ] |
| 136 | 108 | ) |
| ... | ... | @@ -139,52 +111,44 @@ |
| 139 | 111 | } |
| 140 | 112 | |
| 141 | 113 | /** |
| 114 | + * Get ActiveQuery to get similar products to $product | |
| 115 | + * | |
| 142 | 116 | * @param Product $product |
| 143 | 117 | * @param int $count |
| 144 | 118 | * |
| 145 | - * @return array|\yii\db\ActiveRecord[] | |
| 119 | + * @return ActiveQuery | |
| 146 | 120 | */ |
| 147 | - public static function getSimilarProducts($product, $count = 10) | |
| 121 | + public static function getSimilarProducts(Product $product, $count = 10): ActiveQuery | |
| 148 | 122 | { |
| 149 | - if (!is_object($product)) { | |
| 150 | - $product = Product::find() | |
| 151 | - ->where([ 'id' => $product ]) | |
| 152 | - ->with('enabledVariants') | |
| 153 | - ->one(); | |
| 154 | - } | |
| 155 | - | |
| 156 | - if (!$product->properties) { | |
| 157 | - return []; | |
| 123 | + $query = Product::find(); | |
| 124 | + if (empty( $product->properties )) { | |
| 125 | + $query->where('0 = 1'); | |
| 126 | + return $query; | |
| 158 | 127 | } |
| 159 | - $product_categories = []; | |
| 160 | - foreach ($product->categories as $category) { | |
| 161 | - $product_categories[] = $category->id; | |
| 162 | - } | |
| 163 | - $query = Product::find() | |
| 164 | - ->select('product.id') | |
| 165 | - ->innerJoinWith('variant') | |
| 166 | - ->joinWith('category') | |
| 167 | - ->where( | |
| 168 | - [ | |
| 169 | - '!=', | |
| 170 | - 'product_variant.stock', | |
| 171 | - 0, | |
| 172 | - ] | |
| 173 | - ) | |
| 174 | - ->andWhere([ 'product_category.category_id' => $product_categories ]); | |
| 128 | + $query->innerJoinWith('variants') | |
| 129 | + ->joinWith('categories') | |
| 130 | + ->where( | |
| 131 | + [ | |
| 132 | + '!=', | |
| 133 | + 'product_variant.stock', | |
| 134 | + 0, | |
| 135 | + ] | |
| 136 | + ) | |
| 137 | + ->andWhere( | |
| 138 | + [ 'product_category.category_id' => ArrayHelper::getColumn($product->categories, 'id') ] | |
| 139 | + ); | |
| 140 | + $options = []; | |
| 175 | 141 | foreach ($product->properties as $group) { |
| 176 | - $where = []; | |
| 177 | 142 | foreach ($group->options as $option) { |
| 178 | - $where[] = $option->tax_option_id; | |
| 179 | - } | |
| 180 | - if (!$where) { | |
| 181 | - continue; | |
| 143 | + $options[] = $option->id; | |
| 182 | 144 | } |
| 183 | - $query->innerJoin( | |
| 184 | - 'product_option to' . $group->tax_group_id, | |
| 185 | - 'to' . $group->tax_group_id . '.product_id = product.id' | |
| 186 | - ); | |
| 187 | - $query->andWhere([ 'to' . $group->tax_group_id . '.option_id' => $where ]); | |
| 145 | + } | |
| 146 | + if (!empty( $options )) { | |
| 147 | + $query->innerJoinWith('options') | |
| 148 | + ->andWhere([ 'product_option.option_id' => $options ]); | |
| 149 | + } else { | |
| 150 | + $query->where('0 = 1'); | |
| 151 | + return $query; | |
| 188 | 152 | } |
| 189 | 153 | $query->andWhere( |
| 190 | 154 | [ |
| ... | ... | @@ -195,161 +159,25 @@ |
| 195 | 159 | ); |
| 196 | 160 | $query->groupBy('product.id'); |
| 197 | 161 | $query->limit($count); |
| 198 | - $products = $query->asArray() | |
| 199 | - ->all(); | |
| 200 | - foreach ($products as &$_product) { | |
| 201 | - $_product = Product::findOne($_product[ 'id' ]); | |
| 202 | - } | |
| 203 | - return $products; | |
| 162 | + return $query; | |
| 204 | 163 | } |
| 205 | 164 | |
| 206 | 165 | /** |
| 207 | - * @todo Refactor | |
| 166 | + * Add last category id to session | |
| 208 | 167 | * |
| 209 | - * @param ActiveQuery $query | |
| 210 | - * @param $params | |
| 211 | - * @param bool $setPriceLimits | |
| 168 | + * @param int $category_id | |
| 212 | 169 | */ |
| 213 | - public static function setQueryParams(&$query, $params, $setPriceLimits = true) | |
| 170 | + public static function addLastCategory(int $category_id) | |
| 214 | 171 | { |
| 215 | - if (!empty( $params[ 'keywords' ] )) { | |
| 216 | - if (!is_array($params[ 'keywords' ])) { | |
| 217 | - $params[ 'keywords' ] = [ $params[ 'keywords' ] ]; | |
| 218 | - } | |
| 219 | - foreach ($params[ 'keywords' ] as $keyword) { | |
| 220 | - $query->orFilterWhere( | |
| 221 | - [ | |
| 222 | - 'ilike', | |
| 223 | - Product::tableName() . '.name', | |
| 224 | - $keyword, | |
| 225 | - ] | |
| 226 | - ); | |
| 227 | - $query->orFilterWhere( | |
| 228 | - [ | |
| 229 | - 'ilike', | |
| 230 | - Brand::tableName() . '.name', | |
| 231 | - $keyword, | |
| 232 | - ] | |
| 233 | - ); | |
| 234 | - $query->orFilterWhere( | |
| 235 | - [ | |
| 236 | - 'ilike', | |
| 237 | - Category::tableName() . '.name', | |
| 238 | - $keyword, | |
| 239 | - ] | |
| 240 | - ); | |
| 241 | - $query->orFilterWhere( | |
| 242 | - [ | |
| 243 | - 'ilike', | |
| 244 | - ProductVariant::tableName() . '.sku', | |
| 245 | - $keyword, | |
| 246 | - ] | |
| 247 | - ); | |
| 248 | - } | |
| 249 | - } | |
| 250 | - | |
| 251 | - foreach ($params as $key => $param) { | |
| 252 | - | |
| 253 | - switch ($key) { | |
| 254 | - case 'special': | |
| 255 | - foreach ($param as $inner_key => $value) { | |
| 256 | - $query->orFilterWhere([ Product::tableName() . '.' . $inner_key => $value ]); | |
| 257 | - } | |
| 258 | - break; | |
| 259 | - case 'brands': | |
| 260 | - $query->andFilterWhere([ Product::tableName() . '.brand_id' => $param ]); | |
| 261 | - break; | |
| 262 | - case 'keywords': | |
| 263 | - break; | |
| 264 | - case 'prices': | |
| 265 | - if ($param[ 'min' ] > 0) { | |
| 266 | - $query->andWhere( | |
| 267 | - [ | |
| 268 | - '>=', | |
| 269 | - ProductVariant::tableName() . '.price', | |
| 270 | - $param[ 'min' ], | |
| 271 | - ] | |
| 272 | - ); | |
| 273 | - } | |
| 274 | - if ($param[ 'max' ] > 0) { | |
| 275 | - $query->andWhere( | |
| 276 | - [ | |
| 277 | - '<=', | |
| 278 | - ProductVariant::tableName() . '.price', | |
| 279 | - $param[ 'max' ], | |
| 280 | - ] | |
| 281 | - ); | |
| 282 | - } | |
| 283 | - break; | |
| 284 | - default: | |
| 285 | - /** | |
| 286 | - * @todo Refactor this | |
| 287 | - */ | |
| 288 | - $query->andWhere( | |
| 289 | - Product::tableName() . '.id IN ( | |
| 290 | - SELECT DISTINCT products | |
| 291 | - FROM ( | |
| 292 | - SELECT id AS products | |
| 293 | - FROM product_option | |
| 294 | - INNER JOIN tax_option ON tax_option.tax_option_id = product_option.option_id | |
| 295 | - INNER JOIN tax_group ON tax_group.tax_group_id = tax_option.tax_group_id | |
| 296 | - WHERE tax_group.alias LIKE \'' . $key . '\' AND tax_option.alias IN (\'' . implode( | |
| 297 | - '\',\'', | |
| 298 | - $param | |
| 299 | - ) . '\') OR product_id IN ( | |
| 300 | - (SELECT product_id AS products | |
| 301 | - FROM product_variant_option | |
| 302 | - INNER JOIN product_variant ON product_variant_option.product_variant_id = product_variant.id | |
| 303 | - INNER JOIN tax_option ON tax_option.tax_option_id = product_variant_option.option_id | |
| 304 | - INNER JOIN tax_group ON tax_group.tax_group_id = tax_option.tax_group_id | |
| 305 | - WHERE tax_group.alias LIKE \'' . $key . '\' AND tax_option.alias IN (\'' . implode( | |
| 306 | - '\',\'', | |
| 307 | - $param | |
| 308 | - ) . '\')) | |
| 309 | - ) | |
| 310 | - ) AS table_name | |
| 311 | - )' | |
| 312 | - ); | |
| 313 | - break; | |
| 314 | - } | |
| 315 | - | |
| 316 | - } | |
| 317 | - | |
| 172 | + \Yii::$app->session->set('last_category_id', $category_id); | |
| 318 | 173 | } |
| 319 | 174 | |
| 320 | 175 | /** |
| 321 | - * @param null|Category $category | |
| 322 | - * @param array $params | |
| 323 | - * @param array $excludeKeys | |
| 176 | + * Get last category id from session | |
| 324 | 177 | * |
| 325 | - * @return ActiveQuery | |
| 178 | + * @return int | |
| 326 | 179 | */ |
| 327 | - public static function productCountQuery($category = null, $params, $excludeKeys = []) | |
| 328 | - { | |
| 329 | - $p = []; | |
| 330 | - foreach ($params as $key => $param) { | |
| 331 | - if (in_array($key, $excludeKeys)) { | |
| 332 | - $p[ $key ] = $param; | |
| 333 | - } | |
| 334 | - } | |
| 335 | - /** @var ActiveQuery $query */ | |
| 336 | - if (!empty( $category )) { | |
| 337 | - $query = $category->getProducts(); | |
| 338 | - } else { | |
| 339 | - $query = Product::find(); | |
| 340 | - } | |
| 341 | - ProductHelper::setQueryParams($query, $params); | |
| 342 | - $query->select([ 'COUNT(product.id)' ]); | |
| 343 | - | |
| 344 | - return $query; | |
| 345 | - } | |
| 346 | - | |
| 347 | - public static function addLastCategory($category_id) | |
| 348 | - { | |
| 349 | - \Yii::$app->session->set('last_category_id', $category_id); | |
| 350 | - } | |
| 351 | - | |
| 352 | - public static function getLastCategory() | |
| 180 | + public static function getLastCategory(): int | |
| 353 | 181 | { |
| 354 | 182 | return \Yii::$app->session->get('last_category_id'); |
| 355 | 183 | } | ... | ... |
common/modules/product/models/Brand.php
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * This is the model class for table "brand". |
| 14 | + * | |
| 14 | 15 | * @property integer $id |
| 15 | 16 | * @property string $image |
| 16 | 17 | * @property bool $in_menu |
| ... | ... | @@ -45,9 +46,6 @@ |
| 45 | 46 | */ |
| 46 | 47 | class Brand extends ActiveRecord |
| 47 | 48 | { |
| 48 | - | |
| 49 | - public $itemsCount = 0; | |
| 50 | - | |
| 51 | 49 | /** |
| 52 | 50 | * @inheritdoc |
| 53 | 51 | */ |
| ... | ... | @@ -93,12 +91,14 @@ |
| 93 | 91 | public function attributeLabels() |
| 94 | 92 | { |
| 95 | 93 | return [ |
| 96 | - 'id' => Yii::t('product', 'Brand ID'), | |
| 97 | - 'image' => Yii::t('product', 'Image'), | |
| 94 | + 'id' => Yii::t('product', 'Brand ID'), | |
| 95 | + 'image' => Yii::t('product', 'Image'), | |
| 98 | 96 | ]; |
| 99 | 97 | } |
| 100 | 98 | |
| 101 | 99 | /** |
| 100 | + * Get all products with current brand | |
| 101 | + * | |
| 102 | 102 | * @return \yii\db\ActiveQuery |
| 103 | 103 | */ |
| 104 | 104 | public function getProducts() | ... | ... |
common/modules/product/models/Import.php
| ... | ... | @@ -11,11 +11,27 @@ |
| 11 | 11 | |
| 12 | 12 | class Import extends Model |
| 13 | 13 | { |
| 14 | - | |
| 14 | + /** | |
| 15 | + * Import csv file | |
| 16 | + * | |
| 17 | + * @var string $file | |
| 18 | + */ | |
| 15 | 19 | public $file; |
| 16 | 20 | |
| 21 | + /** | |
| 22 | + * Import type | |
| 23 | + * * product | |
| 24 | + * * price | |
| 25 | + * | |
| 26 | + * @var string $type | |
| 27 | + */ | |
| 17 | 28 | public $type; |
| 18 | 29 | |
| 30 | + /** | |
| 31 | + * Import language ID | |
| 32 | + * | |
| 33 | + * @var int $lang | |
| 34 | + */ | |
| 19 | 35 | public $lang; |
| 20 | 36 | |
| 21 | 37 | public $errors = []; |
| ... | ... | @@ -61,6 +77,12 @@ |
| 61 | 77 | ]; |
| 62 | 78 | } |
| 63 | 79 | |
| 80 | + /** | |
| 81 | + * Get import type | |
| 82 | + * | |
| 83 | + * @see Import::type | |
| 84 | + * @return string | |
| 85 | + */ | |
| 64 | 86 | public function getType() |
| 65 | 87 | { |
| 66 | 88 | if (!$this->type) { |
| ... | ... | @@ -69,6 +91,14 @@ |
| 69 | 91 | return $this->type; |
| 70 | 92 | } |
| 71 | 93 | |
| 94 | + /** | |
| 95 | + * Import prices | |
| 96 | + * | |
| 97 | + * @param int $from Start row | |
| 98 | + * @param null $limit Row limit | |
| 99 | + * | |
| 100 | + * @return array|bool Array if OK, false otherwise | |
| 101 | + */ | |
| 72 | 102 | public function goPrices($from = 0, $limit = null) |
| 73 | 103 | { |
| 74 | 104 | set_time_limit(0); |
| ... | ... | @@ -221,6 +251,8 @@ |
| 221 | 251 | } |
| 222 | 252 | |
| 223 | 253 | /** |
| 254 | + * Pull name and remote_id from formatted string | |
| 255 | + * | |
| 224 | 256 | * @param string $name |
| 225 | 257 | * |
| 226 | 258 | * @return array |
| ... | ... | @@ -243,9 +275,11 @@ |
| 243 | 275 | } |
| 244 | 276 | |
| 245 | 277 | /** |
| 278 | + * Save categories | |
| 279 | + * | |
| 246 | 280 | * @param array $catalog_names |
| 247 | 281 | * |
| 248 | - * @return array | |
| 282 | + * @return int[] Category IDs | |
| 249 | 283 | * @throws \Exception |
| 250 | 284 | */ |
| 251 | 285 | private function saveCatalog(array $catalog_names):array |
| ... | ... | @@ -289,9 +323,11 @@ |
| 289 | 323 | } |
| 290 | 324 | |
| 291 | 325 | /** |
| 292 | - * @param string|NULL $brand_name | |
| 326 | + * Save brand | |
| 327 | + * | |
| 328 | + * @param string|null $brand_name | |
| 293 | 329 | * |
| 294 | - * @return int|null | |
| 330 | + * @return int|null New Brand ID if inserted or exist or null if skipped | |
| 295 | 331 | * @throws \Exception |
| 296 | 332 | */ |
| 297 | 333 | private function saveBrand(string $brand_name = null):int |
| ... | ... | @@ -336,15 +372,16 @@ |
| 336 | 372 | } |
| 337 | 373 | |
| 338 | 374 | /** |
| 339 | - * @param array $fotos | |
| 340 | - * @param int $product_id | |
| 341 | - * @param int $product_variant_id | |
| 375 | + * Save Product or ProductVariant photoes | |
| 376 | + * | |
| 377 | + * @param string[] $fotos Photoes names | |
| 378 | + * @param int $product_id | |
| 379 | + * @param int|null $product_variant_id Null if photo for Product | |
| 342 | 380 | */ |
| 343 | 381 | private function saveFotos(array $fotos, int $product_id, int $product_variant_id = null) |
| 344 | 382 | { |
| 345 | 383 | if (!empty( $fotos )) { |
| 346 | 384 | foreach ($fotos as $foto) { |
| 347 | - | |
| 348 | 385 | if (empty( $foto )) { |
| 349 | 386 | continue; |
| 350 | 387 | } |
| ... | ... | @@ -371,10 +408,12 @@ |
| 371 | 408 | } |
| 372 | 409 | |
| 373 | 410 | /** |
| 374 | - * @param array $data | |
| 375 | - * @param float $product_cost_old | |
| 376 | - * @param int $product_id | |
| 377 | - * @param array $category_id | |
| 411 | + * Save ProductVariants | |
| 412 | + * | |
| 413 | + * @param array $data ProductVariats data | |
| 414 | + * @param float $product_cost_old Old price | |
| 415 | + * @param int $product_id Product ID | |
| 416 | + * @param array $category_id Ca | |
| 378 | 417 | * @param float|null $product_cost |
| 379 | 418 | * |
| 380 | 419 | * @return array |
| ... | ... | @@ -722,7 +761,7 @@ |
| 722 | 761 | $taxGroup->lang->save(false); |
| 723 | 762 | } else { |
| 724 | 763 | throw new \Exception( |
| 725 | - 'Tax group with ID ' . $taxGroup->tax_group_id . ' and lang ' . Language::getCurrent( | |
| 764 | + 'Tax group with ID ' . $taxGroup->id . ' and lang ' . Language::getCurrent( | |
| 726 | 765 | )->id . ' doesn\'t exist' |
| 727 | 766 | ); |
| 728 | 767 | } |
| ... | ... | @@ -751,7 +790,7 @@ |
| 751 | 790 | [ 'remote_id' => $parsed_option_name[ 'remote_id' ] ] |
| 752 | 791 | ) |
| 753 | 792 | ->andFilterWhere( |
| 754 | - [ 'tax_group_id' => $taxGroup->tax_group_id ] | |
| 793 | + [ 'tax_group_id' => $taxGroup->id ] | |
| 755 | 794 | ) |
| 756 | 795 | ->one() ) !== null |
| 757 | 796 | ) { |
| ... | ... | @@ -760,7 +799,7 @@ |
| 760 | 799 | $option->lang->save(false); |
| 761 | 800 | } else { |
| 762 | 801 | throw new \Exception( |
| 763 | - 'Tax option with ID ' . $option->tax_option_id . ' and lang ' . Language::getCurrent( | |
| 802 | + 'Tax option with ID ' . $option->id . ' and lang ' . Language::getCurrent( | |
| 764 | 803 | )->id . ' doesn\'t exist' |
| 765 | 804 | ); |
| 766 | 805 | } |
| ... | ... | @@ -772,10 +811,10 @@ |
| 772 | 811 | foreach ($option_langs as $option_lang) { |
| 773 | 812 | $option_lang->value = $parsed_option_name[ 'name' ]; |
| 774 | 813 | } |
| 775 | - $option->tax_group_id = $taxGroup->tax_group_id; | |
| 814 | + $option->id = $taxGroup->id; | |
| 776 | 815 | $option->save(false); |
| 777 | 816 | } |
| 778 | - $options[] = $option->tax_option_id; | |
| 817 | + $options[] = $option->id; | |
| 779 | 818 | } |
| 780 | 819 | } |
| 781 | 820 | return $options; | ... | ... |
common/translation/ru/blog.php deleted
| 1 | -<?php | |
| 2 | - return [ | |
| 3 | - 'Select category' => 'Выберите категорию ...', | |
| 4 | - 'Select tag' => 'Выберите тэг ...', | |
| 5 | - 'Has no parent rubric' => 'Без категории', | |
| 6 | - 'Waiting for results' => 'Загрузка ...', | |
| 7 | - 'Select related products' => 'Выберите сопутствующие товары', | |
| 8 | - 'Select related articles' => 'Выберите статьи', | |
| 9 | - 'Blog Articles' => 'Статьи блога', | |
| 10 | - 'Create Blog Article' => 'Создать статью', | |
| 11 | - 'Update Blog Article: ' => 'Обновить статью: ', | |
| 12 | - 'Not active' => 'Не активна', | |
| 13 | - 'Active' => 'Активна', | |
| 14 | - 'Are you sure you want to delete this item?' => 'Вы точно хотите это удалить ?', | |
| 15 | - 'Update' => 'Обновить', | |
| 16 | - 'Blog Categories' => 'Рубрики', | |
| 17 | - 'Create Blog Category' => 'Создать рубрику', | |
| 18 | - 'Update Blog Category: ' => 'Обновить рубрику: ', | |
| 19 | - 'Blog Tags' => 'Тэги', | |
| 20 | - 'Create Blog Tag' => 'Создать тэг', | |
| 21 | - 'Update Blog Tag: ' => 'Обновить тэг: ', | |
| 22 | - ]; | |
| 23 | 0 | \ No newline at end of file |
console/migrations/blog/m161101_142334_blog_article.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_142334_blog_article extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create main table with blog's articles | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_article', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'image' => $this->string(255), | |
| 17 | - 'created_at' => $this->integer(), | |
| 18 | - 'updated_at' => $this->integer(), | |
| 19 | - 'deleted_at' => $this->integer(), | |
| 20 | - 'sort' => $this->integer(), | |
| 21 | - 'status' => $this->boolean(), | |
| 22 | - 'author_id' => $this->integer(), | |
| 23 | - ] | |
| 24 | - ); | |
| 25 | - } | |
| 26 | - | |
| 27 | - public function down() | |
| 28 | - { | |
| 29 | - $this->dropTable('blog_article'); | |
| 30 | - } | |
| 31 | -} |
console/migrations/blog/m161101_142752_blog_article_lang.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_142752_blog_article_lang extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create table with language fields of blog articles | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_article_lang', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_article_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'language_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - 'title' => $this->string(255), | |
| 21 | - 'body' => $this->text(), | |
| 22 | - 'body_preview' => $this->text(), | |
| 23 | - 'alias' => $this->string(255), | |
| 24 | - 'meta_title' => $this->string(255), | |
| 25 | - 'meta_description' => $this->string(255), | |
| 26 | - 'h1' => $this->string(255), | |
| 27 | - 'seo_text' => $this->string(255), | |
| 28 | - ] | |
| 29 | - ); | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * Creating indexes for unique fields (field pairs) | |
| 33 | - */ | |
| 34 | - $this->createIndex( | |
| 35 | - 'blog_article_lang_uk', | |
| 36 | - 'blog_article_lang', | |
| 37 | - [ | |
| 38 | - 'blog_article_id', | |
| 39 | - 'language_id', | |
| 40 | - ], | |
| 41 | - true | |
| 42 | - ); | |
| 43 | - | |
| 44 | - $this->createIndex( | |
| 45 | - 'blog_article_alias_uk', | |
| 46 | - 'blog_article_lang', | |
| 47 | - 'alias', | |
| 48 | - true | |
| 49 | - ); | |
| 50 | - | |
| 51 | - /** | |
| 52 | - * Add foreign keys in blog_articles and language tables | |
| 53 | - */ | |
| 54 | - $this->addForeignKey( | |
| 55 | - 'blog_article_fk', | |
| 56 | - 'blog_article_lang', | |
| 57 | - 'blog_article_id', | |
| 58 | - 'blog_article', | |
| 59 | - 'id', | |
| 60 | - 'CASCADE', | |
| 61 | - 'CASCADE' | |
| 62 | - ); | |
| 63 | - | |
| 64 | - $this->addForeignKey( | |
| 65 | - 'blog_article_lang_fk', | |
| 66 | - 'blog_article_lang', | |
| 67 | - 'language_id', | |
| 68 | - 'language', | |
| 69 | - 'id', | |
| 70 | - 'RESTRICT', | |
| 71 | - 'CASCADE' | |
| 72 | - ); | |
| 73 | - } | |
| 74 | - | |
| 75 | - public function down() | |
| 76 | - { | |
| 77 | - $this->dropForeignKey('blog_article_lang_fk', 'blog_article_lang'); | |
| 78 | - $this->dropForeignKey('blog_article_fk', 'blog_article_lang'); | |
| 79 | - $this->dropIndex('blog_article_alias_uk', 'blog_article_lang'); | |
| 80 | - $this->dropIndex('blog_article_lang_uk', 'blog_article_lang'); | |
| 81 | - $this->dropTable('blog_article_lang'); | |
| 82 | - } | |
| 83 | -} |
console/migrations/blog/m161101_143033_blog_category.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_143033_blog_category extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create table for blog's categories | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_category', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'sort' => $this->integer(), | |
| 17 | - 'image' => $this->string(255), | |
| 18 | - 'parent_id' => $this->integer() | |
| 19 | - ->defaultValue(0), | |
| 20 | - 'status' => $this->boolean(), | |
| 21 | - ] | |
| 22 | - ); | |
| 23 | - } | |
| 24 | - | |
| 25 | - public function down() | |
| 26 | - { | |
| 27 | - $this->dropTable('blog_category'); | |
| 28 | - } | |
| 29 | -} |
console/migrations/blog/m161101_143259_blog_category_lang.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_143259_blog_category_lang extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Table for category languages | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_category_lang', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_category_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'language_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - 'title' => $this->string(255), | |
| 21 | - 'alias' => $this->string(255), | |
| 22 | - 'description' => $this->text(), | |
| 23 | - 'meta_title' => $this->string(255), | |
| 24 | - 'meta_description' => $this->string(255), | |
| 25 | - 'h1' => $this->string(255), | |
| 26 | - 'seo_text' => $this->string(255), | |
| 27 | - ] | |
| 28 | - ); | |
| 29 | - | |
| 30 | - /** | |
| 31 | - * Create unique indexes for language and alias | |
| 32 | - */ | |
| 33 | - $this->createIndex( | |
| 34 | - 'blog_category_lang_uk', | |
| 35 | - 'blog_category_lang', | |
| 36 | - [ | |
| 37 | - 'blog_category_id', | |
| 38 | - 'language_id', | |
| 39 | - ], | |
| 40 | - true | |
| 41 | - ); | |
| 42 | - | |
| 43 | - $this->createIndex( | |
| 44 | - 'blog_category_alias_uk', | |
| 45 | - 'blog_category_lang', | |
| 46 | - 'alias', | |
| 47 | - true | |
| 48 | - ); | |
| 49 | - | |
| 50 | - /** | |
| 51 | - * Add foreign keys for language tables | |
| 52 | - */ | |
| 53 | - $this->addForeignKey( | |
| 54 | - 'blog_category_fk', | |
| 55 | - 'blog_category_lang', | |
| 56 | - 'blog_category_id', | |
| 57 | - 'blog_category', | |
| 58 | - 'id', | |
| 59 | - 'CASCADE', | |
| 60 | - 'CASCADE' | |
| 61 | - ); | |
| 62 | - | |
| 63 | - $this->addForeignKey( | |
| 64 | - 'blog_category_lang_fk', | |
| 65 | - 'blog_category_lang', | |
| 66 | - 'language_id', | |
| 67 | - 'language', | |
| 68 | - 'id', | |
| 69 | - 'RESTRICT', | |
| 70 | - 'CASCADE' | |
| 71 | - ); | |
| 72 | - } | |
| 73 | - | |
| 74 | - public function down() | |
| 75 | - { | |
| 76 | - $this->dropForeignKey('blog_category_lang_fk', 'blog_category_lang'); | |
| 77 | - $this->dropForeignKey('blog_category_fk', 'blog_category_lang'); | |
| 78 | - $this->dropIndex('blog_category_alias_uk', 'blog_category_lang'); | |
| 79 | - $this->dropIndex('blog_category_lang_uk', 'blog_category_lang'); | |
| 80 | - $this->dropTable('blog_category_lang'); | |
| 81 | - } | |
| 82 | -} |
console/migrations/blog/m161101_143541_blog_article_to_category.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_143541_blog_article_to_category extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create junction table to connect articles with categories | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_article_to_category', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_article_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'blog_category_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - ] | |
| 21 | - ); | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * Add foreign keys and indexes for junction table | |
| 25 | - */ | |
| 26 | - $this->createIndex( | |
| 27 | - 'blog_article_to_category_uk', | |
| 28 | - 'blog_article_to_category', | |
| 29 | - [ | |
| 30 | - 'blog_article_id', | |
| 31 | - 'blog_category_id', | |
| 32 | - ], | |
| 33 | - true | |
| 34 | - ); | |
| 35 | - | |
| 36 | - $this->addForeignKey( | |
| 37 | - 'blog_article_to_category_art_fk', | |
| 38 | - 'blog_article_to_category', | |
| 39 | - 'blog_article_id', | |
| 40 | - 'blog_article', | |
| 41 | - 'id', | |
| 42 | - 'CASCADE', | |
| 43 | - 'CASCADE' | |
| 44 | - ); | |
| 45 | - | |
| 46 | - $this->addForeignKey( | |
| 47 | - 'blog_article_to_category_cat_fk', | |
| 48 | - 'blog_article_to_category', | |
| 49 | - 'blog_category_id', | |
| 50 | - 'blog_category', | |
| 51 | - 'id', | |
| 52 | - 'CASCADE', | |
| 53 | - 'CASCADE' | |
| 54 | - ); | |
| 55 | - } | |
| 56 | - | |
| 57 | - public function down() | |
| 58 | - { | |
| 59 | - $this->dropForeignKey('blog_article_to_category_cat_fk', 'blog_article_to_category'); | |
| 60 | - $this->dropForeignKey('blog_article_to_category_art_fk', 'blog_article_to_category'); | |
| 61 | - $this->dropIndex('blog_article_to_category_uk', 'blog_article_to_category'); | |
| 62 | - $this->dropTable('blog_article_to_category'); | |
| 63 | - } | |
| 64 | -} |
console/migrations/blog/m161101_143734_blog_tag.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_143734_blog_tag extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create table for tags | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_tag', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - ] | |
| 17 | - ); | |
| 18 | - } | |
| 19 | - | |
| 20 | - public function down() | |
| 21 | - { | |
| 22 | - $this->dropTable('blog_tag'); | |
| 23 | - } | |
| 24 | -} |
console/migrations/blog/m161101_143939_blog_tag_lang.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_143939_blog_tag_lang extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Tags can be in different languages | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_tag_lang', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_tag_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'language_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - 'label' => $this->string(255), | |
| 21 | - ] | |
| 22 | - ); | |
| 23 | - | |
| 24 | - /** | |
| 25 | - * Creating indexes and foreign keys for language table | |
| 26 | - */ | |
| 27 | - $this->createIndex( | |
| 28 | - 'blog_tag_lang_uk', | |
| 29 | - 'blog_tag_lang', | |
| 30 | - [ | |
| 31 | - 'blog_tag_id', | |
| 32 | - 'language_id', | |
| 33 | - ], | |
| 34 | - true | |
| 35 | - ); | |
| 36 | - | |
| 37 | - $this->addForeignKey( | |
| 38 | - 'blog_tag_lang_fk', | |
| 39 | - 'blog_tag_lang', | |
| 40 | - 'language_id', | |
| 41 | - 'language', | |
| 42 | - 'id', | |
| 43 | - 'RESTRICT', | |
| 44 | - 'CASCADE' | |
| 45 | - ); | |
| 46 | - | |
| 47 | - $this->addForeignKey( | |
| 48 | - 'blog_tag_fk', | |
| 49 | - 'blog_tag_lang', | |
| 50 | - 'blog_tag_id', | |
| 51 | - 'blog_tag', | |
| 52 | - 'id', | |
| 53 | - 'CASCADE', | |
| 54 | - 'CASCADE' | |
| 55 | - ); | |
| 56 | - } | |
| 57 | - | |
| 58 | - public function down() | |
| 59 | - { | |
| 60 | - $this->dropForeignKey('blog_tag_fk', 'blog_tag_lang'); | |
| 61 | - $this->dropForeignKey('blog_tag_lang_fk', 'blog_tag_lang'); | |
| 62 | - $this->dropIndex('blog_tag_lang_uk', 'blog_tag_lang'); | |
| 63 | - $this->dropTable('blog_tag_lang'); | |
| 64 | - } | |
| 65 | -} |
console/migrations/blog/m161101_144140_blog_article_to_tag.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_144140_blog_article_to_tag extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create junction table to connect articles with tags | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_article_to_tag', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_article_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'blog_tag_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - ] | |
| 21 | - ); | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * Create indexes and foreign keys for junction table | |
| 25 | - */ | |
| 26 | - $this->createIndex( | |
| 27 | - 'blog_article_to_tag_uk', | |
| 28 | - 'blog_article_to_tag', | |
| 29 | - [ | |
| 30 | - 'blog_article_id', | |
| 31 | - 'blog_tag_id', | |
| 32 | - ], | |
| 33 | - true | |
| 34 | - ); | |
| 35 | - | |
| 36 | - $this->addForeignKey( | |
| 37 | - 'blog_article_to_tag_tag_fk', | |
| 38 | - 'blog_article_to_tag', | |
| 39 | - 'blog_tag_id', | |
| 40 | - 'blog_tag', | |
| 41 | - 'id', | |
| 42 | - 'CASCADE', | |
| 43 | - 'CASCADE' | |
| 44 | - ); | |
| 45 | - | |
| 46 | - $this->addForeignKey( | |
| 47 | - 'blog_article_to_tag_art_fk', | |
| 48 | - 'blog_article_to_tag', | |
| 49 | - 'blog_article_id', | |
| 50 | - 'blog_article', | |
| 51 | - 'id', | |
| 52 | - 'CASCADE', | |
| 53 | - 'CASCADE' | |
| 54 | - ); | |
| 55 | - } | |
| 56 | - | |
| 57 | - public function down() | |
| 58 | - { | |
| 59 | - $this->dropForeignKey('blog_article_to_tag_art_fk', 'blog_article_to_tag'); | |
| 60 | - $this->dropForeignKey('blog_article_to_tag_tag_fk', 'blog_article_to_tag'); | |
| 61 | - $this->dropIndex('blog_article_to_tag_uk', 'blog_article_to_tag'); | |
| 62 | - $this->dropTable('blog_article_to_tag'); | |
| 63 | - } | |
| 64 | -} |
console/migrations/blog/m161101_144312_blog_article_to_article.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_144312_blog_article_to_article extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Create table and all relations for related articles functionality | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_article_to_article', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_article_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'related_blog_article_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - ] | |
| 21 | - ); | |
| 22 | - | |
| 23 | - $this->createIndex( | |
| 24 | - 'blog_article_to_article_uk', | |
| 25 | - 'blog_article_to_article', | |
| 26 | - [ | |
| 27 | - 'blog_article_id', | |
| 28 | - 'related_blog_article_id', | |
| 29 | - ], | |
| 30 | - true | |
| 31 | - ); | |
| 32 | - | |
| 33 | - $this->addForeignKey( | |
| 34 | - 'blog_article_to_article_art_fk', | |
| 35 | - 'blog_article_to_article', | |
| 36 | - 'blog_article_id', | |
| 37 | - 'blog_article', | |
| 38 | - 'id', | |
| 39 | - 'CASCADE', | |
| 40 | - 'CASCADE' | |
| 41 | - ); | |
| 42 | - | |
| 43 | - $this->addForeignKey( | |
| 44 | - 'blog_article_to_article_rel_fk', | |
| 45 | - 'blog_article_to_article', | |
| 46 | - 'related_blog_article_id', | |
| 47 | - 'blog_article', | |
| 48 | - 'id', | |
| 49 | - 'CASCADE', | |
| 50 | - 'CASCADE' | |
| 51 | - ); | |
| 52 | - } | |
| 53 | - | |
| 54 | - public function down() | |
| 55 | - { | |
| 56 | - $this->dropForeignKey('blog_article_to_article_rel_fk', 'blog_article_to_article'); | |
| 57 | - $this->dropForeignKey('blog_article_to_article_art_fk', 'blog_article_to_article'); | |
| 58 | - $this->dropIndex('blog_article_to_article_uk', 'blog_article_to_article'); | |
| 59 | - $this->dropTable('blog_article_to_article'); | |
| 60 | - } | |
| 61 | -} |
console/migrations/blog/m161101_144434_blog_article_to_product.php deleted
| 1 | -<?php | |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -class m161101_144434_blog_article_to_product extends Migration | |
| 6 | -{ | |
| 7 | - public function up() | |
| 8 | - { | |
| 9 | - /** | |
| 10 | - * Creates junction table and all stuff for adding related products to articles | |
| 11 | - */ | |
| 12 | - $this->createTable( | |
| 13 | - 'blog_article_to_product', | |
| 14 | - [ | |
| 15 | - 'id' => $this->primaryKey(), | |
| 16 | - 'blog_article_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'product_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - ] | |
| 21 | - ); | |
| 22 | - | |
| 23 | - $this->createIndex( | |
| 24 | - 'blog_article_to_product_uk', | |
| 25 | - 'blog_article_to_product', | |
| 26 | - [ | |
| 27 | - 'blog_article_id', | |
| 28 | - 'product_id', | |
| 29 | - ], | |
| 30 | - true | |
| 31 | - ); | |
| 32 | - | |
| 33 | - $this->addForeignKey( | |
| 34 | - 'blog_article_to_product_art_fk', | |
| 35 | - 'blog_article_to_product', | |
| 36 | - 'blog_article_id', | |
| 37 | - 'blog_article', | |
| 38 | - 'id', | |
| 39 | - 'CASCADE', | |
| 40 | - 'CASCADE' | |
| 41 | - ); | |
| 42 | - | |
| 43 | - $this->addForeignKey( | |
| 44 | - 'blog_article_to_product_prod_fk', | |
| 45 | - 'blog_article_to_product', | |
| 46 | - 'product_id', | |
| 47 | - 'product', | |
| 48 | - 'id', | |
| 49 | - 'CASCADE', | |
| 50 | - 'CASCADE' | |
| 51 | - ); | |
| 52 | - } | |
| 53 | - | |
| 54 | - public function down() | |
| 55 | - { | |
| 56 | - $this->dropForeignKey('blog_article_to_product_prod_fk', 'blog_article_to_product'); | |
| 57 | - $this->dropForeignKey('blog_article_to_product_art_fk', 'blog_article_to_product'); | |
| 58 | - $this->dropIndex('blog_article_to_product_uk', 'blog_article_to_product'); | |
| 59 | - $this->dropTable('blog_article_to_product'); | |
| 60 | - } | |
| 61 | -} |
console/migrations/m160930_145734_create_tax_group_lang_table.php
| ... | ... | @@ -13,22 +13,46 @@ |
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - $this->createTable('tax_group_lang', [ | |
| 17 | - 'tax_group_id' => $this->integer() | |
| 18 | - ->notNull(), | |
| 19 | - 'language_id' => $this->integer() | |
| 20 | - ->notNull(), | |
| 21 | - 'title' => $this->string() | |
| 22 | - ->notNull(), | |
| 23 | - 'description' => $this->text(), | |
| 24 | - ]); | |
| 25 | - $this->createIndex('tax_group_lang_tax_group_language_key', 'tax_group_lang', [ | |
| 16 | + $this->createTable( | |
| 17 | + 'tax_group_lang', | |
| 18 | + [ | |
| 19 | + 'tax_group_id' => $this->integer() | |
| 20 | + ->notNull(), | |
| 21 | + 'language_id' => $this->integer() | |
| 22 | + ->notNull(), | |
| 23 | + 'title' => $this->string() | |
| 24 | + ->notNull(), | |
| 25 | + 'description' => $this->text(), | |
| 26 | + ] | |
| 27 | + ); | |
| 28 | + $this->createIndex( | |
| 29 | + 'tax_group_lang_tax_group_language_key', | |
| 30 | + 'tax_group_lang', | |
| 31 | + [ | |
| 32 | + 'tax_group_id', | |
| 33 | + 'language_id', | |
| 34 | + ], | |
| 35 | + true | |
| 36 | + ); | |
| 37 | + | |
| 38 | + $this->addForeignKey( | |
| 39 | + 'tax_group_fk', | |
| 40 | + 'tax_group_lang', | |
| 26 | 41 | 'tax_group_id', |
| 42 | + 'tax_group', | |
| 43 | + 'id', | |
| 44 | + 'CASCADE', | |
| 45 | + 'CASCADE' | |
| 46 | + ); | |
| 47 | + $this->addForeignKey( | |
| 48 | + 'language_fk', | |
| 49 | + 'tax_group_lang', | |
| 27 | 50 | 'language_id', |
| 28 | - ], true); | |
| 29 | - | |
| 30 | - $this->addForeignKey('tax_group_fk', 'tax_group_lang', 'tax_group_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); | |
| 31 | - $this->addForeignKey('language_fk', 'tax_group_lang', 'language_id', 'language', 'id', 'RESTRICT', 'CASCADE'); | |
| 51 | + 'language', | |
| 52 | + 'id', | |
| 53 | + 'RESTRICT', | |
| 54 | + 'CASCADE' | |
| 55 | + ); | |
| 32 | 56 | } |
| 33 | 57 | |
| 34 | 58 | /** | ... | ... |
console/migrations/m160930_151832_create_tax_option_lang_table.php
| 1 | 1 | <?php |
| 2 | - | |
| 3 | -use yii\db\Migration; | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * Handles the creation for table `tax_option_lang`. | |
| 7 | - */ | |
| 8 | -class m160930_151832_create_tax_option_lang_table extends Migration | |
| 9 | -{ | |
| 10 | - /** | |
| 11 | - * @inheritdoc | |
| 12 | - */ | |
| 13 | - public function up() | |
| 14 | - { | |
| 15 | - $this->createTable('tax_option_lang', [ | |
| 16 | - 'tax_option_id' => $this->integer() | |
| 17 | - ->notNull(), | |
| 18 | - 'language_id' => $this->integer() | |
| 19 | - ->notNull(), | |
| 20 | - 'value' => $this->string() | |
| 21 | - ->notNull(), | |
| 22 | - ]); | |
| 23 | - $this->createIndex('tax_option_lang_tax_option_language_key', 'tax_option_lang', [ | |
| 24 | - 'tax_option_id', | |
| 25 | - 'language_id', | |
| 26 | - ], true); | |
| 27 | 2 | |
| 28 | - $this->addForeignKey('tax_option_fk', 'tax_option_lang', 'tax_option_id', 'tax_option', 'tax_option_id', 'CASCADE', 'CASCADE'); | |
| 29 | - $this->addForeignKey('language_fk', 'tax_option_lang', 'language_id', 'language', 'id', 'RESTRICT', 'CASCADE'); | |
| 30 | - } | |
| 31 | - | |
| 3 | + use yii\db\Migration; | |
| 4 | + | |
| 32 | 5 | /** |
| 33 | - * @inheritdoc | |
| 6 | + * Handles the creation for table `tax_option_lang`. | |
| 34 | 7 | */ |
| 35 | - public function down() | |
| 8 | + class m160930_151832_create_tax_option_lang_table extends Migration | |
| 36 | 9 | { |
| 37 | - $this->dropTable('tax_option_lang'); | |
| 10 | + /** | |
| 11 | + * @inheritdoc | |
| 12 | + */ | |
| 13 | + public function up() | |
| 14 | + { | |
| 15 | + $this->createTable( | |
| 16 | + 'tax_option_lang', | |
| 17 | + [ | |
| 18 | + 'tax_option_id' => $this->integer() | |
| 19 | + ->notNull(), | |
| 20 | + 'language_id' => $this->integer() | |
| 21 | + ->notNull(), | |
| 22 | + 'value' => $this->string() | |
| 23 | + ->notNull(), | |
| 24 | + ] | |
| 25 | + ); | |
| 26 | + $this->createIndex( | |
| 27 | + 'tax_option_lang_tax_option_language_key', | |
| 28 | + 'tax_option_lang', | |
| 29 | + [ | |
| 30 | + 'tax_option_id', | |
| 31 | + 'language_id', | |
| 32 | + ], | |
| 33 | + true | |
| 34 | + ); | |
| 35 | + | |
| 36 | + $this->addForeignKey( | |
| 37 | + 'tax_option_fk', | |
| 38 | + 'tax_option_lang', | |
| 39 | + 'tax_option_id', | |
| 40 | + 'tax_option', | |
| 41 | + 'id', | |
| 42 | + 'CASCADE', | |
| 43 | + 'CASCADE' | |
| 44 | + ); | |
| 45 | + $this->addForeignKey( | |
| 46 | + 'language_fk', | |
| 47 | + 'tax_option_lang', | |
| 48 | + 'language_id', | |
| 49 | + 'language', | |
| 50 | + 'id', | |
| 51 | + 'RESTRICT', | |
| 52 | + 'CASCADE' | |
| 53 | + ); | |
| 54 | + } | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * @inheritdoc | |
| 58 | + */ | |
| 59 | + public function down() | |
| 60 | + { | |
| 61 | + $this->dropTable('tax_option_lang'); | |
| 62 | + } | |
| 38 | 63 | } |
| 39 | -} | ... | ... |
frontend/controllers/SiteController.php
| ... | ... | @@ -56,13 +56,14 @@ |
| 56 | 56 | ], |
| 57 | 57 | 'captcha' => [ |
| 58 | 58 | 'class' => 'yii\captcha\CaptchaAction', |
| 59 | - 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : NULL, | |
| 59 | + 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, | |
| 60 | 60 | ], |
| 61 | 61 | ]; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Displays homepage. |
| 66 | + * | |
| 66 | 67 | * @return mixed |
| 67 | 68 | */ |
| 68 | 69 | public function actionIndex() | ... | ... |
storage/.htaccess