(mode int)
| 68 | } |
| 69 | |
| 70 | func getSchemaKey(mode int) (string, error) { |
| 71 | if mode == LocalMode { |
| 72 | return consts.SystemSchema, nil |
| 73 | } |
| 74 | |
| 75 | if mode == RemoteMode { |
| 76 | return consts.SystemRemoteSchema, nil |
| 77 | } |
| 78 | |
| 79 | return "", errors.Errorf("unsupported migration type '%d'", mode) |
| 80 | } |
| 81 | |
| 82 | func getSchema(ctx context.DnoteCtx, schemaKey string) (int, error) { |
| 83 | var ret int |