(ctx context.DnoteCtx, s schema)
| 242 | } |
| 243 | |
| 244 | func writeSchema(ctx context.DnoteCtx, s schema) error { |
| 245 | path := getSchemaPath(ctx) |
| 246 | d, err := yaml.Marshal(&s) |
| 247 | if err != nil { |
| 248 | return errors.Wrap(err, "Failed to marshal schema into yaml") |
| 249 | } |
| 250 | |
| 251 | if err := os.WriteFile(path, d, 0644); err != nil { |
| 252 | return errors.Wrap(err, "Failed to write schema file") |
| 253 | } |
| 254 | |
| 255 | return nil |
| 256 | } |
| 257 | |
| 258 | func getUnrunMigrations(ctx context.DnoteCtx) ([]int, error) { |
| 259 | var ret []int |
no test coverage detected