status-go/static/chat_db_migrations/1558084410_add_secret.up.sql

12 lines
301 B
MySQL
Raw Normal View History

2019-05-23 08:47:20 +00:00
CREATE TABLE secrets (
identity BLOB NOT NULL PRIMARY KEY ON CONFLICT IGNORE,
secret BLOB NOT NULL
);
2019-05-23 08:47:20 +00:00
CREATE TABLE secret_installation_ids (
id TEXT NOT NULL,
identity_id BLOB NOT NULL,
UNIQUE(id, identity_id) ON CONFLICT IGNORE,
2019-05-23 08:47:20 +00:00
FOREIGN KEY (identity_id) REFERENCES secrets(identity)
);