mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 10:35:39 +00:00
auth and migration util
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_config (
|
||||
name VARCHAR(100) references mcaptcha_users(name),
|
||||
id VARCHAR(32) PRIMARY KEY NOT NULL UNIQUE,
|
||||
duration INTEGER NOT NULL
|
||||
);
|
||||
@@ -1,5 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_levels (
|
||||
id VARCHAR(32) references mcaptcha_config(id),
|
||||
difficulty_factor INTEGER NOT NULL,
|
||||
visitor_threshold INTEGER NOT NULL
|
||||
);
|
||||
@@ -1,4 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_users (
|
||||
name VARCHAR(100) NOT NULL UNIQUE,
|
||||
email VARCHAR(100) NOT NULL UNIQUE,
|
||||
password TEXT NOT NULL,
|
||||
ID SERIAL PRIMARY KEY NOT NULL
|
||||
);
|
||||
4
migrations/20210310122339_mcaptcha_domains.sql
Normal file
4
migrations/20210310122339_mcaptcha_domains.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_domains (
|
||||
name VARCHAR(100) PRIMARY KEY NOT NULL UNIQUE,
|
||||
ID INTEGER references mcaptcha_users(ID)
|
||||
);
|
||||
6
migrations/20210310122617_mcaptcha_config.sql
Normal file
6
migrations/20210310122617_mcaptcha_config.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_config (
|
||||
config_id SERIAL PRIMARY KEY NOT NULL,
|
||||
ID INTEGER references mcaptcha_users(ID),
|
||||
key VARCHAR(100) NOT NULL UNIQUE,
|
||||
duration INTEGER NOT NULL
|
||||
);
|
||||
6
migrations/20210310122902_mcaptcha_levels.sql
Normal file
6
migrations/20210310122902_mcaptcha_levels.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS mcaptcha_levels (
|
||||
config_id INTEGER references mcaptcha_config(config_id),
|
||||
difficulty_factor INTEGER NOT NULL,
|
||||
visitor_threshold INTEGER NOT NULL,
|
||||
level_id SERIAL PRIMARY KEY NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user