checkout:install
php mitosis checkout:install
✓ Checkout install complete: 4 of 4 tables created (transaction, status, refund, subscription).
Requires Clarity 1.2.0 or newer — 1.4.0 for the fourth table. Creates the tables backing Checkout's ledgers:
checkout_transactions— one row per checkout, with its current status.checkout_transaction_statuses— insert-only history, with a failure reason column.checkout_refunds— refunds, which accumulate against a transaction rather than changing its status.checkout_subscriptions— one mutable row per subscription (1.4.0).
Safe to run again — and that is how you upgrade
Each table is skipped when it already exists, so a release that adds one is installed by running this command again. Upgrading from 1.2.0 or 1.3.0 to 1.4.0 is exactly that and nothing else: no migration ships, and none is needed.
composer update monad/clarity
php mitosis checkout:install # creates only checkout_subscriptions
Existing rows are untouched. If every table is already present the command says so and changes nothing.
Why this is separate from setup
setup creates sessions and caches, the two
tables Clarity itself owns and every app needs. Payments are opt-in, so the checkout tables are
not part of that set — an application that takes no payments should not carry four empty payment
tables it never queries. Run this only if you use Services\Checkout.
This is also why the checkout tables are not a cross-repo compatibility surface the way
sessions and caches are: they are created on request, not on install.
Where it fits
# .env is written by create-project; fill in DB_*
php mitosis setup # sessions + caches — always
php mitosis checkout:install # only if you take payments
php mitosis migrate # your own app's migrations