Skip to content

Commit

Permalink
using SQLITE_JOURNAL_MODE constant for the database
Browse files Browse the repository at this point in the history
  • Loading branch information
zaherg committed Nov 14, 2024
1 parent a135290 commit 6e2a8df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SCRIPT_DEBUG=true
GRAPHQL_DEBUG=true
WP_DEBUG=true
WP_DEBUG_DISPLAY=false
SQLITE_JOURNAL_MODE=WAL

# https://roots.io/salts.html
AUTH_KEY=
Expand Down
3 changes: 3 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
define('LOGGED_IN_SALT', $_ENV['LOGGED_IN_SALT']);
define('NONCE_SALT', $_ENV['NONCE_SALT']);

// Database
define('SQLITE_JOURNAL_MODE', $_ENV['SQLITE_JOURNAL_MODE'] ?? 'WAL');

// Development
define('SAVEQUERIES', $_ENV['APP_ENV'] !== 'production');
define('WP_DEBUG', true);
Expand Down
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@
"@php composer run install:clear",
"@php composer run install:env",
"@php composer run install:db",
"@php composer run install:db-update",
"@php composer run install:core",
"@php composer run install:theme"
],
"install:db-update": "@php -r \"system('sqlite3 ./public/content/database/.ht.sqlite \"PRAGMA journal_mode=WAL;\"');\"",
"install:clear": "@php -r \"is_dir('public/wp/wp-content') && system('rm -fr public/wp/wp-content');\"",
"install:core": "./vendor/bin/wp core install --admin_user=admin --admin_password=password [email protected] --skip-email --url=http://litepress.test --title=WordPress",
"install:db": "@php -r \"file_exists('public/content/db.php') || copy('public/content/plugins/sqlite-database-integration/db.copy','public/content/db.php');\"",
Expand Down

0 comments on commit 6e2a8df

Please sign in to comment.