/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
  const collection = app.findCollectionByNameOrId("contatos");

  const record0 = new Record(collection);
    record0.set("nome", "placeholder");
    record0.set("email", "placeholder@example.com");
    record0.set("mensagem", "placeholder");
    record0.set("status", "novo");
  try {
    app.save(record0);
  } catch (e) {
    if (e.message.includes("Value must be unique")) {
      console.log("Record with unique value already exists, skipping");
    } else {
      throw e;
    }
  }
}, (app) => {
  // Rollback: record IDs not known, manual cleanup needed
})