diff --git a/src/db-sql/migration.ts b/src/db-sql/migration.ts index e06636bd..d8c61f89 100644 --- a/src/db-sql/migration.ts +++ b/src/db-sql/migration.ts @@ -53,7 +53,7 @@ const MIGRATIONS = [ secretBase64 TEXT NOT NULL ); - INSERT INTO secret (id, secretBase64) VALUES (1, '${secretBase64}'); + INSERT OR IGNORE INTO secret (id, secretBase64) VALUES (1, '${secretBase64}'); CREATE TABLE IF NOT EXISTS settings ( id INTEGER PRIMARY KEY AUTOINCREMENT, @@ -89,7 +89,7 @@ const MIGRATIONS = [ CREATE INDEX IF NOT EXISTS idx_settings_accountDid ON settings(accountDid); - INSERT INTO settings (id, apiServer) VALUES (1, '${DEFAULT_ENDORSER_API_SERVER}'); + INSERT OR IGNORE INTO settings (id, apiServer) VALUES (1, '${DEFAULT_ENDORSER_API_SERVER}'); CREATE TABLE IF NOT EXISTS contacts ( id INTEGER PRIMARY KEY AUTOINCREMENT,