Commit 16ec77226cf5eb0e58e8205ddd5c92b88b95b4de
1 parent
0e2a89a2
-new migration
Showing
3 changed files
with
193 additions
and
26 deletions
Show diff stats
composer.json
@@ -35,7 +35,12 @@ | @@ -35,7 +35,12 @@ | ||
35 | "bower-asset/amcharts": "@dev", | 35 | "bower-asset/amcharts": "@dev", |
36 | "bower-asset/pnotify": "@dev", | 36 | "bower-asset/pnotify": "@dev", |
37 | "kartik-v/yii2-widget-colorinput": "*", | 37 | "kartik-v/yii2-widget-colorinput": "*", |
38 | - "kartik-v/yii2-widget-datepicker": "@dev" | 38 | + "kartik-v/yii2-widget-datepicker": "@dev", |
39 | + "artweb/artbox-core": "@dev", | ||
40 | + "artweb/artbox-weblog": "@dev", | ||
41 | + "artweb/artbox-order": "*", | ||
42 | + "artweb/artbox-catalog": "@dev" | ||
43 | + | ||
39 | }, | 44 | }, |
40 | "require-dev": { | 45 | "require-dev": { |
41 | "yiisoft/yii2-debug": "~2.0.0", | 46 | "yiisoft/yii2-debug": "~2.0.0", |
@@ -60,5 +65,24 @@ | @@ -60,5 +65,24 @@ | ||
60 | "artbox\\order\\": "artweb/artbox-order/", | 65 | "artbox\\order\\": "artweb/artbox-order/", |
61 | "artbox\\weblog\\": "artweb/artbox-weblog/" | 66 | "artbox\\weblog\\": "artweb/artbox-weblog/" |
62 | } | 67 | } |
63 | - } | 68 | + }, |
69 | + "repositories": [ | ||
70 | + { | ||
71 | + "type": "vcs", | ||
72 | + "url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-core.git" | ||
73 | + }, | ||
74 | + { | ||
75 | + "type": "vcs", | ||
76 | + "url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-catalog.git" | ||
77 | + }, | ||
78 | + { | ||
79 | + "type": "vcs", | ||
80 | + "url": "git@gitlab.artweb.com.ua:Alexey/artbox-weblog.git" | ||
81 | + }, | ||
82 | + { | ||
83 | + "type": "vcs", | ||
84 | + "url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-order.git" | ||
85 | + } | ||
86 | + | ||
87 | + ] | ||
64 | } | 88 | } |
composer.lock
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
6 | ], | 6 | ], |
7 | - "content-hash": "2651b25db443214aeb94e495e1ce3d28", | 7 | + "content-hash": "fd2019a6d9ac39b40a322f4c07cd03ae", |
8 | "packages": [ | 8 | "packages": [ |
9 | { | 9 | { |
10 | "name": "2amigos/yii2-tinymce-widget", | 10 | "name": "2amigos/yii2-tinymce-widget", |
@@ -67,6 +67,110 @@ | @@ -67,6 +67,110 @@ | ||
67 | "time": "2017-06-09T14:12:14+00:00" | 67 | "time": "2017-06-09T14:12:14+00:00" |
68 | }, | 68 | }, |
69 | { | 69 | { |
70 | + "name": "artweb/artbox-catalog", | ||
71 | + "version": "v0.0.3-stable", | ||
72 | + "source": { | ||
73 | + "type": "git", | ||
74 | + "url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-catalog.git", | ||
75 | + "reference": "78ed441d336057422c57d94198a59724be3dba5b" | ||
76 | + }, | ||
77 | + "require": { | ||
78 | + "php": ">=7.0", | ||
79 | + "yiisoft/yii2": "~2.0" | ||
80 | + }, | ||
81 | + "type": "yii2-extension", | ||
82 | + "autoload": { | ||
83 | + "psr-4": { | ||
84 | + "artbox\\catalog\\": "" | ||
85 | + } | ||
86 | + }, | ||
87 | + "license": [ | ||
88 | + "BSD-3-Clause" | ||
89 | + ], | ||
90 | + "description": "Artbox catalog extension", | ||
91 | + "time": "2017-05-19T09:02:58+00:00" | ||
92 | + }, | ||
93 | + { | ||
94 | + "name": "artweb/artbox-core", | ||
95 | + "version": "dev-master", | ||
96 | + "source": { | ||
97 | + "type": "git", | ||
98 | + "url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-core.git", | ||
99 | + "reference": "75bc9b4f6821a05d495a91cee26ceff5efc760e2" | ||
100 | + }, | ||
101 | + "require": { | ||
102 | + "2amigos/yii2-tinymce-widget": "~1.0", | ||
103 | + "bower-asset/amcharts": "*", | ||
104 | + "kartik-v/yii2-widget-fileinput": "*", | ||
105 | + "php": ">=7.0", | ||
106 | + "yiisoft/yii2": "~2.0", | ||
107 | + "yiisoft/yii2-bootstrap": "~2.0", | ||
108 | + "yiisoft/yii2-imagine": "~2.0", | ||
109 | + "yiisoft/yii2-swiftmailer": "~2.0", | ||
110 | + "yiister/yii2-gentelella": "~1.0" | ||
111 | + }, | ||
112 | + "type": "yii2-extension", | ||
113 | + "autoload": { | ||
114 | + "psr-4": { | ||
115 | + "artbox\\core\\": "" | ||
116 | + } | ||
117 | + }, | ||
118 | + "license": [ | ||
119 | + "BSD-3-Clause" | ||
120 | + ], | ||
121 | + "description": "Artbox core extension", | ||
122 | + "time": "2017-09-20 11:55:11" | ||
123 | + }, | ||
124 | + { | ||
125 | + "name": "artweb/artbox-order", | ||
126 | + "version": "v0.0.1-stable", | ||
127 | + "source": { | ||
128 | + "type": "git", | ||
129 | + "url": "git@gitlab.artweb.com.ua:yarik.nechyporuk/artbox-order.git", | ||
130 | + "reference": "32fd1c884de9e36d07b7e8f35cfe5f2279c55eec" | ||
131 | + }, | ||
132 | + "require": { | ||
133 | + "php": ">=7.0", | ||
134 | + "yiisoft/yii2": "~2.0" | ||
135 | + }, | ||
136 | + "type": "yii2-extension", | ||
137 | + "autoload": { | ||
138 | + "psr-4": { | ||
139 | + "artbox\\order\\": "" | ||
140 | + } | ||
141 | + }, | ||
142 | + "license": [ | ||
143 | + "BSD-3-Clause" | ||
144 | + ], | ||
145 | + "description": "Artbox order extension", | ||
146 | + "time": "2017-05-18T14:42:03+00:00" | ||
147 | + }, | ||
148 | + { | ||
149 | + "name": "artweb/artbox-weblog", | ||
150 | + "version": "dev-master", | ||
151 | + "source": { | ||
152 | + "type": "git", | ||
153 | + "url": "git@gitlab.artweb.com.ua:Alexey/artbox-weblog.git", | ||
154 | + "reference": "420d8fd52ac4482d9e0c22e636298b7ce430bfe1" | ||
155 | + }, | ||
156 | + "require": { | ||
157 | + "php": ">=7.0", | ||
158 | + "yiisoft/yii2": "~2.0", | ||
159 | + "yiisoft/yii2-bootstrap": "~2.0" | ||
160 | + }, | ||
161 | + "type": "yii2-extension", | ||
162 | + "autoload": { | ||
163 | + "psr-4": { | ||
164 | + "artbox\\weblog\\": "" | ||
165 | + } | ||
166 | + }, | ||
167 | + "license": [ | ||
168 | + "BSD-3-Clause" | ||
169 | + ], | ||
170 | + "description": "Artbox blog support extension", | ||
171 | + "time": "2017-09-18 15:38:17" | ||
172 | + }, | ||
173 | + { | ||
70 | "name": "bower-asset/amcharts", | 174 | "name": "bower-asset/amcharts", |
71 | "version": "dev-master", | 175 | "version": "dev-master", |
72 | "source": { | 176 | "source": { |
@@ -87,7 +191,7 @@ | @@ -87,7 +191,7 @@ | ||
87 | "dev-master": "3.18.5-dev" | 191 | "dev-master": "3.18.5-dev" |
88 | } | 192 | } |
89 | }, | 193 | }, |
90 | - "time": "2016-01-04T17:22:55+00:00" | 194 | + "time": "2016-01-04 17:22:55" |
91 | }, | 195 | }, |
92 | { | 196 | { |
93 | "name": "bower-asset/amcharts-stock", | 197 | "name": "bower-asset/amcharts-stock", |
@@ -110,7 +214,7 @@ | @@ -110,7 +214,7 @@ | ||
110 | "dev-master": "3.13.0-dev" | 214 | "dev-master": "3.13.0-dev" |
111 | } | 215 | } |
112 | }, | 216 | }, |
113 | - "time": "2015-01-28T07:40:20+00:00" | 217 | + "time": "2015-01-28 07:40:20" |
114 | }, | 218 | }, |
115 | { | 219 | { |
116 | "name": "bower-asset/bootstrap", | 220 | "name": "bower-asset/bootstrap", |
@@ -159,8 +263,7 @@ | @@ -159,8 +263,7 @@ | ||
159 | "mobile-first", | 263 | "mobile-first", |
160 | "responsive", | 264 | "responsive", |
161 | "web" | 265 | "web" |
162 | - ], | ||
163 | - "time": "2016-07-25T15:51:55+00:00" | 266 | + ] |
164 | }, | 267 | }, |
165 | { | 268 | { |
166 | "name": "bower-asset/gentelella", | 269 | "name": "bower-asset/gentelella", |
@@ -254,8 +357,7 @@ | @@ -254,8 +357,7 @@ | ||
254 | "responsive", | 357 | "responsive", |
255 | "template", | 358 | "template", |
256 | "theme" | 359 | "theme" |
257 | - ], | ||
258 | - "time": "2017-01-25T13:54:24+00:00" | 360 | + ] |
259 | }, | 361 | }, |
260 | { | 362 | { |
261 | "name": "bower-asset/icheck", | 363 | "name": "bower-asset/icheck", |
@@ -305,8 +407,7 @@ | @@ -305,8 +407,7 @@ | ||
305 | "replacement", | 407 | "replacement", |
306 | "skins", | 408 | "skins", |
307 | "ui" | 409 | "ui" |
308 | - ], | ||
309 | - "time": "2014-03-03T17:36:28+00:00" | 410 | + ] |
310 | }, | 411 | }, |
311 | { | 412 | { |
312 | "name": "bower-asset/jquery", | 413 | "name": "bower-asset/jquery", |
@@ -337,8 +438,7 @@ | @@ -337,8 +438,7 @@ | ||
337 | "javascript", | 438 | "javascript", |
338 | "jquery", | 439 | "jquery", |
339 | "library" | 440 | "library" |
340 | - ], | ||
341 | - "time": "2016-05-20T17:24:43+00:00" | 441 | + ] |
342 | }, | 442 | }, |
343 | { | 443 | { |
344 | "name": "bower-asset/jquery.inputmask", | 444 | "name": "bower-asset/jquery.inputmask", |
@@ -397,8 +497,7 @@ | @@ -397,8 +497,7 @@ | ||
397 | "jquery", | 497 | "jquery", |
398 | "mask", | 498 | "mask", |
399 | "plugins" | 499 | "plugins" |
400 | - ], | ||
401 | - "time": "2017-08-24T08:08:54+00:00" | 500 | + ] |
402 | }, | 501 | }, |
403 | { | 502 | { |
404 | "name": "bower-asset/pnotify", | 503 | "name": "bower-asset/pnotify", |
@@ -460,8 +559,7 @@ | @@ -460,8 +559,7 @@ | ||
460 | "LGPL-3.0", | 559 | "LGPL-3.0", |
461 | "MPL-1.1" | 560 | "MPL-1.1" |
462 | ], | 561 | ], |
463 | - "description": "JavaScript notification plugin.", | ||
464 | - "time": "2015-09-03T02:29:56+00:00" | 562 | + "description": "JavaScript notification plugin." |
465 | }, | 563 | }, |
466 | { | 564 | { |
467 | "name": "bower-asset/punycode", | 565 | "name": "bower-asset/punycode", |
@@ -489,8 +587,7 @@ | @@ -489,8 +587,7 @@ | ||
489 | "node_modules", | 587 | "node_modules", |
490 | "package.json" | 588 | "package.json" |
491 | ] | 589 | ] |
492 | - }, | ||
493 | - "time": "2014-10-22T12:02:42+00:00" | 590 | + } |
494 | }, | 591 | }, |
495 | { | 592 | { |
496 | "name": "bower-asset/yii2-pjax", | 593 | "name": "bower-asset/yii2-pjax", |
@@ -524,8 +621,7 @@ | @@ -524,8 +621,7 @@ | ||
524 | }, | 621 | }, |
525 | "license": [ | 622 | "license": [ |
526 | "MIT" | 623 | "MIT" |
527 | - ], | ||
528 | - "time": "2016-03-04T13:24:47+00:00" | 624 | + ] |
529 | }, | 625 | }, |
530 | { | 626 | { |
531 | "name": "cebe/markdown", | 627 | "name": "cebe/markdown", |
@@ -1565,7 +1661,7 @@ | @@ -1565,7 +1661,7 @@ | ||
1565 | "widget", | 1661 | "widget", |
1566 | "yii2" | 1662 | "yii2" |
1567 | ], | 1663 | ], |
1568 | - "time": "2017-09-06T06:18:08+00:00" | 1664 | + "time": "2017-09-06 06:18:08" |
1569 | }, | 1665 | }, |
1570 | { | 1666 | { |
1571 | "name": "kartik-v/yii2-widget-fileinput", | 1667 | "name": "kartik-v/yii2-widget-fileinput", |
@@ -1673,7 +1769,7 @@ | @@ -1673,7 +1769,7 @@ | ||
1673 | "widget", | 1769 | "widget", |
1674 | "yii2" | 1770 | "yii2" |
1675 | ], | 1771 | ], |
1676 | - "time": "2017-09-04T15:30:52+00:00" | 1772 | + "time": "2017-09-04 15:30:52" |
1677 | }, | 1773 | }, |
1678 | { | 1774 | { |
1679 | "name": "monolog/monolog", | 1775 | "name": "monolog/monolog", |
@@ -2825,8 +2921,7 @@ | @@ -2825,8 +2921,7 @@ | ||
2825 | "type": "bower-asset-library", | 2921 | "type": "bower-asset-library", |
2826 | "extra": { | 2922 | "extra": { |
2827 | "bower-asset-main": "dist/typeahead.bundle.js" | 2923 | "bower-asset-main": "dist/typeahead.bundle.js" |
2828 | - }, | ||
2829 | - "time": "2015-04-27T04:02:14+00:00" | 2924 | + } |
2830 | }, | 2925 | }, |
2831 | { | 2926 | { |
2832 | "name": "codeception/base", | 2927 | "name": "codeception/base", |
@@ -5210,7 +5305,10 @@ | @@ -5210,7 +5305,10 @@ | ||
5210 | "kartik-v/yii2-widget-select2": 20, | 5305 | "kartik-v/yii2-widget-select2": 20, |
5211 | "bower-asset/amcharts": 20, | 5306 | "bower-asset/amcharts": 20, |
5212 | "bower-asset/pnotify": 20, | 5307 | "bower-asset/pnotify": 20, |
5213 | - "kartik-v/yii2-widget-datepicker": 20 | 5308 | + "kartik-v/yii2-widget-datepicker": 20, |
5309 | + "artweb/artbox-core": 20, | ||
5310 | + "artweb/artbox-weblog": 20, | ||
5311 | + "artweb/artbox-catalog": 20 | ||
5214 | }, | 5312 | }, |
5215 | "prefer-stable": false, | 5313 | "prefer-stable": false, |
5216 | "prefer-lowest": false, | 5314 | "prefer-lowest": false, |
console/migrations/m170920_133344_create_article_to_product_table.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +use yii\db\Migration; | ||
4 | + | ||
5 | +/** | ||
6 | + * Handles the creation of table `article_to_category`. | ||
7 | + */ | ||
8 | +class m170920_133344_create_article_to_product_table extends Migration | ||
9 | +{ | ||
10 | + /** | ||
11 | + * @inheritdoc | ||
12 | + */ | ||
13 | + public function up() | ||
14 | + { | ||
15 | + $this->createTable('article_to_product', [ | ||
16 | + 'article_id' => $this->integer(), | ||
17 | + 'product_id'=> $this->integer() | ||
18 | + ]); | ||
19 | + $this->addPrimaryKey('article_to_product_pk', 'article_to_product', ['article_id', 'product_id']); | ||
20 | + | ||
21 | + $this->addForeignKey('article_to_product_article_fk', | ||
22 | + 'article_to_product', | ||
23 | + 'article_id', | ||
24 | + 'blog_article', | ||
25 | + 'id', | ||
26 | + 'CASCADE'); | ||
27 | + $this->addForeignKey('article_to_product_product_fk', | ||
28 | + 'article_to_product', | ||
29 | + 'product_id', | ||
30 | + 'product', | ||
31 | + 'id', | ||
32 | + 'CASCADE'); | ||
33 | + } | ||
34 | + | ||
35 | + /** | ||
36 | + * @inheritdoc | ||
37 | + */ | ||
38 | + public function down() | ||
39 | + { | ||
40 | + $this->dropForeignKey('article_to_product_article_fk', 'article_to_product'); | ||
41 | + $this->dropForeignKey('article_to_product_product_fk', 'article_to_product'); | ||
42 | + | ||
43 | + $this->dropTable('article_to_product'); | ||
44 | + } | ||
45 | +} |