Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: update prod schema
Steven68b30063a9d3
diff --git a/server/resource.go b/server/resource.goindex 2cec78801..141efb32e 100644--- a/server/resource.go+++ b/server/resource.go@@ -3,7 +3,7 @@ package serverimport ("encoding/json""fmt"- "io/ioutil"+ "io""net/http""strconv"@@ -39,7 +39,7 @@ func (s *Server) registerResourceRoutes(g *echo.Group) {}defer src.Close()- fileBytes, err := ioutil.ReadAll(src)+ fileBytes, err := io.ReadAll(src)if err != nil {return echo.NewHTTPError(http.StatusInternalServerError, "Failed to read file").SetInternal(err)}diff --git a/store/db/migration/prod/LATEST__SCHEMA.sql b/store/db/migration/prod/LATEST__SCHEMA.sqlindex ca0bb1480..5c1bc47e9 100644--- a/store/db/migration/prod/LATEST__SCHEMA.sql+++ b/store/db/migration/prod/LATEST__SCHEMA.sql@@ -3,6 +3,7 @@ DROP TABLE IF EXISTS `memo_organizer`;DROP TABLE IF EXISTS `memo`;DROP TABLE IF EXISTS `shortcut`;DROP TABLE IF EXISTS `resource`;+DROP TABLE IF EXISTS `user_setting`;DROP TABLE IF EXISTS `user`;-- user@@ -139,3 +140,13 @@ SETWHERErowid = old.rowid;END;++-- user_setting+CREATE TABLE user_setting (+ user_id INTEGER NOT NULL,+ key TEXT NOT NULL,+ value TEXT NOT NULL,+ FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE+);++CREATE UNIQUE INDEX user_setting_key_user_id_index ON user_setting(key, user_id);