RunKit + npm: knex

node v6.17.1
endpointsharetweet
var knex = require("knex")({ client: 'pg' }); const queries = knex.schema.createTable('prediction_models', function (table){ table.increments('id'); table.string('model_name').index(); table.jsonb('model_params'); table.timestamp('createdAt').defaultTo(knex.fn.now()); }).raw('CREATE INDEX on prediction_models USING GIN (model_params)') .toSQL(); queries.forEach(toSql => console.log(toSql.sql));
Created from: https://npm.runkit.com/knex
Loading…