Redesign sensitive info protection settings

This commit is contained in:
fawney19
2026-05-14 11:14:20 +08:00
parent 91955ad1e0
commit 509bd30252
71 changed files with 3254 additions and 884 deletions

View File

@@ -177,6 +177,7 @@ CREATE TABLE IF NOT EXISTS public.api_keys (
rate_limit integer DEFAULT 100,
concurrent_limit integer,
force_capabilities json,
feature_settings jsonb,
is_active boolean DEFAULT true NOT NULL,
last_used_at timestamp with time zone,
expires_at timestamp with time zone,
@@ -1277,6 +1278,7 @@ CREATE TABLE IF NOT EXISTS public.users (
allowed_models json,
allowed_models_mode text DEFAULT 'unrestricted'::text NOT NULL,
model_capability_settings json,
feature_settings jsonb,
is_active boolean DEFAULT true NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL,

View File

@@ -19,6 +19,7 @@ CREATE TABLE IF NOT EXISTS users (
`allowed_api_formats` JSON,
`allowed_api_formats_mode` VARCHAR(32) NOT NULL DEFAULT 'unrestricted',
`model_capability_settings` JSON,
`feature_settings` JSON,
`rate_limit` INT,
`rate_limit_mode` VARCHAR(32) NOT NULL DEFAULT 'system',
`metadata` JSON,
@@ -75,6 +76,7 @@ CREATE TABLE IF NOT EXISTS api_keys (
`rate_limit` INT DEFAULT 100,
`concurrent_limit` INT,
`force_capabilities` JSON,
`feature_settings` JSON,
`is_active` TINYINT(1) NOT NULL DEFAULT 1,
`is_locked` TINYINT(1) NOT NULL DEFAULT 0,
`is_standalone` TINYINT(1) NOT NULL DEFAULT 0,

View File

@@ -19,6 +19,7 @@ CREATE TABLE IF NOT EXISTS public.users (
allowed_api_formats jsonb,
allowed_api_formats_mode character varying(32) DEFAULT 'unrestricted' NOT NULL,
model_capability_settings jsonb,
feature_settings jsonb,
rate_limit integer,
rate_limit_mode character varying(32) DEFAULT 'system' NOT NULL,
metadata jsonb,
@@ -78,6 +79,7 @@ CREATE TABLE IF NOT EXISTS public.api_keys (
rate_limit integer DEFAULT 100,
concurrent_limit integer,
force_capabilities jsonb,
feature_settings jsonb,
is_active boolean DEFAULT true NOT NULL,
is_locked boolean DEFAULT false NOT NULL,
is_standalone boolean DEFAULT false NOT NULL,

View File

@@ -19,6 +19,7 @@ CREATE TABLE IF NOT EXISTS users (
allowed_api_formats TEXT,
allowed_api_formats_mode TEXT NOT NULL DEFAULT 'unrestricted',
model_capability_settings TEXT,
feature_settings TEXT,
rate_limit INTEGER,
rate_limit_mode TEXT NOT NULL DEFAULT 'system',
metadata TEXT,
@@ -73,6 +74,7 @@ CREATE TABLE IF NOT EXISTS api_keys (
rate_limit INTEGER DEFAULT 100,
concurrent_limit INTEGER,
force_capabilities TEXT,
feature_settings TEXT,
is_active INTEGER NOT NULL DEFAULT 1,
is_locked INTEGER NOT NULL DEFAULT 0,
is_standalone INTEGER NOT NULL DEFAULT 0,

View File

@@ -97,6 +97,11 @@ name = "model_capability_settings"
type = "json"
nullable = true
[[table.users.columns]]
name = "feature_settings"
type = "json"
nullable = true
[[table.users.columns]]
name = "rate_limit"
type = "int32"
@@ -333,6 +338,11 @@ name = "force_capabilities"
type = "json"
nullable = true
[[table.api_keys.columns]]
name = "feature_settings"
type = "json"
nullable = true
[[table.api_keys.columns]]
name = "is_active"
type = "bool"