djyde / cusdis

lightweight, privacy-friendly alternative to Disqus.
https://cusdis.com
GNU General Public License v3.0
2.63k stars 230 forks source link

MySQL database lose Property 'subscription' #254

Open ZhongWwwHhh opened 1 year ago

ZhongWwwHhh commented 1 year ago

When I use DB_TYPE=mysql, I got this error as run yarn run build:without-migrate

./pages/api/subscription.ts:61:39
Type error: Property 'subscription' does not exist on type 'PrismaClient<PrismaClientOptions, never, DefaultArgs>'.

  59 |     }
  60 |
> 61 |     const subscription = await prisma.subscription.findUnique({
     |                                       ^
  62 |       where: {
  63 |         userId: session.uid
  64 |       },
error Command failed with exit code 1.

And I found a new submit add subscription c82cd09. Sqlite has been changed correctly, but mysql not.

ZhongWwwHhh commented 1 year ago

I thought it was lead by #252