Skip to content

Commit

Permalink
add clientId to metadata migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetised committed Nov 9, 2022
1 parent c61b519 commit d711685
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion expo/migrations/1666288242_init/satellite.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS _electric_migrations (
);

-- Initialisation of the metadata table
INSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA==');
INSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA=='), ('clientId', '');


-- These are toggles for turning the triggers on and off
Expand Down
2 changes: 1 addition & 1 deletion expo/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const data = {
"-- The ops log table\nCREATE TABLE IF NOT EXISTS _electric_oplog (\n rowid INTEGER PRIMARY KEY AUTOINCREMENT,\n namespace String NOT NULL,\n tablename String NOT NULL,\n optype String NOT NULL,\n primaryKey String NOT NULL,\n newRow String,\n oldRow String,\n timestamp TEXT\n);",
"-- Somewhere to keep our metadata\nCREATE TABLE IF NOT EXISTS _electric_meta (\n key TEXT,\n value BLOB\n);",
"-- Somewhere to track migrations\nCREATE TABLE IF NOT EXISTS _electric_migrations (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL UNIQUE,\n sha256 TEXT NOT NULL,\n applied_at TEXT NOT NULL\n);",
"-- Initialisation of the metadata table\nINSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA==');",
"-- Initialisation of the metadata table\nINSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA=='), ('clientId', '');",
"-- These are toggles for turning the triggers on and off\nDROP TABLE IF EXISTS _electric_trigger_settings;",
"CREATE TABLE _electric_trigger_settings(tablename STRING PRIMARY KEY, flag INTEGER);"
],
Expand Down
2 changes: 1 addition & 1 deletion react-native/migrations/1666288242_init/satellite.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS _electric_migrations (
);

-- Initialisation of the metadata table
INSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA==');
INSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA=='), ('clientId', '');


-- These are toggles for turning the triggers on and off
Expand Down
2 changes: 1 addition & 1 deletion react-native/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const data = {
"-- The ops log table\nCREATE TABLE IF NOT EXISTS _electric_oplog (\n rowid INTEGER PRIMARY KEY AUTOINCREMENT,\n namespace String NOT NULL,\n tablename String NOT NULL,\n optype String NOT NULL,\n primaryKey String NOT NULL,\n newRow String,\n oldRow String,\n timestamp TEXT\n);",
"-- Somewhere to keep our metadata\nCREATE TABLE IF NOT EXISTS _electric_meta (\n key TEXT,\n value BLOB\n);",
"-- Somewhere to track migrations\nCREATE TABLE IF NOT EXISTS _electric_migrations (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL UNIQUE,\n sha256 TEXT NOT NULL,\n applied_at TEXT NOT NULL\n);",
"-- Initialisation of the metadata table\nINSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA==');",
"-- Initialisation of the metadata table\nINSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA=='), ('clientId', '');",
"-- These are toggles for turning the triggers on and off\nDROP TABLE IF EXISTS _electric_trigger_settings;",
"CREATE TABLE _electric_trigger_settings(tablename STRING PRIMARY KEY, flag INTEGER);"
],
Expand Down
2 changes: 1 addition & 1 deletion web/migrations/1666288242_init/satellite.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS _electric_migrations (
);

-- Initialisation of the metadata table
INSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA==');
INSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA=='), ('clientId', '');


-- These are toggles for turning the triggers on and off
Expand Down
2 changes: 1 addition & 1 deletion web/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const data = {
"-- The ops log table\nCREATE TABLE IF NOT EXISTS _electric_oplog (\n rowid INTEGER PRIMARY KEY AUTOINCREMENT,\n namespace String NOT NULL,\n tablename String NOT NULL,\n optype String NOT NULL,\n primaryKey String NOT NULL,\n newRow String,\n oldRow String,\n timestamp TEXT\n);",
"-- Somewhere to keep our metadata\nCREATE TABLE IF NOT EXISTS _electric_meta (\n key TEXT,\n value BLOB\n);",
"-- Somewhere to track migrations\nCREATE TABLE IF NOT EXISTS _electric_migrations (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL UNIQUE,\n sha256 TEXT NOT NULL,\n applied_at TEXT NOT NULL\n);",
"-- Initialisation of the metadata table\nINSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA==');",
"-- Initialisation of the metadata table\nINSERT INTO _electric_meta (key, value) VALUES ('compensations', 0), ('lastAckdRowId','0'), ('lastSentRowId', '0'), ('lsn', 'MA=='), ('clientId', '');",
"-- These are toggles for turning the triggers on and off\nDROP TABLE IF EXISTS _electric_trigger_settings;",
"CREATE TABLE _electric_trigger_settings(tablename STRING PRIMARY KEY, flag INTEGER);"
],
Expand Down

0 comments on commit d711685

Please sign in to comment.