support both mysql and postgres

This commit is contained in:
Chris Lu
2018-05-26 22:02:49 -07:00
parent 87b3b84471
commit 869161a261
6 changed files with 127 additions and 30 deletions

View File

@@ -0,0 +1,17 @@
1. create "seaweedfs" database
export PGHOME=/Library/PostgreSQL/10
$PGHOME/bin/createdb --username=postgres --password seaweedfs
2. create "filemeta" table
$PGHOME/bin/psql --username=postgres --password seaweedfs
CREATE TABLE IF NOT EXISTS filemeta (
dirhash BIGINT,
name VARCHAR(1000),
directory VARCHAR(4096),
meta bytea,
PRIMARY KEY (dirhash, name)
);