dijkstra-backend-cloudron/node_modules/knex/lib/seed/stub/eg.stub

12 lines
301 B
Plaintext
Raw Normal View History

provide: seed
seed = (knex) ->
;; Deletes ALL existing entries
knex(.table_name).del()
.then(() ->
;; Inserts seed entries
knex(.table_name).insert with [
{ id = 1, col-name = .row-value-1 }
{ id = 2, col-name = .row-value-2 }
{ id = 3, col-name = .row-value-3 }
]