mirror of
https://github.com/knex/knex.git
synced 2025-10-01 11:06:51 +00:00

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.
10 lines
330 B
Plaintext
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'})),
|