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.
@@ -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` so schema changes to models (like new
28
- // subscription fields) are reflected in the database automatically
29
- // without requiring manual migrations for this small service.
30
- await sequelize.sync({ alter: true });
31
- logger.info('Database connection established and models synchronized.');
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.6",
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",