File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ type Config struct {
9898 DistributedTransaction bool `yaml:"distributed_transaction"`
9999 // map table name and configuration
100100 Tables map [string ]* TableConfig `yaml:"tables"`
101+ // if true skip auto create database
102+ SkipAutoSetup bool `yaml:"skip_auto_setup"`
101103}
102104
103105// ShardColumnName column name of unique id for all shards
Original file line number Diff line number Diff line change @@ -808,6 +808,9 @@ func setupDBFromConfig(config *config.Config) error {
808808 if config == nil {
809809 return errors .New ("cannot setup database connection. config is nil" )
810810 }
811+ if config .SkipAutoSetup {
812+ return nil
813+ }
811814 for tableName , table := range config .Tables {
812815 var err error
813816 if table .IsShard {
You can’t perform that action at this time.
0 commit comments