AppReports/seeds/prod.js
2020-08-23 13:08:04 +02:00

26 lines
553 B
JavaScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of appreports which is released under GPL-3.0-or-later.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, August 2020
*/
'use strict';
async function seed (knex) {
// eslint-disable-next-line no-console
console.log ('creating prod seeds');
const apps = await knex ('app')
.select ();
if (apps.length < 1) {
await knex ('app')
.insert (
{ name: 'test app' }
);
}
}
module.exports = { seed };