8000 wip · NativePHP/electron-plugin@5775de9 · GitHub
[go: up one dir, main page]

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

Commit 5775de9

Browse files
committed
wip
1 parent a829b6f commit 5775de9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dist/server/php.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,14 @@ function serveApp(secret, apiPort) {
139139
};
140140
const store = new electron_store_1.default();
141141
callPhp(['artisan', 'storage:link', '--force'], phpOptions);
142-
if (store.get('migrated_version') !== electron_1.app.getVersion() || process.env.NODE_ENV === 'development') {
142+
if (store.get('migrated_version') !== electron_1.app.getVersion() && process.env.NODE_ENV !== 'development') {
143143
console.log('Migrating database...');
144144
callPhp(['artisan', 'migrate', '--force'], phpOptions);
145145
store.set('migrated_version', electron_1.app.getVersion());
146146
}
147-
else {
148-
console.log('Database already migrated', store.get('migrated_version'));
147+
if (process.env.NODE_ENV === 'development') {
148+
console.log('Skipping Database migration while in development.');
149+
console.log('You may migrate manually by running: php artisan native:migrate');
149150
}
150151
const phpPort = yield getPhpPort();
151152
const serverPath = (0, path_1.join)(appPath, 'vendor', 'laravel', 'framework', 'src', 'Illuminate', 'Foundation', 'resources', 'server.php');

0 commit comments

Comments
 (0)
0