Skip to content

Commit 915387e

Browse files
committed
feat: 增加mysql默认字段
1 parent e75939f commit 915387e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ router.post('/upload', async (ctx) => {
167167
}
168168
});
169169

170-
171170
router.get('/files', async (ctx) => {
172171
const connection = await pool.getConnection();
173172
try {

utils/checkAndCreateTable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ async function checkAndCreateTable() {
2727
thumb_location VARCHAR(255) DEFAULT NULL,
2828
is_delete TINYINT(1) NOT NULL DEFAULT '0',
2929
real_file_location VARCHAR(255) DEFAULT NULL,
30-
real_file_thumb_location VARCHAR(255) DEFAULT NULL
30+
real_file_thumb_location VARCHAR(255) DEFAULT NULL,
31+
mime VARCHAR(255) DEFAULT NULL,
32+
ext VARCHAR(50) DEFAULT NULL,
3133
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`
3234
);
3335
console.log('Table "files" created successfully.');

0 commit comments

Comments
 (0)