feat: create oauth_access_token table
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
36fd8a3f88
commit
aeffe0457c
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO oauth_access_token (\n access_token, token_type, expires_in, refresh_token, oauth_source, username\n ) VALUES ($1, $2, $3, $4, $5, $6)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Varchar",
|
||||
"Int4",
|
||||
"Text",
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "0c293d626373ce4627808db5a279819c92c31d7da01be12a20311f3bbc336f73"
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM\n oauth_state\n WHERE\n state = $1\n AND\n oauth_provider = $2;",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "990c3e8688a64f74509b1f6e941da7f59f5820ac37a95c3076a57624dde6af38"
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT EXISTS (\n SELECT 1\n FROM oauth_state\n WHERE\n state = $1\n AND\n oauth_provider = $2\n AND\n redirect_uri = $3\n );",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "exists",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "c2167fb709bc77df26a121c509dd20b8b9de098016e940416a5ee37e3f225fda"
|
||||
}
|
10
migrations/20240510074033_oauth_access_token.sql
Normal file
10
migrations/20240510074033_oauth_access_token.sql
Normal file
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE IF NOT EXISTS oauth_access_token (
|
||||
oauth_source TEXT NOT NULL,
|
||||
access_token TEXT NOT NULL,
|
||||
refresh_token TEXT NOT NULL,
|
||||
token_type VARCHAR(30) NOT NULL,
|
||||
expires_in INTEGER NOT NULL,
|
||||
username TEXT NOT NULL,
|
||||
UNIQUE (username, oauth_source),
|
||||
ID SERIAL PRIMARY KEY NOT NULL
|
||||
);
|
Loading…
Reference in a new issue