bavix/laravel-wallet
bavix/laravel-wallet is a Laravel package for working with virtual wallets, supporting transactions, deposits, withdrawals, and multi-wallet setups with a documented API.
No code changes are required. Perform new package migrations;
Four redundant indexes are removed:
transactions.payable_type_payable_id_ind — a duplicate of the morphs() index;transactions.payable_type_ind — a prefix of payable_type_confirmed_ind;transactions.transactions_payable_type_payable_id_index — a prefix of payable_type_confirmed_ind;wallets.wallets_holder_type_holder_id_index — a prefix of the unique (holder_type, holder_id, slug);Every removed index was a duplicate or a leading prefix of a wider one, so no query loses its access path.
EXPLAIN on the hot wallet queries gives the same plans before and after (on mysql they are identical —
the optimizer used payable_confirmed_ind anyway). Measured on 1M transactions and 200k wallets:
| mysql | pgsql | |
|---|---|---|
| index size | 685 → 329 MB (-52%) | 265 → 156 MB (-41%) |
| insert of 50k rows | -63% time | -32% time |
The gain is in write throughput and disk footprint, reads stay the same;
If you have a highload project, drop the indexes yourself
(pt-online-schema-change
for mysql, DROP INDEX CONCURRENTLY for pgsql), then add both migration names to the migrations table
so they are not executed again. For a small project php artisan migrate is enough;
Full Changelog: https://github.com/bavix/laravel-wallet/compare/12.0.5...12.1.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.5.1...11.5.2
Full Changelog: https://github.com/bavix/laravel-wallet/compare/12.0.4...12.0.5
Full Changelog: https://github.com/bavix/laravel-wallet/compare/12.0.3...12.0.4
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.5.0...11.5.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/12.0.2...12.0.3
Full Changelog: https://github.com/bavix/laravel-wallet/compare/12.0.1...12.0.2
Full Changelog: https://github.com/bavix/laravel-wallet/compare/12.0.0...12.0.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.5.0...12.0.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.4.3...11.5.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.4.2...11.4.3
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.4.1...11.4.2
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.4.0...11.4.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.3.0...11.4.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.2.2...11.3.0
Many thanks to the guys for finding the bug @ISNewton @usmanjdn7
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.2.1...11.2.2
Many thanks to the guys for finding the bug @ISNewton @usmanjdn7
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.6...10.1.7
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.2.0...11.2.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.1.1...11.2.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.1.0...11.1.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.6...11.1.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.5...11.0.6
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.4...11.0.5
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.3...11.0.4
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.2...11.0.3
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.5...10.1.6
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.1...11.0.2
Full Changelog: https://github.com/bavix/laravel-wallet/compare/11.0.0...11.0.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.5...11.0.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.4...10.1.5
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.3...10.1.4
Full Changelog: https://github.com/bavix/laravel-wallet/compare/9.6.3...9.6.4
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.2...10.1.3
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.1...10.1.2
Full Changelog: https://github.com/bavix/laravel-wallet/compare/9.6.2...9.6.3
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.1.0...10.1.1
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.0.2...10.1.0
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.0.1...10.0.2
Full Changelog: https://github.com/bavix/laravel-wallet/compare/10.0.0...10.0.1
BookkeeperServiceInterface::missing. Use BookkeeperServiceInterface::forget.LockProviderNotFoundException.EagerLoaderServiceInterface. Added customer.to_type and from_type columns in the translation table are no longer used. Will be removed in 11.x.MorphMany to HasMany.Full Changelog: https://github.com/bavix/laravel-wallet/compare/9.6.2...10.0.0
How can I help you explore Laravel packages today?