You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

001_items_addColumn_stats.js 409B

123456789101112131415161718
  1. exports.up = function (knex) {
  2. return knex.schema.hasColumn('items', 'stats').then(bool => {
  3. if(!bool){
  4. return knex.schema.table('items', table => {
  5. table.json('stats')
  6. return table
  7. })
  8. }
  9. })
  10. }
  11. exports.down = function (knex) {
  12. return knex.schema.table('signups', function (table) {
  13. table.dropColumn('stats')
  14. })
  15. }