mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-05-25 04:15:25 +00:00
2515 lines
78 KiB
JSON
2515 lines
78 KiB
JSON
{
|
|
"db": "PostgreSQL",
|
|
"02be1a7451e890cb0cc07b32c937881ac9bd1707eb498e20a3cf27737c95a949": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE compat_refresh_tokens\n SET next_token_id = $2\n WHERE id = $1\n "
|
|
},
|
|
"08896e50738af687ac53dc5ac5ae0b19bcac7503230ba90e11de799978d7a026": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "grant_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "grant_created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_cancelled_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_fulfilled_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_exchanged_at",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_scope",
|
|
"ordinal": 5,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_state",
|
|
"ordinal": 6,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_redirect_uri",
|
|
"ordinal": 7,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_response_mode",
|
|
"ordinal": 8,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_nonce",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_max_age",
|
|
"ordinal": 10,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "grant_acr_values",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "oauth2_client_id",
|
|
"ordinal": 12,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "grant_code",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_response_type_code",
|
|
"ordinal": 14,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_response_type_token",
|
|
"ordinal": 15,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_response_type_id_token",
|
|
"ordinal": 16,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_code_challenge",
|
|
"ordinal": 17,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_code_challenge_method",
|
|
"ordinal": 18,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_requires_consent",
|
|
"ordinal": 19,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "session_id?",
|
|
"ordinal": 20,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_id?",
|
|
"ordinal": 21,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_created_at?",
|
|
"ordinal": 22,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_id?",
|
|
"ordinal": 23,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username?",
|
|
"ordinal": 24,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_id?",
|
|
"ordinal": 25,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_created_at?",
|
|
"ordinal": 26,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 27,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 28,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 29,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 30,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n og.id AS grant_id,\n og.created_at AS grant_created_at,\n og.cancelled_at AS grant_cancelled_at,\n og.fulfilled_at AS grant_fulfilled_at,\n og.exchanged_at AS grant_exchanged_at,\n og.scope AS grant_scope,\n og.state AS grant_state,\n og.redirect_uri AS grant_redirect_uri,\n og.response_mode AS grant_response_mode,\n og.nonce AS grant_nonce,\n og.max_age AS grant_max_age,\n og.acr_values AS grant_acr_values,\n og.oauth2_client_id AS oauth2_client_id,\n og.code AS grant_code,\n og.response_type_code AS grant_response_type_code,\n og.response_type_token AS grant_response_type_token,\n og.response_type_id_token AS grant_response_type_id_token,\n og.code_challenge AS grant_code_challenge,\n og.code_challenge_method AS grant_code_challenge_method,\n og.requires_consent AS grant_requires_consent,\n os.id AS \"session_id?\",\n us.id AS \"user_session_id?\",\n us.created_at AS \"user_session_created_at?\",\n u.id AS \"user_id?\",\n u.username AS \"user_username?\",\n usa.id AS \"user_session_last_authentication_id?\",\n usa.created_at AS \"user_session_last_authentication_created_at?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM\n oauth2_authorization_grants og\n LEFT JOIN oauth2_sessions os\n ON os.id = og.oauth2_session_id\n LEFT JOIN user_sessions us\n ON us.id = os.user_session_id\n LEFT JOIN users u\n ON u.id = us.user_id\n LEFT JOIN user_session_authentications usa\n ON usa.session_id = us.id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE og.id = $1\n\n ORDER BY usa.created_at DESC\n LIMIT 1\n "
|
|
},
|
|
"096060f2be446fd77ee29308c673f9ba9210fb110444f4fccfeb976424ef4376": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE oauth2_authorization_grants AS og\n SET\n requires_consent = 'f'\n WHERE\n og.id = $1\n "
|
|
},
|
|
"0c056fcc1a85d00db88034bcc582376cf220e1933d2932e520c44ed9931f5c9d": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_refresh_tokens\n (oauth2_session_id, oauth2_access_token_id, token)\n VALUES\n ($1, $2, $3)\n RETURNING\n id, created_at\n "
|
|
},
|
|
"0ce16ae459b815e4fbef78784fafea08b30443741b6817dd1d722f4960dc19f8": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Int4",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Bool",
|
|
"Bool",
|
|
"Bool",
|
|
"Text",
|
|
"Bool"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_authorization_grants\n (oauth2_client_id, redirect_uri, scope, state, nonce, max_age,\n acr_values, response_mode, code_challenge, code_challenge_method,\n response_type_code, response_type_token, response_type_id_token,\n code, requires_consent)\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)\n RETURNING id, created_at\n "
|
|
},
|
|
"11f29a7b467bef1cf483d91eede7849707e01847542e4fc3c1be702560bf36bf": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text",
|
|
"TextArray",
|
|
"Bool",
|
|
"Bool",
|
|
"Text",
|
|
"Jsonb",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_clients\n (client_id,\n encrypted_client_secret,\n response_types,\n grant_type_authorization_code,\n grant_type_refresh_token,\n token_endpoint_auth_method,\n jwks,\n jwks_uri,\n contacts)\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, '{}')\n RETURNING id\n "
|
|
},
|
|
"307fd9f71e7a94a0a0d9ce523ee9792e127485d0d12480c43f179dd9b75afbab": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO user_sessions (user_id)\n VALUES ($1)\n RETURNING id, created_at\n "
|
|
},
|
|
"32c94e013dc6cc0422dd8bc9ceaaf9100fee09df0cf52f84086a619de2fbbaaf": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "compat_refresh_token_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_refresh_token",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_refresh_token_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_access_token_id",
|
|
"ordinal": 3,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_access_token",
|
|
"ordinal": 4,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_access_token_created_at",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_access_token_expires_at",
|
|
"ordinal": 6,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_id",
|
|
"ordinal": 7,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_session_created_at",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_deleted_at",
|
|
"ordinal": 9,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_device_id",
|
|
"ordinal": 10,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_id!",
|
|
"ordinal": 11,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username!",
|
|
"ordinal": 12,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 13,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 14,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 15,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 16,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n cr.id AS \"compat_refresh_token_id\",\n cr.token AS \"compat_refresh_token\",\n cr.created_at AS \"compat_refresh_token_created_at\",\n ct.id AS \"compat_access_token_id\",\n ct.token AS \"compat_access_token\",\n ct.created_at AS \"compat_access_token_created_at\",\n ct.expires_at AS \"compat_access_token_expires_at\",\n cs.id AS \"compat_session_id\",\n cs.created_at AS \"compat_session_created_at\",\n cs.deleted_at AS \"compat_session_deleted_at\",\n cs.device_id AS \"compat_session_device_id\",\n u.id AS \"user_id!\",\n u.username AS \"user_username!\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n\n FROM compat_refresh_tokens cr\n INNER JOIN compat_access_tokens ct\n ON ct.id = cr.compat_access_token_id\n INNER JOIN compat_sessions cs\n ON cs.id = cr.compat_session_id\n INNER JOIN users u\n ON u.id = cs.user_id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE cr.token = $1\n AND cr.next_token_id IS NULL\n AND cs.deleted_at IS NULL\n "
|
|
},
|
|
"366ea127c7b220960f17fd1b651600826ac10b8baf92f0e936fd07f34a7dc0fc": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE compat_access_tokens\n SET expires_at = NOW()\n WHERE id = $1\n "
|
|
},
|
|
"41b5ecd6860791ac6f90417ac51eb977b8c69a3dd81af4672b2592efb65963eb": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "user_email_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT \n ue.id AS \"user_email_id\",\n ue.email AS \"user_email\",\n ue.created_at AS \"user_email_created_at\",\n ue.confirmed_at AS \"user_email_confirmed_at\"\n FROM user_emails ue\n\n WHERE ue.user_id = $1\n\n ORDER BY ue.email ASC\n "
|
|
},
|
|
"494c17c20047e761b0dbdac0e13854af7955743afd970bbcae83ba944838c58e": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_id",
|
|
"ordinal": 1,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "username",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "last_authentication_id?",
|
|
"ordinal": 4,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "last_authd_at?",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 6,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 7,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 9,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n s.id,\n u.id AS user_id,\n u.username,\n s.created_at,\n a.id AS \"last_authentication_id?\",\n a.created_at AS \"last_authd_at?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM user_sessions s\n INNER JOIN users u \n ON s.user_id = u.id\n LEFT JOIN user_session_authentications a\n ON a.session_id = s.id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n WHERE s.id = $1 AND s.active\n ORDER BY a.created_at DESC\n LIMIT 1\n "
|
|
},
|
|
"4a6bee8775e2c614a28dc691e7e59d0e685859dc6cda07296326f2d9cfb09114": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text",
|
|
"Interval"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO compat_access_tokens (compat_session_id, token, created_at, expires_at)\n VALUES ($1, $2, NOW(), NOW() + $3)\n RETURNING id, created_at\n "
|
|
},
|
|
"4b9de6face2e21117c947b4f550cc747ad8397b6dfadb6bc6a84124763dc66e8": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE users\n SET primary_email_id = user_emails.id \n FROM user_emails\n WHERE user_emails.id = $1\n AND users.id = user_emails.user_id\n "
|
|
},
|
|
"51158bfcaa1a8d8e051bffe7c5ba0369bf53fb162f7622626054e89e68fc07bd": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "scope_token",
|
|
"ordinal": 0,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT scope_token\n FROM oauth2_consents\n WHERE user_id = $1 AND oauth2_client_id = $2\n "
|
|
},
|
|
"51d148123a4a4254f3fc16574a7136ed015808d5e967f00431f1f9ed12f72c93": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO compat_sessions (user_id, device_id)\n VALUES ($1, $2)\n RETURNING id, created_at\n "
|
|
},
|
|
"581243a7f0c033548cc9644e0c60855ecb8bfefe51779eb135dd7547b886de79": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE oauth2_sessions\n SET ended_at = NOW()\n WHERE id = $1\n "
|
|
},
|
|
"59e8a5de682642883a9b9fc1b522736fa4397f0a0c97074f2c8908e5956c0166": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text",
|
|
"Int4"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_access_tokens\n (oauth2_session_id, token, expires_after)\n VALUES\n ($1, $2, $3)\n RETURNING\n id, created_at\n "
|
|
},
|
|
"5a85be31a95fb0028e9ebc465b543b8daf4a65e80a35dcf8c710068cd9633df8": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "refresh_token_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "refresh_token",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "refresh_token_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "access_token_id?",
|
|
"ordinal": 3,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "access_token?",
|
|
"ordinal": 4,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "access_token_expires_after?",
|
|
"ordinal": 5,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "access_token_created_at?",
|
|
"ordinal": 6,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "session_id!",
|
|
"ordinal": 7,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "oauth2_client_id!",
|
|
"ordinal": 8,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "scope!",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_session_id!",
|
|
"ordinal": 10,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_created_at!",
|
|
"ordinal": 11,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_id!",
|
|
"ordinal": 12,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username!",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_id?",
|
|
"ordinal": 14,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_created_at?",
|
|
"ordinal": 15,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 16,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 17,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 18,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 19,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n rt.id AS refresh_token_id,\n rt.token AS refresh_token,\n rt.created_at AS refresh_token_created_at,\n at.id AS \"access_token_id?\",\n at.token AS \"access_token?\",\n at.expires_after AS \"access_token_expires_after?\",\n at.created_at AS \"access_token_created_at?\",\n os.id AS \"session_id!\",\n os.oauth2_client_id AS \"oauth2_client_id!\",\n os.scope AS \"scope!\",\n us.id AS \"user_session_id!\",\n us.created_at AS \"user_session_created_at!\",\n u.id AS \"user_id!\",\n u.username AS \"user_username!\",\n usa.id AS \"user_session_last_authentication_id?\",\n usa.created_at AS \"user_session_last_authentication_created_at?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM oauth2_refresh_tokens rt\n LEFT JOIN oauth2_access_tokens at\n ON at.id = rt.oauth2_access_token_id\n INNER JOIN oauth2_sessions os\n ON os.id = rt.oauth2_session_id\n INNER JOIN user_sessions us\n ON us.id = os.user_session_id\n INNER JOIN users u\n ON u.id = us.user_id\n LEFT JOIN user_session_authentications usa\n ON usa.session_id = us.id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE rt.token = $1\n AND rt.next_token_id IS NULL\n AND us.active\n AND os.ended_at IS NULL\n\n ORDER BY usa.created_at DESC\n LIMIT 1\n "
|
|
},
|
|
"5d1a17b2ad6153217551ae31549ad9d62cc39d2f9a4e62a7ccb60fd91e0ac685": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": []
|
|
}
|
|
},
|
|
"query": "\n DELETE FROM oauth2_access_tokens\n WHERE created_at + (expires_after * INTERVAL '1 second') + INTERVAL '15 minutes' < now()\n "
|
|
},
|
|
"5e4a73693e45ab55b6c166621fa2d033775762f589e18b889b5e41dbfaed1ca7": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text",
|
|
"TextArray",
|
|
"Bool",
|
|
"Bool",
|
|
"TextArray",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Jsonb",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_clients\n (client_id,\n encrypted_client_secret,\n response_types,\n grant_type_authorization_code,\n grant_type_refresh_token,\n contacts,\n client_name,\n logo_uri,\n client_uri,\n policy_uri,\n tos_uri,\n jwks_uri,\n jwks,\n id_token_signed_response_alg,\n userinfo_signed_response_alg,\n token_endpoint_auth_method,\n token_endpoint_auth_signing_alg,\n initiate_login_uri)\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18)\n RETURNING id\n "
|
|
},
|
|
"63522dddec4f2218fdb099473a80411d7f1c19b3750e27bb1f087357588e40c9": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "compat_access_token_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_access_token",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_access_token_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_access_token_expires_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_id",
|
|
"ordinal": 4,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_session_created_at",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_deleted_at",
|
|
"ordinal": 6,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_device_id",
|
|
"ordinal": 7,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_id!",
|
|
"ordinal": 8,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username!",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 10,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 12,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 13,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n ct.id AS \"compat_access_token_id\",\n ct.token AS \"compat_access_token\",\n ct.created_at AS \"compat_access_token_created_at\",\n ct.expires_at AS \"compat_access_token_expires_at\",\n cs.id AS \"compat_session_id\",\n cs.created_at AS \"compat_session_created_at\",\n cs.deleted_at AS \"compat_session_deleted_at\",\n cs.device_id AS \"compat_session_device_id\",\n u.id AS \"user_id!\",\n u.username AS \"user_username!\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n\n FROM compat_access_tokens ct\n INNER JOIN compat_sessions cs\n ON cs.id = ct.compat_session_id\n INNER JOIN users u\n ON u.id = cs.user_id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE ct.token = $1\n AND (ct.expires_at IS NULL OR ct.expires_at > NOW())\n AND cs.deleted_at IS NULL\n "
|
|
},
|
|
"647a2a5bbde39d0ed3931d0287b468bc7dedf6171e1dc6171a5d9f079b9ed0fa": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "hashed_password",
|
|
"ordinal": 0,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT up.hashed_password\n FROM user_passwords up\n WHERE up.user_id = $1\n ORDER BY up.created_at DESC\n LIMIT 1\n "
|
|
},
|
|
"685ab6c4742944fc87b4c72316b02b02e40c94ba624e8e4aade4ecfc436e7f96": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "encrypted_client_secret",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "redirect_uris!",
|
|
"ordinal": 3,
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"name": "response_types",
|
|
"ordinal": 4,
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"name": "grant_type_authorization_code",
|
|
"ordinal": 5,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_type_refresh_token",
|
|
"ordinal": 6,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "contacts",
|
|
"ordinal": 7,
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"name": "client_name",
|
|
"ordinal": 8,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "logo_uri",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "client_uri",
|
|
"ordinal": 10,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "policy_uri",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "tos_uri",
|
|
"ordinal": 12,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "jwks_uri",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "jwks",
|
|
"ordinal": 14,
|
|
"type_info": "Jsonb"
|
|
},
|
|
{
|
|
"name": "id_token_signed_response_alg",
|
|
"ordinal": 15,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "userinfo_signed_response_alg",
|
|
"ordinal": 16,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "token_endpoint_auth_method",
|
|
"ordinal": 17,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "token_endpoint_auth_signing_alg",
|
|
"ordinal": 18,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "initiate_login_uri",
|
|
"ordinal": 19,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
null,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n c.id,\n c.client_id,\n c.encrypted_client_secret,\n ARRAY(SELECT redirect_uri FROM oauth2_client_redirect_uris r WHERE r.oauth2_client_id = c.id) AS \"redirect_uris!\",\n c.response_types,\n c.grant_type_authorization_code,\n c.grant_type_refresh_token,\n c.contacts,\n c.client_name,\n c.logo_uri,\n c.client_uri,\n c.policy_uri,\n c.tos_uri,\n c.jwks_uri,\n c.jwks,\n c.id_token_signed_response_alg,\n c.userinfo_signed_response_alg,\n c.token_endpoint_auth_method,\n c.token_endpoint_auth_signing_alg,\n c.initiate_login_uri\n FROM oauth2_clients c\n\n WHERE c.client_id = $1\n "
|
|
},
|
|
"6da88febe6d8e45787cdd609dcea5f51dc601f4dffb07dd4c5d699c7d4c5b2d1": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "user_email_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO user_emails (user_id, email)\n VALUES ($1, $2)\n RETURNING \n id AS user_email_id,\n email AS user_email,\n created_at AS user_email_created_at,\n confirmed_at AS user_email_confirmed_at\n "
|
|
},
|
|
"703850ba4e001d53776d77a64cbc1ee6feb61485ce41aff1103251f9b3778128": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "fulfilled_at!: DateTime<Utc>",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE oauth2_authorization_grants AS og\n SET\n oauth2_session_id = os.id,\n fulfilled_at = os.created_at\n FROM oauth2_sessions os\n WHERE\n og.id = $1 AND os.id = $2\n RETURNING fulfilled_at AS \"fulfilled_at!: DateTime<Utc>\"\n "
|
|
},
|
|
"795ef686860689dd89ad7b23ea242fe7108bc1dc6db76e80b654fd5560f0c28f": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "encrypted_client_secret",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "redirect_uris!",
|
|
"ordinal": 3,
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"name": "response_types",
|
|
"ordinal": 4,
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"name": "grant_type_authorization_code",
|
|
"ordinal": 5,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_type_refresh_token",
|
|
"ordinal": 6,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "contacts",
|
|
"ordinal": 7,
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"name": "client_name",
|
|
"ordinal": 8,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "logo_uri",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "client_uri",
|
|
"ordinal": 10,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "policy_uri",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "tos_uri",
|
|
"ordinal": 12,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "jwks_uri",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "jwks",
|
|
"ordinal": 14,
|
|
"type_info": "Jsonb"
|
|
},
|
|
{
|
|
"name": "id_token_signed_response_alg",
|
|
"ordinal": 15,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "userinfo_signed_response_alg",
|
|
"ordinal": 16,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "token_endpoint_auth_method",
|
|
"ordinal": 17,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "token_endpoint_auth_signing_alg",
|
|
"ordinal": 18,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "initiate_login_uri",
|
|
"ordinal": 19,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
null,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n c.id,\n c.client_id,\n c.encrypted_client_secret,\n ARRAY(SELECT redirect_uri FROM oauth2_client_redirect_uris r WHERE r.oauth2_client_id = c.id) AS \"redirect_uris!\",\n c.response_types,\n c.grant_type_authorization_code,\n c.grant_type_refresh_token,\n c.contacts,\n c.client_name,\n c.logo_uri,\n c.client_uri,\n c.policy_uri,\n c.tos_uri,\n c.jwks_uri,\n c.jwks,\n c.id_token_signed_response_alg,\n c.userinfo_signed_response_alg,\n c.token_endpoint_auth_method,\n c.token_endpoint_auth_signing_alg,\n c.initiate_login_uri\n FROM oauth2_clients c\n\n WHERE c.id = $1\n "
|
|
},
|
|
"79c5cb47e7074be1f8d4684ab175ab8c3972b2a83f0abd2a47141fbd23793175": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_sessions\n (user_session_id, oauth2_client_id, scope)\n SELECT\n $1,\n og.oauth2_client_id,\n og.scope\n FROM\n oauth2_authorization_grants og\n WHERE\n og.id = $2\n RETURNING id, created_at\n "
|
|
},
|
|
"7de9cfa6e90ba20f5b298ea387cf13a7e40d0f5b3eb903a80d06fbe33074d596": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "confirmed_at",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE user_emails\n SET confirmed_at = NOW()\n WHERE id = $1\n RETURNING confirmed_at\n "
|
|
},
|
|
"81c673253d86035037695e0d2a3e24bfc8bbb5603c9291f9b5bcac64b43e1c04": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "compat_sso_login_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_token",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_redirect_uri",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_created_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_fullfilled_at",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_exchanged_at",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_id?",
|
|
"ordinal": 6,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_session_created_at?",
|
|
"ordinal": 7,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_deleted_at?",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_device_id?",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_id?",
|
|
"ordinal": 10,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username?",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 12,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 14,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 15,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n cl.id AS \"compat_sso_login_id\",\n cl.token AS \"compat_sso_login_token\",\n cl.redirect_uri AS \"compat_sso_login_redirect_uri\",\n cl.created_at AS \"compat_sso_login_created_at\",\n cl.fullfilled_at AS \"compat_sso_login_fullfilled_at\",\n cl.exchanged_at AS \"compat_sso_login_exchanged_at\",\n cs.id AS \"compat_session_id?\",\n cs.created_at AS \"compat_session_created_at?\",\n cs.deleted_at AS \"compat_session_deleted_at?\",\n cs.device_id AS \"compat_session_device_id?\",\n u.id AS \"user_id?\",\n u.username AS \"user_username?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM compat_sso_logins cl\n LEFT JOIN compat_sessions cs\n ON cs.id = cl.compat_session_id\n LEFT JOIN users u\n ON u.id = cs.user_id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n WHERE cl.id = $1\n "
|
|
},
|
|
"860722788c244caf722d1941e4b83aa421fd179586f9a1c2342c539fcb6c6361": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "compat_sso_login_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_token",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_redirect_uri",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_created_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_fullfilled_at",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_sso_login_exchanged_at",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_id?",
|
|
"ordinal": 6,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "compat_session_created_at?",
|
|
"ordinal": 7,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_deleted_at?",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "compat_session_device_id?",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_id?",
|
|
"ordinal": 10,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username?",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 12,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 14,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 15,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n cl.id AS \"compat_sso_login_id\",\n cl.token AS \"compat_sso_login_token\",\n cl.redirect_uri AS \"compat_sso_login_redirect_uri\",\n cl.created_at AS \"compat_sso_login_created_at\",\n cl.fullfilled_at AS \"compat_sso_login_fullfilled_at\",\n cl.exchanged_at AS \"compat_sso_login_exchanged_at\",\n cs.id AS \"compat_session_id?\",\n cs.created_at AS \"compat_session_created_at?\",\n cs.deleted_at AS \"compat_session_deleted_at?\",\n cs.device_id AS \"compat_session_device_id?\",\n u.id AS \"user_id?\",\n u.username AS \"user_username?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM compat_sso_logins cl\n LEFT JOIN compat_sessions cs\n ON cs.id = cl.compat_session_id\n LEFT JOIN users u\n ON u.id = cs.user_id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n WHERE cl.token = $1\n "
|
|
},
|
|
"88ac8783bd5881c42eafd9cf87a16fe6031f3153fd6a8618e689694584aeb2de": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n DELETE FROM oauth2_access_tokens\n WHERE id = $1\n "
|
|
},
|
|
"893b23b2385594f6c878d000b336d3c897adcffed35ee51d7dfea650b75aa0cf": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO compat_sessions (user_id, device_id)\n VALUES ($1, $2)\n RETURNING id, created_at\n "
|
|
},
|
|
"929605e8e86ab15a34721b8cbbe29f1bff90102e5641bc49ded86f6539810c73": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO compat_sso_logins (token, redirect_uri)\n VALUES ($1, $2)\n RETURNING id, created_at\n "
|
|
},
|
|
"9882e49f34dff80c1442565f035a1b47ed4dbae1a405f58cf2db198885bb9f47": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "grant_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "grant_created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_cancelled_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_fulfilled_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_exchanged_at",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "grant_scope",
|
|
"ordinal": 5,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_state",
|
|
"ordinal": 6,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_redirect_uri",
|
|
"ordinal": 7,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_response_mode",
|
|
"ordinal": 8,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_nonce",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_max_age",
|
|
"ordinal": 10,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "grant_acr_values",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "oauth2_client_id",
|
|
"ordinal": 12,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "grant_code",
|
|
"ordinal": 13,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_response_type_code",
|
|
"ordinal": 14,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_response_type_token",
|
|
"ordinal": 15,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_response_type_id_token",
|
|
"ordinal": 16,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "grant_code_challenge",
|
|
"ordinal": 17,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_code_challenge_method",
|
|
"ordinal": 18,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "grant_requires_consent",
|
|
"ordinal": 19,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "session_id?",
|
|
"ordinal": 20,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_id?",
|
|
"ordinal": 21,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_created_at?",
|
|
"ordinal": 22,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_id?",
|
|
"ordinal": 23,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username?",
|
|
"ordinal": 24,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_id?",
|
|
"ordinal": 25,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_created_at?",
|
|
"ordinal": 26,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 27,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 28,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 29,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 30,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n og.id AS grant_id,\n og.created_at AS grant_created_at,\n og.cancelled_at AS grant_cancelled_at,\n og.fulfilled_at AS grant_fulfilled_at,\n og.exchanged_at AS grant_exchanged_at,\n og.scope AS grant_scope,\n og.state AS grant_state,\n og.redirect_uri AS grant_redirect_uri,\n og.response_mode AS grant_response_mode,\n og.nonce AS grant_nonce,\n og.max_age AS grant_max_age,\n og.acr_values AS grant_acr_values,\n og.oauth2_client_id AS oauth2_client_id,\n og.code AS grant_code,\n og.response_type_code AS grant_response_type_code,\n og.response_type_token AS grant_response_type_token,\n og.response_type_id_token AS grant_response_type_id_token,\n og.code_challenge AS grant_code_challenge,\n og.code_challenge_method AS grant_code_challenge_method,\n og.requires_consent AS grant_requires_consent,\n os.id AS \"session_id?\",\n us.id AS \"user_session_id?\",\n us.created_at AS \"user_session_created_at?\",\n u.id AS \"user_id?\",\n u.username AS \"user_username?\",\n usa.id AS \"user_session_last_authentication_id?\",\n usa.created_at AS \"user_session_last_authentication_created_at?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM\n oauth2_authorization_grants og\n LEFT JOIN oauth2_sessions os\n ON os.id = og.oauth2_session_id\n LEFT JOIN user_sessions us\n ON us.id = os.user_session_id\n LEFT JOIN users u\n ON u.id = us.user_id\n LEFT JOIN user_session_authentications usa\n ON usa.session_id = us.id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE og.code = $1\n\n ORDER BY usa.created_at DESC\n LIMIT 1\n "
|
|
},
|
|
"a09dfe1019110f2ec6eba0d35bafa467ab4b7980dd8b556826f03863f8edb0ab": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE user_sessions SET active = FALSE WHERE id = $1"
|
|
},
|
|
"a80c14ba82cfc29493048d9e9578ec5ca482c9228efc7c7212dae4fed86b8367": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"TextArray"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_client_redirect_uris (oauth2_client_id, redirect_uri)\n SELECT $1, uri FROM UNNEST($2::text[]) uri\n "
|
|
},
|
|
"aea289a04e151da235825305a5085bc6aa100fce139dbf10a2c1bed4867fc52a": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "user_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 2,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 3,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT \n u.id AS user_id, \n u.username AS user_username,\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n FROM users u\n\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE u.username = $1\n "
|
|
},
|
|
"af3d36161bc60593ba991a9652efca1f19a9c4b291966dd41c1883b9c303673a": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE compat_sessions\n SET deleted_at = NOW()\n FROM compat_access_tokens\n WHERE compat_access_tokens.token = $1\n AND compat_sessions.id = compat_access_tokens.id \n AND compat_sessions.deleted_at IS NULL\n "
|
|
},
|
|
"af77bad7259175464c5ad57f9662571c17b29552ebb70e4b6022584b41bdff0d": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "exists!",
|
|
"ordinal": 0,
|
|
"type_info": "Bool"
|
|
}
|
|
],
|
|
"nullable": [
|
|
null
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT EXISTS(\n SELECT 1 FROM users WHERE username = $1\n ) AS \"exists!\"\n "
|
|
},
|
|
"b0fec01072df856ba9cd8be0ecf7a58dd4709a0efca4035a2c6f99c43d5a12be": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "user_email_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT \n ue.id AS \"user_email_id\",\n ue.email AS \"user_email\",\n ue.created_at AS \"user_email_created_at\",\n ue.confirmed_at AS \"user_email_confirmed_at\"\n FROM user_emails ue\n\n WHERE ue.user_id = $1\n AND ue.id = $2\n "
|
|
},
|
|
"ba431a27a4b256ceacb5724bd746424ed1f059e59ae1aa818fdd5f44c01d70a0": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "consumed_at!",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE user_email_verifications\n SET consumed_at = NOW()\n WHERE id = $1\n RETURNING consumed_at AS \"consumed_at!\"\n "
|
|
},
|
|
"bb5c43feb0e2ac1b8b31ab18423176057e795618ac64527bfb04fee91d86be2a": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "fullfilled_at!",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE compat_sso_logins\n SET\n fullfilled_at = NOW(),\n compat_session_id = $2\n WHERE\n id = $1\n RETURNING fullfilled_at AS \"fullfilled_at!\"\n "
|
|
},
|
|
"c2c402cfe0adcafa615f14a499caba4c96ca71d9ffb163e1feb05e5d85f3462c": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE oauth2_refresh_tokens\n SET next_token_id = $2\n WHERE id = $1\n "
|
|
},
|
|
"cd14bbd315bec758b846f619202fdfd26634dfdcc185d5117a394b556c019473": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "exchanged_at!",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE compat_sso_logins\n SET\n exchanged_at = NOW()\n WHERE\n id = $1\n RETURNING exchanged_at AS \"exchanged_at!\"\n "
|
|
},
|
|
"d144679fac4fb1a6903060e87b08538db68fe734905fcd4e121acf487d23bd13": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "verification_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "verification_code",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "verification_expired!",
|
|
"ordinal": 2,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "verification_created_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "verification_consumed_at",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
null,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Int8",
|
|
"Interval"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n ev.id AS \"verification_id\",\n ev.code AS \"verification_code\",\n (ev.created_at + $3 < NOW()) AS \"verification_expired!\",\n ev.created_at AS \"verification_created_at\",\n ev.consumed_at AS \"verification_consumed_at\"\n FROM user_email_verifications ev\n WHERE ev.code = $1\n AND ev.user_email_id = $2\n "
|
|
},
|
|
"d2f767218ec2489058db9a0382ca0eea20379c30aeae9f492da4ba35b66f4dc7": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n DELETE FROM user_emails\n WHERE user_emails.id = $1\n "
|
|
},
|
|
"d604e13bdfb2ff3d354d995f0b68f04091847755db98bafea7c45bd7b5c4ab68": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "exchanged_at!: DateTime<Utc>",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n UPDATE oauth2_authorization_grants\n SET\n exchanged_at = NOW()\n WHERE\n id = $1\n RETURNING exchanged_at AS \"exchanged_at!: DateTime<Utc>\"\n "
|
|
},
|
|
"d7200c0def0662fda4af259c7872e06b8208e36f320ca90ea781c13d2bf85a9f": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO user_passwords (user_id, hashed_password)\n VALUES ($1, $2)\n "
|
|
},
|
|
"d9d27eb4a0c11818a636d407438c4bc567a39396e7e236b3e776504417988eab": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO user_session_authentications (session_id)\n VALUES ($1)\n RETURNING id, created_at\n "
|
|
},
|
|
"d9deefd13877e64c44fa7b60d07e97380ca6a9612b3f08fb8c341b32c3a63a27": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO compat_access_tokens (compat_session_id, token)\n VALUES ($1, $2)\n RETURNING id, created_at\n "
|
|
},
|
|
"db34b3d7fa5d824e63f388d660615d748e11c1406e8166da907e0a54a665e37a": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "user_email_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at",
|
|
"ordinal": 2,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT \n ue.id AS \"user_email_id\",\n ue.email AS \"user_email\",\n ue.created_at AS \"user_email_created_at\",\n ue.confirmed_at AS \"user_email_confirmed_at\"\n FROM user_emails ue\n\n WHERE ue.user_id = $1\n AND ue.email = $2\n "
|
|
},
|
|
"dbeffa1433a96693b6c5dd501a834eef770946f8ad44fb846556729682a1bb9d": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO user_email_verifications (user_email_id, code)\n VALUES ($1, $2)\n RETURNING id, created_at\n "
|
|
},
|
|
"dbf9d2ee583d4dec07d7948c7540ff39b3e1de0c6abd168f47c02401f8417eec": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO compat_refresh_tokens (compat_session_id, compat_access_token_id, token)\n VALUES ($1, $2, $3)\n RETURNING id, created_at\n "
|
|
},
|
|
"dda03ba41249bff965cb8f129acc15f4e40807adb9b75dee0ac43edd7809de84": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO users (username)\n VALUES ($1)\n RETURNING id\n "
|
|
},
|
|
"df38de13e2f345175f9ef46b4ae2a4f6637dbf74bb28559da8f4d8969f411d14": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "access_token_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "access_token",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "access_token_expires_after",
|
|
"ordinal": 2,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "access_token_created_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "session_id!",
|
|
"ordinal": 4,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "oauth2_client_id!",
|
|
"ordinal": 5,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "scope!",
|
|
"ordinal": 6,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_session_id!",
|
|
"ordinal": 7,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_created_at!",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_id!",
|
|
"ordinal": 9,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_username!",
|
|
"ordinal": 10,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_id?",
|
|
"ordinal": 11,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_session_last_authentication_created_at?",
|
|
"ordinal": 12,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_id?",
|
|
"ordinal": 13,
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"name": "user_email?",
|
|
"ordinal": 14,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "user_email_created_at?",
|
|
"ordinal": 15,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "user_email_confirmed_at?",
|
|
"ordinal": 16,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT\n at.id AS \"access_token_id\",\n at.token AS \"access_token\",\n at.expires_after AS \"access_token_expires_after\",\n at.created_at AS \"access_token_created_at\",\n os.id AS \"session_id!\",\n os.oauth2_client_id AS \"oauth2_client_id!\",\n os.scope AS \"scope!\",\n us.id AS \"user_session_id!\",\n us.created_at AS \"user_session_created_at!\",\n u.id AS \"user_id!\",\n u.username AS \"user_username!\",\n usa.id AS \"user_session_last_authentication_id?\",\n usa.created_at AS \"user_session_last_authentication_created_at?\",\n ue.id AS \"user_email_id?\",\n ue.email AS \"user_email?\",\n ue.created_at AS \"user_email_created_at?\",\n ue.confirmed_at AS \"user_email_confirmed_at?\"\n\n FROM oauth2_access_tokens at\n INNER JOIN oauth2_sessions os\n ON os.id = at.oauth2_session_id\n INNER JOIN user_sessions us\n ON us.id = os.user_session_id\n INNER JOIN users u\n ON u.id = us.user_id\n LEFT JOIN user_session_authentications usa\n ON usa.session_id = us.id\n LEFT JOIN user_emails ue\n ON ue.id = u.primary_email_id\n\n WHERE at.token = $1\n AND at.created_at + (at.expires_after * INTERVAL '1 second') >= now()\n AND us.active\n AND os.ended_at IS NULL\n\n ORDER BY usa.created_at DESC\n LIMIT 1\n "
|
|
},
|
|
"e11a625fa2ca20f00cac0fac5b4548efad6dd2f2f4742087935345cbf5701db2": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8",
|
|
"Int8",
|
|
"TextArray"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n INSERT INTO oauth2_consents (user_id, oauth2_client_id, scope_token)\n SELECT $1, $2, scope_token FROM UNNEST($3::text[]) scope_token\n ON CONFLICT (user_id, oauth2_client_id, scope_token) DO UPDATE SET updated_at = NOW()\n "
|
|
},
|
|
"e5cd99bdaf9c678fc659431fecc5d76b25bb08b781fd17e50eda82ea3aa8cea8": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "count!",
|
|
"ordinal": 0,
|
|
"type_info": "Int8"
|
|
}
|
|
],
|
|
"nullable": [
|
|
null
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "\n SELECT COUNT(*) as \"count!\"\n FROM user_sessions s\n WHERE s.user_id = $1 AND s.active\n "
|
|
},
|
|
"ebf73a609e81830b16700d2c315fffa93fd85b2886e29f234d9953b18a9f72b5": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": []
|
|
}
|
|
},
|
|
"query": "TRUNCATE oauth2_client_redirect_uris, oauth2_clients RESTART IDENTITY CASCADE"
|
|
}
|
|
} |