capsul-flask/capsulflask/schema_migrations/17_up_api_tokens.py

10 lines
309 B
Python
Raw Normal View History

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
);
2021-07-11 10:35:35 +00:00
UPDATE schemaversion SET version = 17;