Closed crmpicco closed 5 years ago
@craue I believe I have a solution to prevent this table from being created. Would you be interested in me submitting a pull request for this?
Sure.
+1 interested too
@crmpicco, any progress?
I find a solution. You can configure doctrine/dbal to ignore those tables.
doctrine:
dbal:
[...]
schema_filter: ~^(?!craue_config_setting)~
I have a couple of follow-up question on this issue. I too would prefer that my custom settings entity table is created without the craue_config_setting
table, but creating this table is not a problem as long as I can be sure that it is not used. So far, during my tests all the settings data is saved in the custom settings table. Are there any circumstances when data would be saved in the craue_config_setting
table?
Also, could you explain why the craue_config_setting
table gets created in the first place, and how inheritance is set up? Since the custom settings table uses fields in the craue_config_setting
table, this looks like a case of Single Table Inheritance. But doesn't quite make sense because the BaseSetting
parent class doesn't have @InheritanceType("SINGLE_TABLE")
annotation.
Any help is greatly appreciated.
@crmpicco any progress on the PR?
@craue have you found any solution to prevent craue_config_setting
from being created while custom settings entity is enabled?
@j0k3r @craue Apologies, I never got around to finding a suitable solution for this. My "solution" was to delete the doctrine-mapping/Setting.orm.xml
file from disk which prevented the craue_config_setting
table from being created.
I have my own table, called config_setting
and if there was a way to configure the bundle to use that then I wouldn't have needed to be marooned on an old commit.
I have now picked this back up because I have upgraded Twig locally and the CraueConfigBundle commit I am on is using a deprecated function.
Is there a way to customise the table name or ignore the Setting.orm.xml
file entirely?
I think in the meantime I will need to fork this project and delete the doctrine mapping file and sync with upstream changes, but i'd rather use the parent project correct and not have to maintain a fork.
Do you have any advice?
Hey guys. Take a look at #50 and let me know if it works for you. Feedback is welcome.
Is there a way to prevent the default
craue_config_setting
table from being created when running adoctrine:migrations:diff
?I can create a custom entity in my application by doing this: https://github.com/craue/CraueConfigBundle#using-a-custom-entity-for-settings
...however although it produces the
config_setting
custom table, it also includes thecraue_config_setting
table too - which I don't need.