Hacker News new | ask | show | jobs
by whereareyouwow 2499 days ago
You should post on r/selfhosted (https://www.reddit.com/r/selfhosted/)

Been waiting for something like this for a long time ...

Only thing I would change is use sqlite rather than mysql. That way your data is in a single file that is easily portable.

3 comments

It's using Doctrine so the configuration should be easy to change in the .env file. Update the "DATABASE_URL" line to...

`DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"`

And point it to the correct directory where your file is located.

I can't edit, but I was hoping the backticks would create a code block, so please ignore those backticks. Also, more details can be found on their documentation [0].

[0] https://symfony.com/doc/current/doctrine.html#configuring-th...

  DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
Use two or more spaces at the start of the line: https://news.ycombinator.com/formatdoc
That's helpful, thank you.
I mean, you get a similarly portable file with

mysqldump -u username -p database_name > data-dump.sql

and you can load that dump back in with

mysql -u username -p new_database < data-dump.sql

I love sqlite3 for the ease of setting up, and the ability to use in any device or environment immediately, but I'll go to a more featured database like postgres or mysql for larger projects, or for speed. This projects seems to benefit with using mysql to be able to secure the database with a password, as well as the ability to have a timestamp type (but the project saves timestamps with a string rather than a datatime except for user login timestamps so ¯\_(ツ)_/¯)

Hey thanks for that info - I will check that subreddit. I will stick to mysql. I agree that it would be more portable but I dont really intend to take it with me anywhere.