-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from magento-firedrakes/bugfixes
[Firedrakes] Bugfixes. Sprint 36
- Loading branch information
Showing
8 changed files
with
193 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
app/code/Magento/Sales/sql/sales_setup/upgrade-2.0.0-2.0.1.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
use Magento\Framework\DB\Ddl\Table; | ||
|
||
/** | ||
* update columns created_at and updated_at in sales entities tables | ||
*/ | ||
|
||
$tables = [ | ||
'sales_creditmemo', | ||
'sales_creditmemo_comment', | ||
'sales_invoice', | ||
'sales_invoice_comment', | ||
'sales_order', | ||
'sales_order_item', | ||
'sales_order_status_history', | ||
'sales_payment_transaction', | ||
'sales_shipment', | ||
'sales_shipment_comment', | ||
'sales_shipment_track' | ||
]; | ||
/** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */ | ||
$connection = $this->getConnection(); | ||
foreach ($tables as $table) { | ||
$columns = $connection->describeTable($this->getTable($table)); | ||
if (isset($columns['created_at'])) { | ||
$createdAt = $columns['created_at']; | ||
$createdAt['DEFAULT'] = Table::TIMESTAMP_INIT; | ||
$createdAt['TYPE'] = Table::TYPE_TIMESTAMP; | ||
$connection->modifyColumn($this->getTable($table), 'created_at', $createdAt); | ||
} | ||
if (isset($columns['updated_at'])) { | ||
$updatedAt = $columns['updated_at']; | ||
$updatedAt['DEFAULT'] = Table::TIMESTAMP_UPDATE; | ||
$updatedAt['TYPE'] = Table::TYPE_TIMESTAMP; | ||
$connection->modifyColumn($this->getTable($table), 'updated_at', $updatedAt); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.