From 2b8ab1534a6f84b301e5fbfd582fc46857beba75 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 8 Sep 2021 23:55:15 -0700 Subject: [PATCH] mysql table DDL: minor, not necessary, but a little more strict the directory is already hashed into dirhash. So this change is not strictly required. --- weed/command/scaffold/filer.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/command/scaffold/filer.toml b/weed/command/scaffold/filer.toml index c8cb70131..caf9d173d 100644 --- a/weed/command/scaffold/filer.toml +++ b/weed/command/scaffold/filer.toml @@ -44,7 +44,7 @@ dbFile = "./filer.db" # sqlite db file # CREATE TABLE IF NOT EXISTS filemeta ( # dirhash BIGINT COMMENT 'first 64 bits of MD5 hash value of directory field', # name VARCHAR(1000) BINARY COMMENT 'directory or file name', -# directory TEXT COMMENT 'full path to parent directory', +# directory TEXT BINARY COMMENT 'full path to parent directory', # meta LONGBLOB, # PRIMARY KEY (dirhash, name) # ) DEFAULT CHARSET=utf8; @@ -69,7 +69,7 @@ createTable = """ CREATE TABLE IF NOT EXISTS ` + "`%s`" + ` ( dirhash BIGINT, name VARCHAR(1000) BINARY, - directory TEXT, + directory TEXT BINARY, meta LONGBLOB, PRIMARY KEY (dirhash, name) ) DEFAULT CHARSET=utf8;