feat: complete IM P0 and P1 reliability work
This commit is contained in:
@@ -24,6 +24,13 @@ func main() {
|
||||
if err = db.Ping(); err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
var schema string
|
||||
if err = db.QueryRow("SELECT DATABASE()").Scan(&schema); err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
if strings.TrimSpace(schema) == "" {
|
||||
fatal("IM_MYSQL_DSN must select a tenant database")
|
||||
}
|
||||
|
||||
raw, err := os.ReadFile("docs/IM-群聊业务表设计.sql")
|
||||
if err != nil {
|
||||
@@ -39,7 +46,7 @@ func main() {
|
||||
fatal(fmt.Errorf("exec failed: %s: %w", stmt, err))
|
||||
}
|
||||
}
|
||||
fmt.Println("group business tables applied")
|
||||
fmt.Printf("group business tables applied to %s\n", schema)
|
||||
}
|
||||
|
||||
func stripSQLLineComments(text string) string {
|
||||
|
||||
Reference in New Issue
Block a user