You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmd_db.sh 455 B

1 kuukausi sitten
123456789101112131415161718192021
  1. #!/bin/bash
  2. # 使用方法, 直接执行该脚本更新所有表, cmd_db.sh 表名, 如 ./cmd_db.sh tableName
  3. Table=*
  4. TName=""
  5. if [ "$1" ] ;then
  6. Table=$1
  7. TName="^$1$"
  8. fi
  9. BasePath="./"
  10. DBUSER="root"
  11. DBPSW="Fnuo123com@"
  12. DBNAME="egg"
  13. DBHOST="119.23.182.117"
  14. DBPORT="3306"
  15. rm -rf $BasePath/app/db/model/$Table.go && \
  16. xorm reverse mysql "$DBUSER:$DBPSW@tcp($DBHOST:$DBPORT)/$DBNAME?charset=utf8" $BasePath/etc/db_tpl $BasePath/src/models/ $TName