Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhamp committed Sep 7, 2024
1 parent e5b9283 commit 81618f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/server/php.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ function serveApp(secret, apiPort, phpIniSettings) {
if (!runningSecureBuild()) {
callPhp(['artisan', 'storage:link', '--force'], phpOptions, phpIniSettings);
}
if (store.get('migrated_version') !== electron_1.app.getVersion() && process.env.NODE_ENV !== 'development') {
if (store.get('migrated_version') !== electron_1.app.getVersion() && (process.env.NODE_ENV !== 'development' || runningSecureBuild())) {
console.log('Migrating database...');
callPhp(['artisan', 'migrate', '--force'], phpOptions, phpIniSettings);
store.set('migrated_version', electron_1.app.getVersion());
}
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV === 'development' && !runningSecureBuild()) {
console.log('Skipping Database migration while in development.');
console.log('You may migrate manually by running: php artisan native:migrate');
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/php.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ function serveApp(secret, apiPort, phpIniSettings): Promise<ProcessResult> {
}

// Migrate the database
if (store.get('migrated_version') !== app.getVersion() && process.env.NODE_ENV !== 'development') {
if (store.get('migrated_version') !== app.getVersion() && (process.env.NODE_ENV !== 'development' || runningSecureBuild())) {
console.log('Migrating database...')
callPhp(['artisan', 'migrate', '--force'], phpOptions, phpIniSettings)
store.set('migrated_version', app.getVersion())
}

if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV === 'development' && ! runningSecureBuild()) {
console.log('Skipping Database migration while in development.')
console.log('You may migrate manually by running: php artisan native:migrate')
}
Expand Down

0 comments on commit 81618f7

Please sign in to comment.