2020-03-25 16:45:44 +01:00

34 lines
698 B
JavaScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of Snippeteer which is released under BSD-3-Clause.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, March 2020
*/
/* eslint-disable no-magic-numbers */
'use strict';
/**
* execute migration
*
* @param {any} knex database connections
*/
async function up (knex) {
await knex.schema.createTable ('template', (table) => {
table.increments ('id');
table.string ('text', 64);
});
}
/**
* revert migration
*
* @param {any} knex database connections
*/
async function down (knex) {
await knex.schema.dropTable ('template');
}
module.exports = { up, down };