mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
feat: Enhance Electric SQL integration and update notification handling
- Added initialization script for Electric SQL user in Docker setup. - Updated Electric SQL client to support new PGlite architecture and sync functionality. - Improved notification fetching and syncing logic in useNotifications hook. - Refactored ElectricProvider to handle initialization state and errors more gracefully. - Removed deprecated electric.config.ts file and adjusted package dependencies accordingly.
This commit is contained in:
parent
82c6dd0221
commit
f441c7b0ce
10 changed files with 376 additions and 1046 deletions
|
|
@ -19,5 +19,12 @@ GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO electric;
|
|||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO electric;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON SEQUENCES TO electric;
|
||||
|
||||
-- Note: Electric SQL will create its own publications automatically
|
||||
-- We don't need to create publications here
|
||||
-- Create the publication that Electric SQL expects
|
||||
-- Electric will add tables to this publication when shapes are subscribed
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_publication WHERE pubname = 'electric_publication_default') THEN
|
||||
CREATE PUBLICATION electric_publication_default;
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue