From 19d07489f01f1f51fcc3c02e412993df5c77ab19 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Tue, 4 Jul 2023 15:19:48 +0530 Subject: [PATCH] fix: run make sqlx to update offline data with license header modification --- Dockerfile | 1 - db/db-sqlx-maria/sqlx-data.json | 174 ++++++++++++++--------------- db/db-sqlx-postgres/sqlx-data.json | 114 +++++++++---------- 3 files changed, 144 insertions(+), 145 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84114d24..12441fcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -FROM node:16.0.0 as frontend FROM node:18.0.0 as frontend RUN set -ex; \ apt-get update; \ diff --git a/db/db-sqlx-maria/sqlx-data.json b/db/db-sqlx-maria/sqlx-data.json index 54e49c77..771d8dbe 100644 --- a/db/db-sqlx-maria/sqlx-data.json +++ b/db/db-sqlx-maria/sqlx-data.json @@ -169,6 +169,83 @@ }, "query": "SELECT email FROM mcaptcha_users WHERE name = ?" }, + "42d967d6e080efd3cff8d4df13ea4d2ff38f3093da5c97000349dfc23c4d4eb3": { + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": { + "char_set": 63, + "flags": { + "bits": 515 + }, + "max_size": 11, + "type": "Long" + } + }, + { + "name": "heading", + "ordinal": 1, + "type_info": { + "char_set": 224, + "flags": { + "bits": 4097 + }, + "max_size": 400, + "type": "VarString" + } + }, + { + "name": "message", + "ordinal": 2, + "type_info": { + "char_set": 224, + "flags": { + "bits": 4097 + }, + "max_size": 1000, + "type": "VarString" + } + }, + { + "name": "received", + "ordinal": 3, + "type_info": { + "char_set": 63, + "flags": { + "bits": 1185 + }, + "max_size": 19, + "type": "Timestamp" + } + }, + { + "name": "name", + "ordinal": 4, + "type_info": { + "char_set": 224, + "flags": { + "bits": 4101 + }, + "max_size": 400, + "type": "VarString" + } + } + ], + "nullable": [ + false, + false, + false, + false, + false + ], + "parameters": { + "Right": 1 + } + }, + "query": "-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan \n--\n-- SPDX-License-Identifier: AGPL-3.0-or-later\n\n-- 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 = ?\n )\nAND \n mcaptcha_notifications.read_notification IS NULL;\n" + }, "598a8202942771eff460faa6f09bd3fb1fc910d5fab7edb07c49dadbbaeb1cb8": { "describe": { "columns": [], @@ -600,83 +677,6 @@ }, "query": "DELETE FROM mcaptcha_config where captcha_key= (?)\n AND\n user_id = (SELECT ID FROM mcaptcha_users WHERE name = ?)" }, - "b9b0c63380bc0dfdea8aae092dcefceb316fe94667d74f53d53063810cdd2ba8": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": { - "char_set": 63, - "flags": { - "bits": 515 - }, - "max_size": 11, - "type": "Long" - } - }, - { - "name": "heading", - "ordinal": 1, - "type_info": { - "char_set": 224, - "flags": { - "bits": 4097 - }, - "max_size": 400, - "type": "VarString" - } - }, - { - "name": "message", - "ordinal": 2, - "type_info": { - "char_set": 224, - "flags": { - "bits": 4097 - }, - "max_size": 1000, - "type": "VarString" - } - }, - { - "name": "received", - "ordinal": 3, - "type_info": { - "char_set": 63, - "flags": { - "bits": 1185 - }, - "max_size": 19, - "type": "Timestamp" - } - }, - { - "name": "name", - "ordinal": 4, - "type_info": { - "char_set": 224, - "flags": { - "bits": 4101 - }, - "max_size": 400, - "type": "VarString" - } - } - ], - "nullable": [ - false, - false, - false, - false, - false - ], - "parameters": { - "Right": 1 - } - }, - "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 = ?\n )\nAND \n mcaptcha_notifications.read_notification IS NULL;\n" - }, "caa1638ee510ef62b86817e5d2baeaca8dfa432c23d7630c0e70737211a4680b": { "describe": { "columns": [ @@ -712,16 +712,6 @@ }, "query": "UPDATE mcaptcha_users set password = ?\n WHERE name = ?" }, - "cf333541509213f11a9bf7119dcb3289bb77abf1482fc1d47e7f5bb27bdc8d97": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Right": 2 - } - }, - "query": "-- mark a notification as read\nUPDATE mcaptcha_notifications\n SET read_notification = TRUE\nWHERE \n mcaptcha_notifications.id = ?\nAND\n mcaptcha_notifications.rx = (\n SELECT\n id\n FROM\n mcaptcha_users\n WHERE\n name = ?\n );\n" - }, "d05b84966f4e70c53789221f961bf3637f404f3ba45e880115e97ed1ba5a2809": { "describe": { "columns": [], @@ -1027,6 +1017,16 @@ }, "query": "INSERT INTO mcaptcha_pow_analytics \n (config_id, time, difficulty_factor, worker_type)\n VALUES ((SELECT config_id FROM mcaptcha_config where captcha_key= ?), ?, ?, ?)" }, + "f9f2ed1b2f47828d5d976d2e470e106d54b8a2357f9d525ef0cdb1f7965aa61c": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Right": 2 + } + }, + "query": "-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan \n--\n-- SPDX-License-Identifier: AGPL-3.0-or-later\n\n-- mark a notification as read\nUPDATE mcaptcha_notifications\n SET read_notification = TRUE\nWHERE \n mcaptcha_notifications.id = ?\nAND\n mcaptcha_notifications.rx = (\n SELECT\n id\n FROM\n mcaptcha_users\n WHERE\n name = ?\n );\n" + }, "fc717ff0827ccfaa1cc61a71cc7f71c348ebb03d35895c54b011c03121ad2385": { "describe": { "columns": [], diff --git a/db/db-sqlx-postgres/sqlx-data.json b/db/db-sqlx-postgres/sqlx-data.json index 2c3d85e3..422dea99 100644 --- a/db/db-sqlx-postgres/sqlx-data.json +++ b/db/db-sqlx-postgres/sqlx-data.json @@ -172,6 +172,50 @@ }, "query": "UPDATE mcaptcha_users set name = $1\n WHERE name = $2" }, + "213ac909efb60f7f5e095fe2d3d1ec4f98fde7d84de011272c788aaf825b6ae2": { + "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": "-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan \n--\n-- SPDX-License-Identifier: AGPL-3.0-or-later\n\n-- 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" + }, "21cdf28d8962389d22c8ddefdad82780f5316737e3d833623512aa12a54a026a": { "describe": { "columns": [ @@ -192,19 +236,6 @@ }, "query": "SELECT\n key\n FROM\n mcaptcha_config\n WHERE\n config_id = (\n SELECT\n config_id\n FROM\n mcaptcha_psuedo_campaign_id\n WHERE\n psuedo_id = $1\n );" }, - "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" - }, "307245aaf5b0d692448b80358d6916aa50c507b35e724d66c9b16a16b60e1b38": { "describe": { "columns": [], @@ -600,6 +631,19 @@ }, "query": "INSERT INTO mcaptcha_pow_analytics \n (config_id, time, difficulty_factor, worker_type)\n VALUES ((SELECT config_id FROM mcaptcha_config WHERE key = $1), $2, $3, $4)" }, + "b465e974155aeaaa128896d4261505a32845dbe52dac07908c1d16810bfde4dc": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int4", + "Text" + ] + } + }, + "query": "-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan \n--\n-- SPDX-License-Identifier: AGPL-3.0-or-later\n\n-- 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" + }, "b67da576ff30a1bc8b1c0a79eff07f0622bd9ea035d3de15b91f5e1e8a5fda9b": { "describe": { "columns": [], @@ -772,50 +816,6 @@ }, "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" - }, "e4c710d33b709aee262fa0704372ac216d98851447ef4fbe221740b7ae4ea422": { "describe": { "columns": [