Skip to content

Commit

Permalink
Add :people_count at Event
Browse files Browse the repository at this point in the history
  • Loading branch information
moretoend committed May 31, 2019
1 parent d820d09 commit bf04056
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions database/migrations/1559006574248_events_schema.js
@@ -0,0 +1,20 @@
'use strict'

/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')

class EventsSchema extends Schema {
up() {
this.table('events', (table) => {
table.integer('people_count').defaultTo(0)
})
}

down() {
this.table('events', (table) => {
table.dropColumn('people_count')
})
}
}

module.exports = EventsSchema

0 comments on commit bf04056

Please sign in to comment.