capsul-flask/capsulflask/schema_migrations/16_up_api_tokens.py
3wc 3b978b781f Add basic "create" API..
.. using server-side API tokens
2021-07-11 00:57:27 +02:00

10 lines
309 B
Python

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;