Add comment to migration files

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-08-05 13:13:58 +02:00
parent 7bcb590000
commit 5cfe05fb3c
2 changed files with 5 additions and 0 deletions
@@ -18,6 +18,8 @@
* @param {import('knex').Knex} knex
*/
exports.up = async function up(knex) {
// This database schema uses some postgres specific features (like tsvector
// and jsonb columns) and can not be used with other database engines.
await knex.schema.createTable('documents', table => {
table.comment('The table of documents');
table
@@ -18,6 +18,9 @@
* @param {import('knex').Knex} knex
*/
exports.up = async function up(knex) {
// This database migration uses some postgres specific features (like bytea
// columns and build in functions) and can not be used with other database
// engines.
await knex.schema.alterTable('documents', table => {
// Extend the documents table with a column that allows to check whether a
// document with the same content is already indexed.