Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: knex
node v6.17.1
endpoint
share
tweet
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…
Clone and edit this document