/// <reference path="../pb_data/types.d.ts" />
migrate(
  app => {
    const collection = app.findCollectionByNameOrId('pbc_809716240');
    if (collection.fields.fieldNames().includes('songNum')) {
      collection.fields.removeByName('songNum');
    }
    return app.save(collection);
  },
  app => {
    const collection = app.findCollectionByNameOrId('pbc_809716240');
    if (!collection.fields.fieldNames().includes('songNum')) {
      collection.fields.addAt(collection.fields.length, new Field({
        hidden: false,
        id: 'number586325581',
        max: null,
        min: null,
        name: 'songNum',
        onlyInt: false,
        presentable: false,
        required: false,
        system: false,
        type: 'number'
      }));
    }
    return app.save(collection);
  }
);
