Database & Migrations

Peddle allows for a separate database connection, in case you don't want to store peddle stuffing the same databases you're already using. You need to set the following environment variable before anything database-related will work:

PEDDLE_DB_CONNECTION=mysql

...where mysql is the name of the database connection you want to use. mysql happens to be the same database connection as the rest of my app uses; so it'll install to the same database.

Peddle prefixes all database tables, so even if you use the same database, none of your tables or data will be affected by installing Peddle. You can customise the table prefix by going to config/peddle.php and finding the database.prefix section.

Migrations

Peddle has a modified set of Cashier Paddle migrations, which allow for custom database table name prefixes. We've disabled the Cashier behaviour of automatically migrating along with your application's migrations, because we want it to be a conscious decision.

To run the Peddle migrations, use the following command:

artisan peddle:migrate

If you want to reset your peddle migrations, you can use:

artisan peddle:migrate --fresh