forked from 3wordchant/capsul-flask
Add basic "create" API..
.. using server-side API tokens
This commit is contained in:
2
capsulflask/schema_migrations/16_down_api_tokens.py
Normal file
2
capsulflask/schema_migrations/16_down_api_tokens.py
Normal file
@ -0,0 +1,2 @@
|
||||
DROP TABLE api_keys;
|
||||
UPDATE schemaversion SET version = 15;
|
9
capsulflask/schema_migrations/16_up_api_tokens.py
Normal file
9
capsulflask/schema_migrations/16_up_api_tokens.py
Normal file
@ -0,0 +1,9 @@
|
||||
CREATE TABLE api_tokens (
|
||||
id SERIAL PRIMARY KEY,
|
||||
email TEXT REFERENCES accounts(email) ON DELETE RESTRICT,
|
||||
name TEXT NOT NULL,
|
||||
created TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
token TEXT NOT NULL
|
||||
);
|
||||
|
||||
UPDATE schemaversion SET version = 16;
|
Reference in New Issue
Block a user