R
Railway2y ago
ra

sqlite 3 deletion problem

18 Replies
Percy
Percy2y ago
Project ID: N/A
Brody
Brody2y ago
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
ra
ra2y ago
okay okay if i implement mysql the problem will be solved right ?
Brody
Brody2y ago
Yep since the mysql service retains its data
ra
ra2y ago
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
Brody
Brody2y ago
You add the mysql service in your project then you would use the environment variables provideded in your code
ra
ra2y ago
okay thank you very much have a nice day 😄
Brody
Brody2y ago
You too! Happy coding!
ra
ra2y ago
thanks! im using mysqlite rn and the problem is not solved
Brody
Brody2y ago
Did you get it working with mysql though?
ra
ra2y ago
yep
Brody
Brody2y ago
You created another help thread, so you have got it to connect since then?
ra
ra2y ago
yes yes i connected to the database and i add some values then i restart the bot
Brody
Brody2y ago
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
ra
ra2y ago
okay please wait im testing something rn okay i guess its my fault sorry for that :(
angelo
angelo2y ago
Yalim, please don't spam the server with multiple help threads.
ra
ra2y ago
understood👍
Brody
Brody2y ago
?
Want results from more Discord servers?
Add your server