knex/lib/seed/stub/coffee.stub
Tim Branyen 56d73165cb Adds trailing commas to seed stubs
I just started started using the seed feature of knex, which is awesome!
I thought it might be nice to add a trailing comma to make it easier to
copy/paste new lines.

Just a minor tweak.
2015-05-03 13:41:56 -04:00

10 lines
330 B
Plaintext

exports.seed = (knex, Promise) ->
Promise.join(
# Deletes ALL existing entries
knex('table_name').del(),
# Inserts seed entries
knex('table_name').insert({id: 1, colName: 'rowValue'}),
knex('table_name').insert({id: 2, colName: 'rowValue2'}),
knex('table_name').insert({id: 3, colName: 'rowValue3'})),