Browse Source

Fix bug when dump (#1597)

Fix bug when dump

Reviewed-on: #1597
tags/v1.0.0
Lunny Xiao 2 weeks ago
parent
commit
367b15879e
2 changed files with 9 additions and 1 deletions
  1. +5
    -0
      Makefile
  2. +4
    -1
      engine.go

+ 5
- 0
Makefile View File

@@ -187,6 +187,11 @@ test-sqlite: go-check
$(GO) test -v -race -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \
-quote=$(TEST_QUOTE_POLICY) -coverprofile=sqlite.$(TEST_QUOTE_POLICY).$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic

.PHONY: test-sqlite-schema
test-sqlite-schema: go-check
$(GO) test -v -race -schema=xorm -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \
-quote=$(TEST_QUOTE_POLICY) -coverprofile=sqlite.$(TEST_QUOTE_POLICY).$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic

.PHONY: test-sqlite\#%
test-sqlite\#%: go-check
$(GO) test -v -race -run $* -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \


+ 4
- 1
engine.go View File

@@ -363,7 +363,10 @@ func (engine *Engine) dumpTables(tables []*schemas.Table, w io.Writer, tp ...sch
if dialect == nil {
return errors.New("Unsupported database type")
}
dialect.Init(nil, engine.dialect.URI())
var destURI dialects.URI
uri := engine.dialect.URI()
destURI = *uri
dialect.Init(nil, &destURI)
distDBName = string(tp[0])
}



Loading…
Cancel
Save