mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
041b86e6e5
* example draft * fmt * db delete * db * oops clippy * clippy 2 * - nightly ? * fmt * - cargo all features?
26 lines
714 B
SQL
26 lines
714 B
SQL
PRAGMA foreign_keys = ON;
|
|
|
|
CREATE TABLE IF NOT EXISTS users (
|
|
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
email TEXT NOT NULL UNIQUE,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS user_permissions (
|
|
user_id INTEGER NOT NULL,
|
|
token TEXT NOT NULL
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS csrf_tokens (
|
|
csrf_token TEXT NOT NULL PRIMARY KEY UNIQUE
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS google_tokens (
|
|
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
user_id INTEGER NOT NULL UNIQUE,
|
|
access_secret TEXT NOT NULL,
|
|
refresh_secret TEXT NOT NULL,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
FOREIGN KEY (user_id) REFERENCES users(id) CONFLICT REPLACE
|
|
);
|
|
|