omnikey-cli 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend-dist/db.js +9 -5
- package/package.json +1 -1
package/backend-dist/db.js
CHANGED
|
@@ -24,11 +24,15 @@ else if (config_1.config.databaseUrl) {
|
|
|
24
24
|
async function initDatabase(logger) {
|
|
25
25
|
try {
|
|
26
26
|
await sequelize.authenticate();
|
|
27
|
-
// Use `alter: true`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
// Use `alter: true` only for Postgres, not for SQLite
|
|
28
|
+
if (sequelize.getDialect() === 'sqlite') {
|
|
29
|
+
await sequelize.sync();
|
|
30
|
+
logger.info('Database connection established and models synchronized (SQLite, no alter).');
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
await sequelize.sync({ alter: true });
|
|
34
|
+
logger.info('Database connection established and models synchronized (alter: true).');
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
catch (err) {
|
|
34
38
|
logger.error('Unable to connect to the database:', err);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.0.
|
|
7
|
+
"version": "1.0.7",
|
|
8
8
|
"description": "CLI for onboarding users to Omnikey AI and configuring OPENAI_API_KEY. Use Yarn for install/build.",
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=14.0.0",
|