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

Column not found: 1054 Unknown column 'subscription_items.subscriptions_id' #270

Closed
emergingdzns opened this issue Jul 26, 2024 · 2 comments

Comments

@emergingdzns
Copy link

Cashier Paddle Version

2.4

Laravel Version

11.10

PHP Version

8.3

Database Driver & Version

MySQL 8 on AWS RDS

Description

All of a sudden when I try to query any record in our subscription model (which extends CashierSubscription) it is now throwing the following error:

[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'subscription_items.subscriptions_id' in 'where clause' at /var/www/containers/web-app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:407)
[stacktrace]

But there is no subscriptions_id. The plural of subscription is throwing it off.

If I remove the extending of CashierSubscription it works fine but then of course Cashier doesn't work.

I don't know what happened. We didn't change anything in the code recently.

I can't find subscriptions_id anywhere in the code, ours or the cashier vendor folder.

Steps To Reproduce

I'm honestly not sure how to duplicate this. It suddenly came up today by making a simple query to our subscription model like this:

$subscription = Subscriptions::where('receipt_id', $receipt_id)->first();
@driesvints
Copy link
Member

If I remove the extending of CashierSubscription

Could you post your full code that extended this?

@driesvints
Copy link
Member

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants