summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2025-02-23 17:01:01 -0800
committerJesse Morgan <jesse@jesterpm.net>2025-02-23 17:01:01 -0800
commitd347e8286bae38b3949f6e0f58d8ab8632cd9c0e (patch)
tree92975f797793f7a1da379cd6274da23cea29bc4a /schema
parent8ecaed3d2f5a19bf1a5c4cb077658e1bd3bc8438 (diff)
Track token expirationreauthorize
Force reauthentication after the token expires.
Diffstat (limited to 'schema')
-rw-r--r--schema/migrations/0013.sql2
-rw-r--r--schema/mysql.sql1
-rw-r--r--schema/sqlite.sql1
3 files changed, 4 insertions, 0 deletions
diff --git a/schema/migrations/0013.sql b/schema/migrations/0013.sql
new file mode 100644
index 0000000..709ad21
--- /dev/null
+++ b/schema/migrations/0013.sql
@@ -0,0 +1,2 @@
+ALTER TABLE users
+ADD COLUMN `micropub_token_expiration` datetime DEFAULT NULL;
diff --git a/schema/mysql.sql b/schema/mysql.sql
index d6210d9..63b8346 100644
--- a/schema/mysql.sql
+++ b/schema/mysql.sql
@@ -6,6 +6,7 @@ CREATE TABLE `users` (
`micropub_endpoint` varchar(255) DEFAULT NULL,
`micropub_media_endpoint` varchar(255) DEFAULT NULL,
`micropub_access_token` text,
+ `micropub_token_expiration` datetime DEFAULT NULL,
`micropub_scope` varchar(255) DEFAULT NULL,
`micropub_response` text,
`micropub_slug_field` varchar(255) NOT NULL DEFAULT 'mp-slug',
diff --git a/schema/sqlite.sql b/schema/sqlite.sql
index 310b2ae..9170e83 100644
--- a/schema/sqlite.sql
+++ b/schema/sqlite.sql
@@ -6,6 +6,7 @@ CREATE TABLE users (
micropub_endpoint TEXT,
micropub_media_endpoint TEXT,
micropub_access_token TEXT,
+ micropub_token_expiration datetime,
micropub_scope TEXT,
micropub_response TEXT,
micropub_slug_field TEXT default 'mp-slug',