lib/generators/wasmify/pwa/templates/pwa/database.js in wasmify-rails-0.1.1 vs lib/generators/wasmify/pwa/templates/pwa/database.js in wasmify-rails-0.1.2

- old
+ new

@@ -2,17 +2,9 @@ export const setupSQLiteDatabase = async () => { const sqlite3 = await sqlite3InitModule(); console.log("Running SQLite3 version", sqlite3.version.libVersion); - const db = - "opfs" in sqlite3 - ? new sqlite3.oo1.OpfsDb("/railsdb.sqlite3") - : new sqlite3.oo1.DB("/railsdb.sqlite3", "ct"); - console.log( - "opfs" in sqlite3 - ? `OPFS is available, created persisted database at ${db.filename}` - : `OPFS is not available, created transient database ${db.filename}`, - ); - + // NOTE: This database is transient and will be lost if you uninstall the service worker (aka hard reset) + const db = new sqlite3.oo1.DB("/railsdb.sqlite3", "ct"); return db; };