Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SQLite #29

Merged
merged 6 commits into from
Nov 7, 2023
Merged

Support SQLite #29

merged 6 commits into from
Nov 7, 2023

Conversation

bakerkretzmar
Copy link
Owner

@bakerkretzmar bakerkretzmar commented Nov 7, 2023

This PR adds support for using a SQLite database for preview sites instead of Forge-installed MySQL/MariaDB/Postgres.

Adding DB_CONNECTION=sqlite to the environment input will now make the action skip creating a database when creating a preview site, and configure the site to use the default SQLite connection details. The database file will be created automatically when migrations are run for the first time (during the first deployment).

I think this is a decent workaround for sites that don't need a database at all for now too. All Forge servers have SQLite installed so this will always work, but more importantly they all default to including artisan migrate --force in the deployment script, so completely bypassing all database setup is more complicated than just not creating one initially. If a preview site really doesn't need a database to exist at all, the easiest and fastest option is to set it up to use SQLite.

Closes #28.

@bakerkretzmar bakerkretzmar merged commit ef353d5 into main Nov 7, 2023
@bakerkretzmar bakerkretzmar deleted the sqlite-etc branch November 7, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for other database options
1 participant