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

cannot run migrate:fresh after setup #54

Closed
rasyidialwee opened this issue Mar 29, 2021 · 4 comments
Closed

cannot run migrate:fresh after setup #54

rasyidialwee opened this issue Mar 29, 2021 · 4 comments

Comments

@rasyidialwee
Copy link

hello i manage to install and use laravel-setting package. however when i try to run php artisan migrate:fresh it show error
Base table or view not found: 1146 Table 'reacx.settings' doesn't exist (SQL: select name, payloadfromsettingswheregroup = system)

@rubenvanassche
Copy link
Member

Hi @rasyidialwee,

You should first publish the settings migration that was supplied with the package(https://github.com/spatie/laravel-settings/blob/master/database/migrations/create_settings_table.php.stub). Be sure to add this migration before any settings migration since this one will create the settings table, the other settings migrations will only add items to this table.

@rasyidialwee
Copy link
Author

rasyidialwee commented Mar 31, 2021 via email

@rasyidialwee
Copy link
Author

rasyidialwee commented Mar 31, 2021 via email

@chengkangzai
Copy link

got same problem and just wanna say thanks to dropping the fix !

If anyone come across this problem, checkout your backtrace from laravel.log to see which class is using the class and use class_exists(Setting::class) to ensure the class exist before you call it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants