Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | public function initInverter(\execut\yii\migration\Inverter $i) |
||
11 | { |
||
12 | $i->table('example_brands') |
||
13 | ->create($this->defaultColumns([ |
||
14 | 'name' => $this->string()->notNull(), |
||
15 | ])); |
||
16 | $i->table('example_articles') |
||
17 | ->create($this->defaultColumns([ |
||
18 | 'article' => $this->string()->notNull(), |
||
19 | 'source' => $this->string(), |
||
20 | ])) |
||
21 | ->addForeignColumn('example_brands', true); |
||
22 | $i->table('example_brands_aliases') |
||
23 | ->create($this->defaultColumns([ |
||
24 | 'name' => $this->string()->notNull(), |
||
25 | ])) |
||
26 | ->addForeignColumn('example_brands', true); |
||
27 | $i->table('example_products') |
||
28 | ->create($this->defaultColumns([ |
||
29 | 'name' => $this->string()->notNull(), |
||
30 | 'price' => $this->float(2), |
||
31 | ])) |
||
32 | ->addForeignColumn('example_articles'); |
||
33 | } |
||
35 |