From 17badd7ea4d77c0aafbdfa65e05743cb7856489c Mon Sep 17 00:00:00 2001 From: chenhj <chenhj@lunor.cn> Date: 星期五, 30 五月 2025 14:40:58 +0800 Subject: [PATCH] Merge pull request 'chen' (#12) from chen into master --- ruoyi-common/src/main/resources/db/migration/postgresql/V20250525003447__create_table_storage_attachment.sql | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/src/main/resources/db/migration/postgresql/V20250525003447__create_table_storage_attachment.sql b/ruoyi-common/src/main/resources/db/migration/postgresql/V20250525003447__create_table_storage_attachment.sql new file mode 100644 index 0000000..98a73de --- /dev/null +++ b/ruoyi-common/src/main/resources/db/migration/postgresql/V20250525003447__create_table_storage_attachment.sql @@ -0,0 +1,25 @@ +-- ---------------------------- +-- 闄勪欢琛� +-- ---------------------------- +drop table if exists storage_attachment; +CREATE TABLE storage_attachment +( + id bigserial PRIMARY KEY, + create_time timestamp default now() NOT NULL, + update_time timestamp default now() NOT NULL, + deleted bigint DEFAULT 0 NOT NULL, + record_type smallint DEFAULT 0 NOT NULL, + record_id bigint DEFAULT 0 NOT NULL, + name varchar(100) DEFAULT '' NOT NULL, + storage_blob_id bigint DEFAULT 0 NOT NULL +); + +COMMENT ON TABLE storage_attachment IS '閫氱敤鏂囦欢涓婁紶鐨勯檮浠朵俊鎭�'; + +COMMENT ON COLUMN storage_attachment.record_type IS '鍏宠仈鐨勮褰曠被鍨�'; +COMMENT ON COLUMN storage_attachment.record_id IS '鍏宠仈鐨勮褰昳d'; +COMMENT ON COLUMN storage_attachment.name IS '鍚嶇О, 濡�: file, avatar (鍖哄垎鍚屼竴鏉¤褰曚笉鍚岀被鍨嬬殑闄勪欢)'; +COMMENT ON COLUMN storage_attachment.storage_blob_id IS '鍏宠仈storage_blob璁板綍id'; + +CREATE INDEX idx_storage_attachment_on_record + ON storage_attachment (record_type, record_id); \ No newline at end of file -- Gitblit v1.9.3