Add an ApiToken model, and an endpoint to get one
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE api_tokens;
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Your SQL goes here
|
||||
CREATE TABLE api_tokens (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
value TEXT NOT NULL,
|
||||
scopes TEXT NOT NULL,
|
||||
app_id INTEGER NOT NULL REFERENCES apps(id) ON DELETE CASCADE,
|
||||
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE
|
||||
)
|
||||
Reference in New Issue
Block a user