Skip to content

Commit 5108e72

Browse files
author
Maksym Savich
committed
MAGETWO-35459: Add default to timestamp columns
(cherry picked from commit 2236915)
1 parent cbb822b commit 5108e72

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

app/code/Magento/Customer/Setup/InstallSchema.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
8787
'updated_at',
8888
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
8989
null,
90-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
90+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
9191
'Updated At'
9292
)->addColumn(
9393
'is_active',
@@ -136,7 +136,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
136136
'Customer Entity'
137137
);
138138
$installer->getConnection()->createTable($table);
139-
139+
140140
/**
141141
* Create table 'customer_address_entity'
142142
*/
@@ -182,7 +182,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
182182
'updated_at',
183183
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
184184
null,
185-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
185+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
186186
'Updated At'
187187
)->addColumn(
188188
'is_active',
@@ -204,7 +204,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
204204
'Customer Address Entity'
205205
);
206206
$installer->getConnection()->createTable($table);
207-
207+
208208
/**
209209
* Create table 'customer_address_entity_datetime'
210210
*/
@@ -292,7 +292,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
292292
'Customer Address Entity Datetime'
293293
);
294294
$installer->getConnection()->createTable($table);
295-
295+
296296
/**
297297
* Create table 'customer_address_entity_decimal'
298298
*/
@@ -380,7 +380,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
380380
'Customer Address Entity Decimal'
381381
);
382382
$installer->getConnection()->createTable($table);
383-
383+
384384
/**
385385
* Create table 'customer_address_entity_int'
386386
*/
@@ -458,7 +458,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
458458
'Customer Address Entity Int'
459459
);
460460
$installer->getConnection()->createTable($table);
461-
461+
462462
/**
463463
* Create table 'customer_address_entity_text'
464464
*/
@@ -538,7 +538,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
538538
'Customer Address Entity Text'
539539
);
540540
$installer->getConnection()->createTable($table);
541-
541+
542542
/**
543543
* Create table 'customer_address_entity_varchar'
544544
*/
@@ -626,7 +626,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
626626
'Customer Address Entity Varchar'
627627
);
628628
$installer->getConnection()->createTable($table);
629-
629+
630630
/**
631631
* Create table 'customer_entity_datetime'
632632
*/
@@ -704,7 +704,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
704704
'Customer Entity Datetime'
705705
);
706706
$installer->getConnection()->createTable($table);
707-
707+
708708
/**
709709
* Create table 'customer_entity_decimal'
710710
*/
@@ -782,7 +782,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
782782
'Customer Entity Decimal'
783783
);
784784
$installer->getConnection()->createTable($table);
785-
785+
786786
/**
787787
* Create table 'customer_entity_int'
788788
*/
@@ -860,7 +860,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
860860
'Customer Entity Int'
861861
);
862862
$installer->getConnection()->createTable($table);
863-
863+
864864
/**
865865
* Create table 'customer_entity_text'
866866
*/
@@ -935,7 +935,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
935935
'Customer Entity Text'
936936
);
937937
$installer->getConnection()->createTable($table);
938-
938+
939939
/**
940940
* Create table 'customer_entity_varchar'
941941
*/
@@ -1013,7 +1013,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
10131013
'Customer Entity Varchar'
10141014
);
10151015
$installer->getConnection()->createTable($table);
1016-
1016+
10171017
/**
10181018
* Create table 'customer_group'
10191019
*/
@@ -1041,7 +1041,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
10411041
'Customer Group'
10421042
);
10431043
$installer->getConnection()->createTable($table);
1044-
1044+
10451045
/**
10461046
* Create table 'customer_eav_attribute'
10471047
*/
@@ -1106,7 +1106,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
11061106
'Customer Eav Attribute'
11071107
);
11081108
$installer->getConnection()->createTable($table);
1109-
1109+
11101110
/**
11111111
* Create table 'customer_form_attribute'
11121112
*/
@@ -1138,7 +1138,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
11381138
'Customer Form Attribute'
11391139
);
11401140
$installer->getConnection()->createTable($table);
1141-
1141+
11421142
/**
11431143
* Create table 'customer_eav_attribute_website'
11441144
*/
@@ -1201,7 +1201,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
12011201
'Customer Eav Attribute Website'
12021202
);
12031203
$installer->getConnection()->createTable($table);
1204-
1204+
12051205
/**
12061206
* Create table 'customer_visitor'
12071207
*/
@@ -1229,8 +1229,8 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
12291229
'Visitor Table'
12301230
);
12311231
$installer->getConnection()->createTable($table);
1232-
1232+
12331233
$installer->endSetup();
1234-
1234+
12351235
}
12361236
}

app/code/Magento/Downloadable/Setup/InstallSchema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
226226
'updated_at',
227227
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
228228
null,
229-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
229+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
230230
'Date of modification'
231231
)
232232
->addColumn(
@@ -402,7 +402,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
402402
'updated_at',
403403
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
404404
null,
405-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
405+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
406406
'Update Time'
407407
)
408408
->addIndex(

app/code/Magento/Eav/Setup/InstallSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
185185
'updated_at',
186186
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
187187
null,
188-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
188+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
189189
'Updated At'
190190
)->addColumn(
191191
'is_active',

app/code/Magento/Sales/Setup/InstallSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
13201320
'updated_at',
13211321
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
13221322
null,
1323-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
1323+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
13241324
'Updated At'
13251325
)->addColumn(
13261326
'product_id',

app/code/Magento/Search/Setup/InstallSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
104104
'updated_at',
105105
\Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
106106
null,
107-
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],
107+
['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE],
108108
'Updated at'
109109
)
110110
->addIndex(

0 commit comments

Comments
 (0)