mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-05-07 15:42:50 +03:00
feat: annotate license headers using reuse on text source files
This commit is contained in:
parent
d707a2265c
commit
78d85ab9a9
306 changed files with 1413 additions and 3111 deletions
db/db-sqlx-postgres
migrations
20210310122154_mcaptcha_users.sql20210310122617_mcaptcha_config.sql20210310122902_mcaptcha_levels.sql20210430032935_mcaptcha_pow_fetched_stats.sql20210509135118_mcaptcha_pow_solved_stats.sql20210509135154_mcaptcha_pow_confirmed_stats.sql20210509151150_mcaptcha_notifications.sql20211202141927_mcaptcha_sitekey_user_provided_avg_traffic.sql20211218133703_change_user_provided_avg_traffic_col_datatype.sql20220526114806_alter_notifications_table.sql
src
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_users (
|
||||
name VARCHAR(100) NOT NULL UNIQUE,
|
||||
email VARCHAR(100) UNIQUE DEFAULT NULL,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_config (
|
||||
config_id SERIAL PRIMARY KEY NOT NULL,
|
||||
user_id INTEGER NOT NULL references mcaptcha_users(ID) ON DELETE CASCADE,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_levels (
|
||||
config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE,
|
||||
difficulty_factor INTEGER NOT NULL,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_pow_fetched_stats (
|
||||
config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE,
|
||||
time timestamptz NOT NULL DEFAULT now()
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_pow_solved_stats (
|
||||
config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE,
|
||||
time timestamptz NOT NULL DEFAULT now()
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_pow_confirmed_stats (
|
||||
config_id INTEGER references mcaptcha_config(config_id) ON DELETE CASCADE,
|
||||
time timestamptz NOT NULL DEFAULT now()
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- Add migration script here
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_notifications (
|
||||
id SERIAL PRIMARY KEY NOT NULL,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_sitekey_user_provided_avg_traffic (
|
||||
config_id INTEGER PRIMARY KEY UNIQUE NOT NULL references mcaptcha_config(config_id) ON DELETE CASCADE,
|
||||
avg_traffic INTEGER DEFAULT NULL,
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
ALTER TABLE mcaptcha_sitekey_user_provided_avg_traffic
|
||||
ALTER COLUMN avg_traffic SET NOT NULL,
|
||||
ALTER COLUMN peak_sustainable_traffic SET NOT NULL;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- Add migration script here
|
||||
ALTER TABLE mcaptcha_notifications ALTER COLUMN heading TYPE varchar(100),
|
||||
ALTER COLUMN heading SET NOT NULL;
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
//! Error-handling utilities
|
||||
use std::borrow::Cow;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- gets all unread notifications a user has
|
||||
SELECT
|
||||
mcaptcha_notifications.id,
|
||||
|
|
|
@ -1,19 +1,8 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
use std::str::FromStr;
|
||||
|
||||
use db_core::dev::*;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
--
|
||||
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
-- mark a notification as read
|
||||
UPDATE mcaptcha_notifications
|
||||
SET read = TRUE
|
||||
|
|
|
@ -1,19 +1,8 @@
|
|||
/*
|
||||
* Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
#![cfg(test)]
|
||||
|
||||
use sqlx::postgres::PgPoolOptions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue