SQL
CREATE TABLE oauth_session (
id TEXT NOT NULL,
user_id TEXT NOT NULL,
provider TEXT NOT NULL,
token TEXT NOT NULL,
expires_at BIGINT NOT NULL,
created_at BIGINT NOT NULL,
updated_at BIGINT NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY(user_id) REFERENCES user (id) ON DELETE CASCADE
)
Columns
| Column | Data type | Allow null | Primary key | Actions |
|---|---|---|---|---|
id |
TEXT |
✓ | Rename | Drop | |
user_id |
TEXT |
Rename | Drop | ||
provider |
TEXT |
Rename | Drop | ||
token |
TEXT |
Rename | Drop | ||
expires_at |
BIGINT |
Rename | Drop | ||
created_at |
BIGINT |
Rename | Drop | ||
updated_at |
BIGINT |
Rename | Drop |
Foreign Keys
| Column | Destination |
|---|---|
user_id |
user.id |
Indexes
| Name | Columns | Unique | SQL | Drop? |
|---|---|---|---|---|
| idx_oauth_session_expires_at |
expires_at
|
SQL | Drop | |
| idx_oauth_session_user_id |
user_id
|
SQL | Drop | |
| idx_oauth_session_user_provider |
|
SQL | Drop | |
| sqlite_autoindex_oauth_session_1 |
id
|
✓ | SQL | Drop |