18 Replies
Project ID:
N/A
Since railway has no option for persistent storage volumes (yet) every time a redeploy happens everything in the container is lost and your code will create a new empty sqlite3 database. The best course of action would probably be to add a mysql service to your project and use that in place of sqlite3, most commands/querys are the same between sqlite3 and mysql so it shouldn't be too hard to implement
okay okay if i implement mysql the problem will be solved right ?
Yep since the mysql service retains its data
I won't need to add that database manually to my github project right ?
sorry for asking too many questions it's just very important to me
You add the mysql service in your project then you would use the environment variables provideded in your code
okay thank you very much
have a nice day 😄
You too!
Happy coding!
thanks!
im using mysqlite rn and the problem is not solved
Did you get it working with mysql though?
yep
You created another help thread, so you have got it to connect since then?
yes yes
i connected to the database and i add some values then i restart the bot
can you confirm the values are in the database before redploy? You can look at the data in the "data" tab of the mysql service
okay please wait im testing something rn
okay i guess its my fault
sorry for that :(
Yalim, please don't spam the server with multiple help threads.
understood👍
?