aboutsummaryrefslogtreecommitdiff
path: root/docker/seaweedfs.sql
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-04-26 17:19:35 +0800
committerbingoohuang <bingoo.huang@gmail.com>2021-04-26 17:19:35 +0800
commitd861cbd81b75b6684c971ac00e33685e6575b833 (patch)
tree301805fef4aa5d0096bfb1510536f7a009b661e7 /docker/seaweedfs.sql
parent70da715d8d917527291b35fb069fac077d17b868 (diff)
parent4ee58922eff61a5a4ca29c0b4829b097a498549e (diff)
downloadseaweedfs-d861cbd81b75b6684c971ac00e33685e6575b833.tar.xz
seaweedfs-d861cbd81b75b6684c971ac00e33685e6575b833.zip
Merge branch 'master' of https://github.com/bingoohuang/seaweedfs
Diffstat (limited to 'docker/seaweedfs.sql')
-rw-r--r--docker/seaweedfs.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/docker/seaweedfs.sql b/docker/seaweedfs.sql
new file mode 100644
index 000000000..38ebc575c
--- /dev/null
+++ b/docker/seaweedfs.sql
@@ -0,0 +1,12 @@
+CREATE DATABASE IF NOT EXISTS seaweedfs;
+CREATE USER IF NOT EXISTS 'seaweedfs'@'%' IDENTIFIED BY 'secret';
+GRANT ALL PRIVILEGES ON seaweedfs_fast.* TO 'seaweedfs'@'%';
+FLUSH PRIVILEGES;
+USE seaweedfs;
+CREATE TABLE IF NOT EXISTS filemeta (
+ dirhash BIGINT COMMENT 'first 64 bits of MD5 hash value of directory field',
+ name VARCHAR(1000) COMMENT 'directory or file name',
+ directory TEXT COMMENT 'full path to parent directory',
+ meta LONGBLOB,
+ PRIMARY KEY (dirhash, name)
+) DEFAULT CHARSET=utf8; \ No newline at end of file