Cashier-stripe: Migrations ignore CASHIER_MODEL

Created on 30 Jul 2019  路  2Comments  路  Source: laravel/cashier-stripe

  • Cashier Version: 10.0.0-beta
  • Laravel Version: 5.8
  • PHP Version: 7.2
  • Database Driver & Version:

Description:

Migrations do not honor the CASHIER_MODEL setting in cashier.php. They always assume the data is attached to users and user_id.

It can be worked around by disabling the migrations with Cashier::ignoreMigrations() and manually creating the tables.

Steps To Reproduce:

Edit config/cashier.php to point CASHIER_MODEL and something else like App\Team::class and run php artisan migrate. The users table will be modified and the subscriptions table will have a user_id field instead of team_id.

Most helpful comment

Thanks for helping out btw!

All 2 comments

You're suppose to publish the migrations if you want to update them. This can be done with php artisan vendor:publish --tag="cashier-migrations"

Also see the WIP pr for the docs (which detail this): https://github.com/laravel/docs/pull/5313

Thanks for helping out btw!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tania-pets picture tania-pets  路  3Comments

driesvints picture driesvints  路  3Comments

MarGul picture MarGul  路  5Comments

josephcocoa picture josephcocoa  路  3Comments

adrianoGaspar picture adrianoGaspar  路  5Comments