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

[Bug]: prezet:index Malformed DB #82

Closed
skino2019 opened this issue Oct 1, 2024 · 4 comments
Closed

[Bug]: prezet:index Malformed DB #82

skino2019 opened this issue Oct 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@skino2019
Copy link

skino2019 commented Oct 1, 2024

What happened?

Im unable to do the php artisan prezet:index when i run the command i get this

$ php artisan prezet:index

   Illuminate\Database\QueryException 

  SQLSTATE[HY000]: General error: 11 database disk image is malformed (Connection: prezet, SQL: select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name)

How to reproduce the bug

Not sure how or where it starts but one minute i can do the php artisan prezet:index and the next i get the following error

$ php artisan prezet:index

   Illuminate\Database\QueryException 

  SQLSTATE[HY000]: General error: 11 database disk image is malformed (Connection: prezet, SQL: select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name)

i have worked through your mentioned fix Here but its still not working.

Package Version

0.15.0

PHP Version

8.2

Laravel Version

11

Which operating systems does with happen with?

No response

Notes

PS I love this project a lot. it will make managing my blog so much easier going forward just need to get it working and looking how i need it :D

@skino2019 skino2019 added the bug Something isn't working label Oct 1, 2024
@benbjurstrom
Copy link
Owner

Hmm, this came up in #78. I thought I fixed it in v0.15.0 but if you're on that version and still seeing it I'll have to look into it more.

Thankfully it can be temporarily fixed fairly easy. Just delete your prezet.sqlite file, recreate it, and reindex. You can use this one liner from the root of the project.

rm prezet.sqlite && touch prezet.sqlite && php artisan prezet:index

@skino2019
Copy link
Author

skino2019 commented Oct 1, 2024

this

rm prezet.sqlite && touch prezet.sqlite && php artisan prezet:index
isnt working

i have tried it a few different ways. from in the IDE From a terminal and even file explorer itself. i still get the same error message

@benbjurstrom
Copy link
Owner

Oh sorry, didn't see you had already tried that. In the root of your laravel application you should have a file called prezet.sqlite. Delete it. Then create a new file in that spot with the same name.

@skino2019
Copy link
Author

That resolved it. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants