You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2023-11-10 20:20:11] local.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'posts.id' in 'where clause' (Connection: mysql, SQL: select `posts`.*, (select COUNT(*) from `comments` where `comments`.`post_id` = `posts`.`id` and `comments`.`created_at` > `last_read_at`) as `unread_comments_count`, (select JSON_OBJECTAGG(a.reaction_type_id, count) from (select reaction_type_id, count(*) as count from `reactions` where `content_type` = post and `content_id` = `posts`.`id` group by `reaction_type_id`) as `a`) as `reaction_counts` from `posts` left join `post_user` on `post_user`.`post_id` = `posts`.`id` and `post_user`.`user_id` is null where not exists (select * from `channels` where `posts`.`channel_id` = `channels`.`id` and (exists (select * from `channel_user` where `channels`.`id` = `channel_user`.`channel_id` and `notifications` = ignore and `channel_user`.`user_id` is null) or (`ignore` = 1 and not exists (select * from `channel_user` where `channels`.`id` = `channel_user`.`channel_id` and `notifications` is not null and `channel_user`.`user_id` is null))) and `id` in (1, 2, 3, 4)) and (`channel_id` in (1, 2, 3, 4) and `deleted_at` is null or 0 = 1) and `posts`.`deleted_at` is null and not (exists (select * from `post_user` where `posts`.`id` = `post_user`.`post_id` and `notifications` = ignore and `post_user`.`user_id` is null)) order by `last_activity_at` desc limit 16) {"view":{"view":"../mysite.com/vendor/waterhole/core/resources/views/components/post-feed.blade.php","data":[]},"exception":"[object] (Spatie\\LaravelIgnition\\Exceptions\\ViewException(code: 0): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'posts.id' in 'where clause' (Connection: mysql, SQL: select `posts`.*, (select COUNT(*) from `comments` where `comments`.`post_id` = `posts`.`id` and `comments`.`created_at` > `last_read_at`) as `unread_comments_count`, (select JSON_OBJECTAGG(a.reaction_type_id, count) from (select reaction_type_id, count(*) as count from `reactions` where `content_type` = post and `content_id` = `posts`.`id` group by `reaction_type_id`) as `a`) as `reaction_counts` from `posts` left join `post_user` on `post_user`.`post_id` = `posts`.`id` and `post_user`.`user_id` is null where not exists (select * from `channels` where `posts`.`channel_id` = `channels`.`id` and (exists (select * from `channel_user` where `channels`.`id` = `channel_user`.`channel_id` and `notifications` = ignore and `channel_user`.`user_id` is null) or (`ignore` = 1 and not exists (select * from `channel_user` where `channels`.`id` = `channel_user`.`channel_id` and `notifications` is not null and `channel_user`.`user_id` is null))) and `id` in (1, 2, 3, 4)) and (`channel_id` in (1, 2, 3, 4) and `deleted_at` is null or 0 = 1) and `posts`.`deleted_at` is null and not (exists (select * from `post_user` where `posts`.`id` = `post_user`.`post_id` and `notifications` = ignore and `post_user`.`user_id` is null)) order by `last_activity_at` desc limit 16) at ../mysite.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)
[stacktrace]
Hi @tobyzerner, you are right about using MariaDB 10.3, any chance Waterhole will support both databases on the future? Laravel Eloquent is solving these differences by default right? It might give the Waterhole project more traction when multiple database types are supported.
tobyzerner
changed the title
Column not found: 1054 Unknown column 'posts.id' in 'where clause'
Add support for MariaDB
Nov 17, 2023
Bug description
Just did a fresh install of the project, the whole installation process succeeded, migrations has run, db tables created, created a user also.
So I went to the project url and get 500 error. The logs say: Column not found: 1054 Unknown column 'posts.id' in 'where clause'
Steps to reproduce
Follow the steps as described here: https://waterhole.dev/docs/main/installation
Logs
Environment
The text was updated successfully, but these errors were encountered: