Skip to content

Instantly share code, notes, and snippets.

@pebblexe
Created February 8, 2017 19:58
Show Gist options
  • Save pebblexe/5511523ee04b0c8609a97083da1676f0 to your computer and use it in GitHub Desktop.
Save pebblexe/5511523ee04b0c8609a97083da1676f0 to your computer and use it in GitHub Desktop.
exports.up = function (knex, Promise) {
console.log('creating texts table')
return knex.schema.createTableIfNotExists('texts', function (table) {
table.increments('id')
table.string('To')
table.string('From')
table.string('Text')
table.datetime('Date')
})
}
exports.down = function (knex, Promise) {
console.log('dropping texts')
return knex.schema.dropTableIfExists('texts').then(function () {
console.log('texts table was dropped')
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment