92bb547f
Mihail
add migration and...
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
$this->createTable('{{%importer}}', [
'id' => $this->primaryKey(6)->notNull() . ' AUTO_INCREMENT',
'code' =>'varchar(254) NOT NULL',
'name' => 'varchar(254) NOT NULL',
'name_price' => 'varchar(254) NOT NULL',
'currency_id' => 'int(3) unsigned NOT NULL',
'delivery' => 'varchar(254) NOT NULL',
'email' => 'varchar(254) NOT NULL',
'info' => 'text NOT NULL',
'active' => 'tinyint(1) unsigned NOT NULL DEFAULT 1',
'PARSER_IS_ACTIVE' => 'tinyint(1) unsigned NOT NULL DEFAULT 0',
'PARSER_COLUMN_COUNT' => 'int(6) unsigned DEFAULT NULL',
'PARSER_FIELD_BRAND' => 'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_ARTICLE' => 'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_ARTICLE_PREFIX' => 'tinyint(1) unsigned NOT NULL DEFAULT 0',
'PARSER_FIELD_PRICE' => 'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_DESCR' =>'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_BOX' => 'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_ADD_BOX' => 'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_GROUP_RG' => 'int(3) unsigned DEFAULT NULL',
'PARSER_FIELD_SIGN' => 'varchar(1) NOT NULL',
'PARSER_FIELD_MULTIPLIER' => 'float(8,2) unsigned DEFAULT NULL',
'price_date_update' => 'varchar(15) NOT NULL'
], $tableOptions);
$this->createIndex('code', '{{%importer}}', 'code', true);
$this->createIndex('name', '{{%importer}}', 'name', true);
$this->createIndex('active', '{{%importer}}', 'active', false);
}
public function down()
{
$this->dropTable('{{%importer}}');
|