Add storage
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
CREATE TABLE IF NOT EXISTS settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS drive_file (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
filename TEXT,
|
||||
original_name TEXT,
|
||||
size INTEGER,
|
||||
mime_type TEXT,
|
||||
r2_key TEXT,
|
||||
share_token TEXT,
|
||||
share_expiry TEXT,
|
||||
userid INTEGER,
|
||||
createtime TEXT,
|
||||
flag INTEGER DEFAULT 1
|
||||
);
|
||||
|
||||
ALTER TABLE user ADD COLUMN password_hashed INTEGER DEFAULT 0;
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Ensure note.userid column exists (for older databases created before this field was added)
|
||||
ALTER TABLE note ADD COLUMN userid INTEGER DEFAULT 0;
|
||||
|
||||
-- Index for faster per-user queries
|
||||
CREATE INDEX IF NOT EXISTS idx_note_userid ON note(userid);
|
||||
CREATE INDEX IF NOT EXISTS idx_note_flag_userid ON note(flag, userid);
|
||||
@@ -0,0 +1,5 @@
|
||||
-- V4: Assign existing notes without an owner to userid=1 (first admin)
|
||||
-- This ensures production data created before multi-user isolation is not lost.
|
||||
UPDATE note SET userid = 1 WHERE userid IS NULL OR userid = 0;
|
||||
|
||||
INSERT OR IGNORE INTO db_version (version, applied_at) VALUES (4, datetime('now'));
|
||||
@@ -0,0 +1,4 @@
|
||||
-- V5: Add tags column to note table
|
||||
ALTER TABLE note ADD COLUMN tags TEXT DEFAULT '';
|
||||
|
||||
INSERT OR IGNORE INTO db_version (version, applied_at) VALUES (5, datetime('now'));
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Thu May 14 15:10:41 CST 2026
|
||||
#Fri May 15 17:58:56 CST 2026
|
||||
groupId=com.cyynote
|
||||
artifactId=cyynote
|
||||
version=1.0.0
|
||||
|
||||
+3
@@ -1,5 +1,6 @@
|
||||
com/cyynote/payload/request/LoginRequest.class
|
||||
com/cyynote/dso/DsHelper.class
|
||||
com/cyynote/controller/SettingsController.class
|
||||
com/cyynote/controller/JwtInterceptor.class
|
||||
com/cyynote/util/TreeNode.class
|
||||
com/cyynote/model/Appx.class
|
||||
@@ -14,12 +15,14 @@ com/cyynote/Config.class
|
||||
com/cyynote/payload/request/UpdatePasswordRequest.class
|
||||
com/cyynote/payload/request/NoteRequest.class
|
||||
com/cyynote/WebApp.class
|
||||
com/cyynote/controller/DriveController.class
|
||||
com/cyynote/dso/AuthSqlAnnotation.class
|
||||
com/cyynote/dso/SqlMapper.class
|
||||
com/cyynote/payload/response/JwtResponse.class
|
||||
com/cyynote/controller/AuthController.class
|
||||
com/cyynote/dso/NoteSqlAnnotation.class
|
||||
com/cyynote/model/AppxModel.class
|
||||
com/cyynote/model/DriveFileModel.class
|
||||
com/cyynote/dso/SqlAnnotation.class
|
||||
com/cyynote/controller/BaseController.class
|
||||
com/cyynote/util/TreeBuild.class
|
||||
|
||||
+3
@@ -3,8 +3,10 @@
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/AuthController.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/BaseController.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/DemoController.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/DriveController.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/JwtInterceptor.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/NoteController.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/SettingsController.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/controller/Test2Controller.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/dso/AuthProcessorImpl.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/dso/AuthSqlAnnotation.java
|
||||
@@ -14,6 +16,7 @@
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/dso/SqlMapper.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/model/Appx.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/model/AppxModel.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/model/DriveFileModel.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/model/HistoryModel.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/model/NoteModel.java
|
||||
/opt/cyy/CyyNote/cyynote-backend/src/main/java/com/cyynote/model/UserModel.java
|
||||
|
||||
Reference in New Issue
Block a user