RickDBCN / filament-email

Log emails in your Filament project
https://filament-email-demo.marcogermani.it/
MIT License
77 stars 23 forks source link

[Bug]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'team_id' in 'where clause' #59

Closed malle-pietje closed 4 months ago

malle-pietje commented 4 months ago

What happened?

After running composer update I am getting this error when accessing the main resource page for the email logs:

Screenshot 2024-05-09 122618

This is the relevant output from the composer update command:

Upgrading rickdbcn/filament-email (v1.3.1 => v1.4.0): Extracting archive

How to reproduce the bug

Simply upgrade from version 1.3.1 to 1.4.0.

The config file wasn't changed, here are the contents:

<?php

// config for RickDBCN/FilamentEmail
return [

    'resource' => [
        'group' => 'Logs',
        'sort' => null,
        'default_sort_column' => 'created_at',
        'default_sort_direction' => 'desc',
    ],

    'keep_email_for_days' => 60,
    'label' => null,
];

There are no pending migrations after the update.

Package Version

1.4.0

PHP Version

8.2.15

Laravel Version

10.48.10

Which operating systems does with happen with?

Linux

Notes

The app where this happened doesn't have a team model.

malle-pietje commented 4 months ago

After publishing and running the migrations, the error went away:

php artisan vendor:publish --tag="filament-email-migrations"
php artisan migrate

May I suggest adding a note to the README.md file to emphasize this step is required when upgrading?

By the way; thanks for maintaining this great plugin. It has been extremely useful in this specific app! 👍

marcogermani87 commented 4 months ago

After publishing and running the migrations, the error went away:

php artisan vendor:publish --tag="filament-email-migrations"
php artisan migrate

May I suggest adding a note to the README.md file to emphasize this step is required when upgrading?

By the way; thanks for maintaining this great plugin. It has been extremely useful in this specific app! 👍

Thanks @malle-pietje, in the last release i've added a notice into README