From 0bb3c4c0601c6c54d5c21904dab261e3891f4adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E5=AE=B6=E8=BE=89?= Date: Sat, 22 Jun 2024 18:37:33 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=A2=9E=E5=8A=A0mysql=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index f1aa4fb..478d91d 100755 --- a/README.md +++ b/README.md @@ -30,6 +30,31 @@ nodejs 实现文件上传功能 ### 创建表的字段说明 +> 启动项目则会,自动创建,默认创建 `files` 表结构 + +```sql +CREATE TABLE files ( + id VARCHAR(50) DEFAULT NULL, + filename VARCHAR(255) NOT NULL, + filesize BIGINT(20) NOT NULL, + filelocation VARCHAR(255) NOT NULL, + created_by VARCHAR(255) NOT NULL, + created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, + updated_by VARCHAR(255) DEFAULT NULL, + updated_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + is_public TINYINT(1) DEFAULT '0', + public_expiration TIMESTAMP NULL DEFAULT NULL, + public_by VARCHAR(255) DEFAULT NULL, + is_thumb TINYINT(1) DEFAULT NULL, + thumb_location VARCHAR(255) DEFAULT NULL, + is_delete TINYINT(1) NOT NULL DEFAULT '0', + real_file_location VARCHAR(255) DEFAULT NULL, + real_file_thumb_location VARCHAR(255) DEFAULT NULL, + mime VARCHAR(255) DEFAULT NULL, + ext VARCHAR(50) DEFAULT NULL, +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +``` + | 列名 | 数据类型 | 是否为空 | 默认值 | 注释 | |------------------|----------------|----------|----------------------|----------------------------------------------| | `id` | int(11) | NOT NULL | | 文件的唯一标识 |