From 2ac5e0999ae3ad1f125de1a9ee477fa03f1257bd Mon Sep 17 00:00:00 2001 From: shufeng2012 <277665039@qq.com> Date: Fri, 24 Jul 2026 07:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BAsqlite3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=E7=9A=84sql=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/create_sqlite3.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/create_sqlite3.sql diff --git a/db/create_sqlite3.sql b/db/create_sqlite3.sql new file mode 100644 index 0000000..644e4a5 --- /dev/null +++ b/db/create_sqlite3.sql @@ -0,0 +1,18 @@ +-- Users 表创建脚本 +-- 数据库类型: SQLite + +CREATE TABLE IF NOT EXISTS Users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT UNIQUE NOT NULL, + password_hash TEXT NOT NULL, + create_at DATETIME DEFAULT CURRENT_TIMESTAMP, + last_login DATETIME, + is_active BOOLEAN DEFAULT 1 +); + +CREATE TABLE IF NOT EXISTS notes ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + pid INTEGER NOT NULL, + title VARCHAR(128) NOT NULL, + content TEXT NOT NULL +);