When run migrate:fresh half way break, settings table not migrated, then prompt settings error for every command #23
-
When run I have manually create the table and rerun the command. I even run particular table also having the screenshot error.
Or any command I can run fix it? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
May I know the correct work flow ? let's say I have new settings, if I added the in the GeneralSettings.php new setting and also the migration file. When I push to server. git pull is pulling the GeneralSettings.php, then I run
How to avoid this? |
Beta Was this translation helpful? Give feedback.
-
Hi @shiroamada, This is a limitation from the package at the moment, we've got the same problem in our own project for which this package was developed. Since Laravel registers all the dependencies at the boot process of your application the settings classes are loaded too. Which means theses classes will try to fetch the settings from database, when that database is not yet migrated the settings class will crash because it cannot find the correct properties. At the moment there are two solutions to this:
I'm looking into this and I'm trying to make these settings lazy loaded, which means they will be loaded when a property is fetched but haven't find a proper solution for this. |
Beta Was this translation helpful? Give feedback.
-
Found any Solution? |
Beta Was this translation helpful? Give feedback.
-
i have same problem in CI/CD, how can i fix this issue? |
Beta Was this translation helpful? Give feedback.
Hi @shiroamada,
This is a limitation from the package at the moment, we've got the same problem in our own project for which this package was developed. Since Laravel registers all the dependencies at the boot process of your application the settings classes are loaded too. Which means theses classes will try to fetch the settings from database, when that database is not yet migrated the settings class will crash because it cannot find the correct properties.
At the moment there are two solutions to this:
I'm …