This repository contains some test cases created to assist the Electric-SQL team.
See GitHub issue 1001 for details.
Reproducible in commit 10e5ff75b4fc92852ef04cbff69c167024aac7d1 on main. Fixed by upgrading to Electric 0.9.6 in the following commit.
Failing referential integrity when doing overlapping deletes and inserts, Discussed in Discord. Test case and instructions can be found in the electric_8_1 branch.
This is a web application using ElectricSQL in the browser with wa-sqlite.
You need NodeJS >= 16.11 and Docker Compose v2.
Install the dependencies:
npm install
Start Postgres and Electric using Docker (see running the examples for more options):
npm run backend:up
# Or `npm run backend:start` to foreground
Note that, if useful, you can connect to Postgres using:
npm run db:psql
Setup your database schema:
npm run db:migrate
Generate your type-safe client:
npm run client:generate
# or `npm run client:watch`` to re-generate whenever the DB schema changes
Start your app:
npm run dev
Open localhost:5173 in your web browser.
This template contains the basic Electric code which you can adapt to your use case. For more information see the:
If you need help let us know on Discord.