Describe the bug
I upgraded the docker container from 4.7.4 to 4.7.5
To Reproduce
Steps to reproduce the behavior:
Server (please complete the following information):
Desktop (please complete the following information):
Error Messages
Illuminate \ Database \ QueryException (42S02)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipeit.permission_groups' doesn't exist (SQL: select `permission_groups`.*, `users_groups`.`user_id` as `pivot_user_id`, `users_groups`.`group_id` as `pivot_group_id` from `permission_groups` inner join `users_groups` on `permission_groups`.`id` = `users_groups`.`group_id` where `users_groups`.`user_id` = 4)
Previous exceptions
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipeit.permission_groups' doesn't exist (42S02)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipeit.permission_groups' doesn't exist (42S02)
Additional context
I had the same issue when upgrading to 4.7.5 on Docker, rolled back to v4.7.4 for now.
Running docker exec -it <containername> php artisan migrate
and docker exec -it <containername> php artisan config:clear fixed this for me.
Running the migrations manually worked. Looks like the migration isn't getting run on the docker container. :shrug:
@HinchK - any thoughts here?
I'm having the same issue from 4.7.4 to 4.7.5. Running the manual upgrade commands from inside the container in teh install directory does not fix it for me.
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipe.groups' doesn't exist (SQL: select `groups`.*, `users_groups`.`user_id` as `pivot_user_id`, `users_groups`.`group_id` as `pivot_group_id` from `groups` inner join `users_groups` on `groups`.`id` = `users_groups`.`group_id` where `users_groups`.`user_id` = 5)
I am having similar issue, but Snipe-IT is installed on Windows Server 2016. It is an upgrade as well.
"php artisan migrate" gives an error as below:
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
I am having similar issue, but Snipe-IT is installed on Windows Server 2016. It is an upgrade as well.
"php artisan migrate" gives an error as below:
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
Are you running PHP version 7.1.3 or higher? The latest versions require PHP 7.1.3 or greater.
I upgraded PHP to 7.3.6, issue still exists.
It only happens on an upgrade. I have clean install on a different VM, that command works fine on the latest SNIPE-IT release.
New to Linux and probably it is workaround not fix, but it might lead you to the solution:
I had the same error while upgrading (GIT not Docker).
Fixed by reassigning ownership of /var/www/snipeit to myself,
then running php upgrade.php and changed back:
sudo chown -R www-data:www-data storage public/uploads
sudo chmod -R 755 storage
sudo chmod -R 755 public/uploads
php artisan config:clear
Most likely this happens if the permissions are incorrectly setup at the first place.
Does anyone have a fix for this on windows server 2012R2? Recently upgraded using docker and I now have the same issue.
I was able to get around the error by renaming the table from "groups" to "permission_groups"
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
Most helpful comment
I was able to get around the error by renaming the table from "groups" to "permission_groups"