php-pds / skeleton

Standard PHP package skeleton.
Creative Commons Attribution Share Alike 4.0 International
2.3k stars 167 forks source link

Where does the database go? #37

Closed fulldecent closed 7 years ago

fulldecent commented 7 years ago

SQLite databases can be included directly in the PHP project repository.

Here is one example: https://github.com/fulldecent/19-questions (local/database.db).

Is there or should there be a defined location for such files?

Note: configuration files and databases are similar in that they will have different versions between production and QA deployments. Also, they will both be excluded in .gitignore.

pmjones commented 7 years ago

In the research, SQLite was very uncommon. You can see yourself at https://github.com/php-pds/skeleton_research/blob/1.x/results/addendum-dirs.txt. When you find for "sql" directories there are only around 250 entries from across 110,000 packages. "Database" fares a little better, at around 1000 or so, but that's still pretty uncommon. (Similar results for top-level files as well: https://github.com/php-pds/skeleton_research/blob/1.x/results/addendum-files.txt)

As such, the standard neither specifies nor prohibits SQLite databases in any particular location.

fulldecent commented 7 years ago

Got it, thanks for pointing me to good data.