royallthefourth / psh-innodb-shrink
Provides a cron to shrink InnoDB tables with lots of free space
Package info
github.com/royallthefourth/psh-innodb-shrink
Type:project
pkg:composer/royallthefourth/psh-innodb-shrink
v1.0.1
2020-09-17 19:51 UTC
Requires
- php: ^7.2
- platformsh/config-reader: ^2.3
- royallthefourth/smooth-pdo: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2026-02-18 07:39:35 UTC
README
This package provides a command-line tool that can be used to shrink InnoDB tables in a PHP application running on Platform.sh.
Installation
composer require royallthefourth/psh-innodb-shrink
Usage
Add a cron to your .platform.app.yaml that invokes the program with a ratio of free space as its argument.
For example, this will only run on tables that are at least 75% empty:
vendor/bin/shrink 0.75
Tests
This package has tests. Use this command to run the them:
vendor/bin/phpunit tests