Faroeste-Roleplay / frp_core

An experimental framework for RedM.
https://faroeste.gitbook.io/docs/
GNU General Public License v3.0
8 stars 1 forks source link

Database issues #7

Open r3ps4J opened 2 months ago

r3ps4J commented 2 months ago

Hi! In your recipe you first try to create the "faroeste" database and then remove the configured database with {{dbName}}. After that when running the db.sql from the core resource it tries to create the "faroeste" database once again.

This causes problems when trying to install with the txAdminRecipe. If the database user does not have access to the "faroeste" database, or there is already one and you're installing a second server for instance, the recipe fails.

I would like to suggest to only create and insert data into the configured database. txAdmin will remove the database if users checked the "delete if already exists" checkbox and will otherwise just create it if it doesn't exist. This would make it much easier to create a new faroeste server!

abdulkadiraktas commented 2 months ago

I don't understand exactly what part you are having trouble with. Did you watch this video? https://www.youtube.com/watch?v=F1vVW4GHTbQ

If you have any suggestions, please submit a PR to this repo.

https://github.com/Faroeste-Roleplay/txAdminRecipe

r3ps4J commented 2 months ago

If your database name is not "faroeste" it won't work, because it force creates the "faroeste" database. If your database user does not have access to this, the recipe fails.

For instance, if you run your server in pterodactyl, you will get a database user and database name assigned. You cannot change this database, delete it or create other ones. So when you fill that in in txAdmin, it should get used in the recipe.

abdulkadiraktas commented 2 months ago

I understand the problem better now.

klandestino7 commented 2 months ago

Thanks for the report, I'll check it soon