Dump and restore RDBMS by using Excel (XLSX)
$ go get github.com/koron/go-xlsx4db/cmd/xlsx4db
$ ./xlsx4db -h
Usage of xlsx4db:
-dbname string
DB source string, example:
* MySQL: "{user}:{pass}@{addr}/{name}"
* PostgreSQL: "postgres://{user}:{pass}@{addr}/{name}?sslmode=disable"
-driver string
DB driver: "mysql" or "postgres"
-mode string
Mode: "dump" or "restore"
-tables string
OPTION: table names to dump/restore
-xlsx string
Excel file name to operate
-
値を
NULL
にするにはセルの内容を
(NULL)
とし、背景を白以外の色で塗りつぶす。
-
How to make a column
NULL
Make a cell content as
(NULL)
and fill background with the color except white.
-
How does retrieve table names?
- PostgreSQL:
SELECT relname FROM pg_stat_user_tables
- MySQL:
SHOW TABLES
orSHOW TABLES FROM {db_name}
- PostgreSQL:
-
What dbname does MySQL accept?
vagrant:db1234@tcp(127.0.0.1:3306)/vagrant