You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it's a better practice to store data in a proper database instead of random json files.
Pros
All data in one location
Apps can have an actual ID (auto incrementing)
No more boost json
Can use db fixtures for unit testing different scenarios
Can use proper migrations when the db structure changes, storing the db version in migration table... with up and down migrations. For down migrations Sunshine could download the downgrade SQL file from the git repo since it wouldn't be available in the previous versions of Sunshine.
Honestly for a project like Sunshine I don't think you need to bother. SQL is very powerful, especially at scale, but it also comes with a lot of overhead. Just making all the data structures fit in columns can be additional work, like prep commands would need their own table in addition to the applications table, and of course a third table to link the other two.
I think you can still get away with regular config/data files, that's what most of the self-hosted apps I know use as well. You can use version fields for breaking changes if need be, and for testing you can have "golden" files for reference.
It is a shame that not everything is stored in the one file, but I feel like it's too late to change this now, the opportunity for it was about five years ago now.
Activity
jorys-paulin commentedon Aug 11, 2026
Honestly for a project like Sunshine I don't think you need to bother. SQL is very powerful, especially at scale, but it also comes with a lot of overhead. Just making all the data structures fit in columns can be additional work, like prep commands would need their own table in addition to the applications table, and of course a third table to link the other two.
I think you can still get away with regular config/data files, that's what most of the self-hosted apps I know use as well. You can use version fields for breaking changes if need be, and for testing you can have "golden" files for reference.
It is a shame that not everything is stored in the one file, but I feel like it's too late to change this now, the opportunity for it was about five years ago now.