canonn-science / CAPIv2-Strapi

Canonn APIv2
https://api.canonn.tech
GNU General Public License v3.0
41 stars 8 forks source link

Add meta model for use with Canonn-EDSM-Updater #114

Closed derrickmehaffy closed 5 years ago

derrickmehaffy commented 5 years ago

Reminder to add in a Metadata model for use with the following repo: https://github.com/canonn-science/CAPIv2-Updater

Should include the following fields:

Subject to change based on @coldwhitelight 's input on the reporting structure of the Updater tool.

derrickmehaffy commented 5 years ago

Based on the following comment in https://github.com/canonn-science/Canonn-EDSM-Updater/blob/12090f9b6c4cb9c2ea80ed0037b1bc54105d2689/src/index.js#L50-L55

        /*console.log('+ LAST UPDATE (if we have the meta I mentioned)');
        console.log('   When: TIMESTAMP');
        console.log('   Forced: FALSE');
        console.log('   Updated Systems: INT');
        console.log('   Updated Bodies: INT');
        console.log('');*/
derrickmehaffy commented 5 years ago

Model Added:

{
  "connection": "default",
  "collectionName": "apiupdates",
  "info": {
    "name": "apiupdate",
    "description": "Canonn API updater logging and errors"
  },
  "options": {
    "increments": true,
    "timestamps": true,
    "comment": ""
  },
  "attributes": {
    "UpdateTime": {
      "default": "",
      "type": "date"
    },
    "forced": {
      "default": false,
      "type": "boolean"
    },
    "systemsUpdated": {
      "default": "",
      "type": "json"
    },
    "bodiesUpdated": {
      "default": "",
      "type": "json"
    },
    "updateLog": {
      "default": "",
      "type": "json"
    },
    "notes": {
      "default": "",
      "type": "text"
    }
  }
}
derrickmehaffy commented 5 years ago

Pending some testing and rebuilding example seed SQL File

(Fixing a few errors from GSheet exports and scripts