Skip to content

Commit

Permalink
Merge pull request #48 from feedaty/develop
Browse files Browse the repository at this point in the history
Db schema
  • Loading branch information
altravista committed Feb 19, 2022
2 parents 98776b7 + 47c2bd8 commit ba54e7e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 149 deletions.
2 changes: 1 addition & 1 deletion Cron/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function execute()


//Starter Log
$this->logger->addInfo("Feedaty | START Cronjob | Set Feedaty Orders | date: " . date('Y-m-d H:i:s') );
$this->logger->info("Feedaty | START Cronjob | Set Feedaty Orders | date: " . date('Y-m-d H:i:s') );

$orders = $this->ordersHelper->getOrders();

Expand Down
8 changes: 4 additions & 4 deletions Cron/Reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function execute()
*/
$totalMediatedReviewCreatedCount = $this->_reviewsHelper->getAllFeedatyMediatedReviewCount();

$this->_logger->addInfo("Feedaty | Cronjob Run | Get Feedaty Reviews | date: " . date('Y-m-d H:i:s') . ' ---- Total Feedaty Product Reviews ' . $totalFeedatyReviews . ' totalReviewCreatedCount group by feedaty_id ' . $totalReviewCreatedCount);
$this->_logger->info("Feedaty | Cronjob Run | Get Feedaty Reviews | date: " . date('Y-m-d H:i:s') . ' ---- Total Feedaty Product Reviews ' . $totalFeedatyReviews . ' totalReviewCreatedCount group by feedaty_id ' . $totalReviewCreatedCount);

/**
* Get Last Review Created on Magento (on first run vill be null)
Expand Down Expand Up @@ -183,7 +183,7 @@ public function execute()
}
}
// General Cron Report on system.log
$this->_logger->addInfo("Feedaty | END Cronjob | Get Feedaty Reviews | date execution: " . date('Y-m-d H:i:s') );
$this->_logger->info("Feedaty | END Cronjob | Get Feedaty Reviews | date execution: " . date('Y-m-d H:i:s') );
}

/**
Expand All @@ -205,7 +205,7 @@ public function execute()

if (!empty($feedatyProductReviewsMediated)) {

$this->_logger->addInfo("Feedaty | START Mediated Reviews");
$this->_logger->info("Feedaty | START Mediated Reviews");

//Foreach Review
foreach ($feedatyProductReviewsMediated as $mediatedReview) {
Expand Down Expand Up @@ -269,7 +269,7 @@ public function execute()
}
}
else{
$this->_logger->addInfo("Feedaty | Cronjob is not enabled. Configure it from admin panel | date: ". date('Y-m-d H:i:s') );
$this->_logger->info("Feedaty | Cronjob is not enabled. Configure it from admin panel | date: ". date('Y-m-d H:i:s') );
}

}
Expand Down
142 changes: 0 additions & 142 deletions Setup/UpgradeSchema.php

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"AFL-3.0"
],

"version": "2.7.1-stable",
"version": "2.7.2-stable",


"type": "magento2-module",
Expand Down
22 changes: 22 additions & 0 deletions etc/db_schema.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="feedaty_orders">
<column xsi:type="int" name="feedaty_orders_id" unsigned="false" nullable="false" identity="true" comment="Value ID"/>
<column xsi:type="int" name="order_id" unsigned="true" nullable="false" identity="false" default="0" comment="Related Magento Order ID"/>
<column xsi:type="int" name="feedaty_customer_notified" unsigned="true" nullable="false" identity="false" default="0" comment="Check if Customer as been notified"/>
<column xsi:type="timestamp" name="created_at" default="CURRENT_TIMESTAMP" comment="Created At"/>
<column xsi:type="timestamp" name="updated_at" default="CURRENT_TIMESTAMP" comment="Updated At"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="feedaty_orders_id"/>
</constraint>
</table>
<table name="review_detail">
<column xsi:type="int" name="feedaty_source" unsigned="true" nullable="false" identity="false" comment="Feedaty Review"/>
<column xsi:type="int" name="feedaty_pagination" unsigned="true" nullable="false" identity="false" default="0" comment="Feedaty Import Pagination"/>
<column xsi:type="int" name="feedaty_source_id" unsigned="true" nullable="false" identity="false" default="0" comment="Feedaty review ID"/>
<column xsi:type="int" name="feedaty_product_review_id" unsigned="true" nullable="false" identity="false" default="0" comment="Feedaty Product Review ID"/>
<column xsi:type="int" name="feedaty_product_mediated" unsigned="true" nullable="false" identity="false" default="0" comment="Feedaty Product Mediated"/>
<column xsi:type="timestamp" name="feedaty_update" comment="Updated At"/>
<column xsi:type="timestamp" name="feedaty_create" comment="Created At"/>
</table>
</schema>
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Feedaty_Badge" setup_version="2.7.1">
<module name="Feedaty_Badge" setup_version="2.7.2">
<sequence>
<module name="Magento_Widget" />
</sequence>
Expand Down

0 comments on commit ba54e7e

Please sign in to comment.