mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-23 18:05:54 +03:00
322 lines
No EOL
9.6 KiB
JSON
322 lines
No EOL
9.6 KiB
JSON
{
|
|
"db": "PostgreSQL",
|
|
"044e2036a518de2ccac9318ccba07f7ce10e4a1c1d51d0128ea5e8cb94358ac5": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Timestamptz"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO mcaptcha_pow_confirmed_stats \n (config_id, time) VALUES ((SELECT config_id FROM mcaptcha_config WHERE key = $1), $2)"
|
|
},
|
|
"06699fda6b1542bf4544c0bdece91531a3020c24c9c76bcf967980e71ee25b42": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "email",
|
|
"ordinal": 0,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "secret",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT email, secret FROM mcaptcha_users WHERE name = ($1)"
|
|
},
|
|
"2b319a202bb983d5f28979d1e371f399125da1122fbda36a5a55b75b9c743451": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int4",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "-- mark a notification as read\nUPDATE mcaptcha_notifications\n SET read = TRUE\nWHERE \n mcaptcha_notifications.id = $1\nAND\n mcaptcha_notifications.rx = (\n SELECT\n id\n FROM\n mcaptcha_users\n WHERE\n name = $2\n );\n"
|
|
},
|
|
"4303f5c6ef98e0de9d8d3c2d781d3ffaa3dee5f7d27db831d327b26f03ba9d68": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "time",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT time FROM mcaptcha_pow_confirmed_stats \n WHERE \n config_id = (\n SELECT config_id FROM mcaptcha_config \n WHERE \n key = $1\n AND\n user_id = (\n SELECT \n ID FROM mcaptcha_users WHERE name = $2))\n ORDER BY time DESC"
|
|
},
|
|
"4c3a9fe30a4c6bd49ab1cb8883c4495993aa05f2991483b4f04913b2e5043a63": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "difficulty_factor",
|
|
"ordinal": 0,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "visitor_threshold",
|
|
"ordinal": 1,
|
|
"type_info": "Int4"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int4"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT \n difficulty_factor, visitor_threshold \n FROM \n mcaptcha_levels \n WHERE config_id = $1 ORDER BY difficulty_factor ASC"
|
|
},
|
|
"60081afa71dca3d10b372aabfdbc809f0cf62b33994a3bb43ea444159c6544fe": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Varchar",
|
|
"Varchar",
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO mcaptcha_notifications (\n heading, message, tx, rx)\n VALUES (\n $1, $2,\n (SELECT ID FROM mcaptcha_users WHERE name = $3),\n (SELECT ID FROM mcaptcha_users WHERE name = $4)\n );"
|
|
},
|
|
"726a794f7599b78ab749d9f887f5c28db38f072b41f691bde35d23ba0dd72409": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Timestamptz"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO mcaptcha_pow_fetched_stats \n (config_id, time) VALUES ((SELECT config_id FROM mcaptcha_config WHERE key = $1), $2)"
|
|
},
|
|
"76d1b62e0c70d09247691ca328d8674c8039fab922a40352b8ab5ed5b26a5293": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "key",
|
|
"ordinal": 0,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT key, name from mcaptcha_config WHERE\n user_id = (SELECT ID FROM mcaptcha_users WHERE name = $1) "
|
|
},
|
|
"84484cb6892db29121816bc5bff5702b9e857e20aa14e79d080d78ae7593153b": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "time",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT time FROM mcaptcha_pow_solved_stats \n WHERE config_id = (\n SELECT config_id FROM mcaptcha_config \n WHERE \n key = $1\n AND\n user_id = (\n SELECT \n ID FROM mcaptcha_users WHERE name = $2)) \n ORDER BY time DESC"
|
|
},
|
|
"9bfdbc25316c623f8f19bb24e636bf8d0c930a0604d84f576682d2fe60a631f6": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "DELETE FROM mcaptcha_sitekey_user_provided_avg_traffic \n WHERE config_id = (\n SELECT config_id \n FROM \n mcaptcha_config \n WHERE\n key = ($1) \n AND \n user_id = (SELECT ID FROM mcaptcha_users WHERE name = $2)\n );"
|
|
},
|
|
"a1c49ee377d6ac57fb22c9eac0ef1927a97087abd58da092a91623d06fa7076e": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "name",
|
|
"ordinal": 0,
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT name FROM mcaptcha_config \n WHERE key = $1 \n AND user_id = (\n SELECT user_id FROM mcaptcha_users WHERE NAME = $2)"
|
|
},
|
|
"ada91fac02c7bba9b13deebccda6f6fc45773b5a6e786c37c27b4a71a5cd29f2": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "config_id",
|
|
"ordinal": 0,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"ordinal": 1,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT config_id, duration, name from mcaptcha_config WHERE\n key = $1 AND\n user_id = (SELECT ID FROM mcaptcha_users WHERE name = $2) "
|
|
},
|
|
"c399efd5db1284dcb470c40f9b076851f77498c75a63a3b151d4a111bd3e2957": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "time",
|
|
"ordinal": 0,
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT time FROM mcaptcha_pow_fetched_stats\n WHERE \n config_id = (\n SELECT \n config_id FROM mcaptcha_config \n WHERE \n key = $1\n AND\n user_id = (\n SELECT \n ID FROM mcaptcha_users WHERE name = $2))\n ORDER BY time DESC"
|
|
},
|
|
"dbe4307651d94bc6db4f1d8b2c6d076fde6280983d59593216d7765cbbdd669c": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Timestamptz"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO mcaptcha_pow_solved_stats \n (config_id, time) VALUES ((SELECT config_id FROM mcaptcha_config WHERE key = $1), $2)"
|
|
},
|
|
"dcf0d4f9d803dcb1d6f775899f79595f9c78d46633e0ec822303284430df7a3d": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"name": "heading",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "message",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "received",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"ordinal": 4,
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"nullable": [
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "-- gets all unread notifications a user has\nSELECT \n mcaptcha_notifications.id,\n mcaptcha_notifications.heading,\n mcaptcha_notifications.message,\n mcaptcha_notifications.received,\n mcaptcha_users.name\nFROM\n mcaptcha_notifications \nINNER JOIN \n mcaptcha_users \nON \n mcaptcha_notifications.tx = mcaptcha_users.id\nWHERE \n mcaptcha_notifications.rx = (\n SELECT \n id \n FROM \n mcaptcha_users\n WHERE\n name = $1\n )\nAND \n mcaptcha_notifications.read IS NULL;\n"
|
|
}
|
|
} |