mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
c737ce992d
Modifying schema-sync implementation to use polling for OSS/Pro. Invalidations are now propagated via the `hdb_catalog.hdb_schema_notifications` table in OSS/Pro. Pattern followed is now a Listener/Processor split with Cloud listening for changes via a LISTEN/NOTIFY channel and OSS polling for resource version changes in the metadata table. See issue #460 for more details. GitOrigin-RevId: 48434426df02e006f4ec328c0d5cd5b30183db25
13 lines
441 B
SQL
13 lines
441 B
SQL
-- This migration adds the schema notification table
|
|
--
|
|
-- NOTE: In OSS this table only contains a single row (indicated by ID 1).
|
|
-- This may change to allow multiple notifications in future.
|
|
CREATE TABLE hdb_catalog.hdb_schema_notifications
|
|
(
|
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
notification JSON NOT NULL,
|
|
resource_version INTEGER NOT NULL DEFAULT 1,
|
|
instance_id UUID NOT NULL,
|
|
updated_at TIMESTAMPTZ DEFAULT NOW()
|
|
);
|