Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot rollback migrations with SQLite #1702

Closed
robinstraub opened this issue Aug 10, 2024 · 0 comments · Fixed by #1703
Closed

Cannot rollback migrations with SQLite #1702

robinstraub opened this issue Aug 10, 2024 · 0 comments · Fixed by #1703
Labels

Comments

@robinstraub
Copy link

Cashier Stripe Version

15.4.1

Laravel Version

11.18.1

PHP Version

8.3

Database Driver & Version

SQLite 3

Description

When attempting to rollback the migrations generated with Laravel Cashier, it fails with the following error:

SQLSTATE[HY000]: General error: 1 no such index: stripe_id (Connection: sqlite, SQL: drop index "stripe_id")

I am using SQLite in testing environment and actually have a testsuite for testing my migrations and their rollback ability.

I am ensure if this is considered a bug, a.k.a. is cashier supposed to support SQLite (or maybe I missed something and the error is on my end).

If you feel Cashier should behave properly with SQLite and the migrate/rollback behavior should work out of the box, I can have a more in-depth look and issue a PR.

Steps To Reproduce

  1. create a new project and add cashier
  2. import publish the migrations (php artisan vendor:publish --tag="cashier-migrations")
  3. define the database connection to SQLite
  4. attempt to rollback the migrations (php artisan migrate:rollback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants