feat: новая функция

This commit is contained in:
2025-10-22 15:17:08 +03:00
parent 0cbc31812a
commit b2e0795e8a
15 changed files with 724 additions and 36 deletions

View File

@@ -2,8 +2,8 @@
CREATE TABLE IF NOT EXISTS user_tables (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
name_encrypted TEXT NOT NULL,
description_encrypted TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
@@ -12,8 +12,9 @@ CREATE TABLE IF NOT EXISTS user_tables (
CREATE TABLE IF NOT EXISTS user_columns (
id SERIAL PRIMARY KEY,
table_id INTEGER NOT NULL REFERENCES user_tables(id) ON DELETE CASCADE,
name VARCHAR(255) NOT NULL,
type VARCHAR(50) NOT NULL, -- text, number, select, multiselect, date, etc.
name_encrypted TEXT NOT NULL,
type_encrypted TEXT NOT NULL, -- text, number, select, multiselect, date, etc.
placeholder_encrypted TEXT,
options JSONB DEFAULT NULL, -- для select/multiselect
"order" INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,