This file contains hidden or 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
cd {{project}} | |
mkdir -p storage/media | |
mkdir -p storage/var | |
chmod -fR g+w storage || true | |
cp -rTv {{release}}/docroot/media/ storage/media/ | |
cp -rTv {{release}}/docroot/var/ storage/var/ | |
rm -r {{release}}/docroot/media |
This file contains hidden or 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
SELECT | |
TABLE_NAME, table_rows, data_length, index_length, | |
round(((data_length + index_length) / 1024 / 1024),2) 'Size in MB' | |
FROM information_schema.TABLES | |
WHERE table_schema = 'yourSchemaName' and TABLE_TYPE='BASE TABLE' | |
ORDER BY data_length DESC; |
This file contains hidden or 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
protected function _prepareDataForSave(Mage_Core_Model_Abstract $object) | |
{ | |
$currentTime = Varien_Date::now(); | |
if ((!$object->getId() || $object->isObjectNew()) && !$object->getCreatedAt()) { | |
$object->setCreatedAt($currentTime); | |
} | |
$object->setUpdatedAt($currentTime); | |
$data = parent::_prepareDataForSave($object); | |
return $data; | |
} |
This file contains hidden or 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
<Directory /var/www> | |
Order Deny,Allow | |
Allow from all | |
AllowOverride All | |
</Directory> | |
<Directorymatch "^/.*/\.git/"> | |
Order deny,allow | |
Deny from all | |
</Directorymatch> |
This file contains hidden or 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
### MAGENTO DIRECTORIES | |
# Ignore everything in media, except for the htaccess files | |
# Also include the Lazy Catalog Images (LCI) .htaccess if that's installed | |
# (https://github.com/AOEpeople/Aoe_LazyCatalogImages) | |
/media/* | |
!/media/.htaccess | |
!/media/customer/.htaccess | |
!/media/downloadable/.htaccess | |
!/media/catalog/product/LCI/.htaccess |