MCPcopy Create free account
hub / github.com/temporalio/temporal / updateSchema

Function updateSchema

tools/sql/handler.go:40–57  ·  view source on GitHub ↗

updateSchema executes the updateSchemaTask using the given command line args as input

(cli *cli.Context, logger log.Logger)

Source from the content-addressed store, hash-verified

38// updateSchema executes the updateSchemaTask
39// using the given command line args as input
40func updateSchema(cli *cli.Context, logger log.Logger) error {
41 cfg, err := parseConnectConfig(cli)
42 if err != nil {
43 logger.Error("Unable to read config.", tag.Error(schema.NewConfigError(err.Error())))
44 return err
45 }
46 conn, err := NewConnection(cfg, logger)
47 if err != nil {
48 logger.Error("Unable to connect to SQL database.", tag.Error(err))
49 return err
50 }
51 defer conn.Close()
52 if err := schema.Update(cli, conn, logger); err != nil {
53 logger.Error("Unable to update SQL schema.", tag.Error(err))
54 return err
55 }
56 return nil
57}
58
59// createDatabase creates a sql database
60func createDatabase(cli *cli.Context, logger log.Logger) error {

Callers

nothing calls this directly

Calls 7

CloseMethod · 0.95
ErrorFunction · 0.92
NewConfigErrorFunction · 0.92
UpdateFunction · 0.92
parseConnectConfigFunction · 0.85
NewConnectionFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected