Web SQL to SQLite Wasm Migration

This demo shows how you can migrate a Web SQL database over to SQLite Wasm database.

To debug, open Chrome DevTools on the "Application" tab and check the "Web SQL" section. For debugging the OPFS, you can install the OPFS Explorer Chrome DevTools extension.

There is no way to programmatically delete a Web SQL database. You can only ask the user to clear site data in DevTools, or even to delete the database manually with the file explorer.

  1. This step creates a Web SQL database with sample data.

  2. This step shows the SQL statements required to dump the data from Web SQL.

  3. This step runs each SQL statement from above to migrate the data from Web SQL to SQLite, persisted on the OPFS.

    (⚠️ Warning: this example deletes any other data that may exist on the OPFS.)

  4. This steps deletes all tables in the Web SQL database after the migration.


Migration not started.