diff options
Diffstat (limited to 'migrations/sqlite')
-rw-r--r-- | migrations/sqlite/2021-02-10-174254_create_emergency_access/down.sql | 1 | ||||
-rw-r--r-- | migrations/sqlite/2021-02-10-174254_create_emergency_access/up.sql | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/migrations/sqlite/2021-02-10-174254_create_emergency_access/down.sql b/migrations/sqlite/2021-02-10-174254_create_emergency_access/down.sql new file mode 100644 index 00000000..0a5f4d12 --- /dev/null +++ b/migrations/sqlite/2021-02-10-174254_create_emergency_access/down.sql @@ -0,0 +1 @@ +DROP TABLE emergency_access;
\ No newline at end of file diff --git a/migrations/sqlite/2021-02-10-174254_create_emergency_access/up.sql b/migrations/sqlite/2021-02-10-174254_create_emergency_access/up.sql new file mode 100644 index 00000000..07e50f3d --- /dev/null +++ b/migrations/sqlite/2021-02-10-174254_create_emergency_access/up.sql @@ -0,0 +1,14 @@ +CREATE TABLE emergency_access ( + uuid TEXT NOT NULL PRIMARY KEY, + grantor_uuid TEXT REFERENCES users (uuid), + grantee_uuid TEXT REFERENCES users (uuid), + email TEXT, + key_encrypted TEXT, + atype INTEGER NOT NULL, + status INTEGER NOT NULL, + wait_time_days INTEGER NOT NULL, + recovery_initiated_at DATETIME, + last_notification_at DATETIME, + updated_at DATETIME NOT NULL, + created_at DATETIME NOT NULL +);
\ No newline at end of file |