mirror of
https://github.com/strapi/strapi.git
synced 2025-07-31 21:09:39 +00:00
26 lines
588 B
Plaintext
26 lines
588 B
Plaintext
![]() |
'use strict';
|
||
|
|
||
|
/**
|
||
|
* Seed files allow you to populate your database with test or seed data
|
||
|
* independent of your migration files.
|
||
|
*/
|
||
|
|
||
|
exports.seed = function(connection, Promise) {
|
||
|
return Promise.all([
|
||
|
<% _.forEach(models, function(definition, model) { %>
|
||
|
/**
|
||
|
* Insert, update or delete data for the `<%= model %>` table.
|
||
|
*/
|
||
|
|
||
|
// Data to insert.
|
||
|
// connection('<%= model %>').insert(),
|
||
|
|
||
|
// Data to update.
|
||
|
// connection('<%= model %>').where().update(),
|
||
|
|
||
|
// Data to delete.
|
||
|
// connection('<%= model %>').where().del(),
|
||
|
<% }); %>
|
||
|
]);
|
||
|
};
|