-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Database table prefix support #2714
Comments
We are using the Ruby on Rails framework and it doesn't look like it has good support for using a global table prefix. Normally our users create a dedicated database for Huginn which also makes backups a lot easier. |
Oh interesting. I didn't thought about framework limitations. Table prefix is useful for saas systems, having to deal with a significant amount of services for multiple clients/customers/orgs/etc. |
Especially in that use case having one database per customer would be beneficial, otherwise one customer could read the data of another. Any reason why you can't use a separate database for Huginn? |
Sure i can and i did that like a workaround, but it makes more complex the setup because i have to create the db, config user permissions for this new db, etc. |
I understand that it would be easier to set up in certain scenarios, but don't see one in which it is a good idea. Not sure if there are databases that support setting permissions on a table (prefix) level, but even if there is I think the required configuration of either creating a DB per Huginn instance or setting permissions per prefix sounds similar to me. |
Would be interesting to learn why softwares like Matomo, MediaWiki, Gitea, Yourls and others support it. I really don't know if there is a "best practice" on this database management doubt 😕 . |
In my experience most PHP applications support it because they are commonly hosted using shared hosting providers which used to give you only one database per account. |
Actually it's required to have a dedicated database for huginn to not merge tables from other software systems.
Some cool foss projects like MediaWiki, Matomo, etc have an environment variable to set table prefix. I think it's something easy to provide and extremely useful for users that have multiple softwares and wants to have them in one database.
Mediawiki example: https://www.mediawiki.org/wiki/Manual:$wgDBprefix
The text was updated successfully, but these errors were encountered: