mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 14:07:20 +03:00
18 lines
438 B
JavaScript
18 lines
438 B
JavaScript
import configs from "~/knexfile";
|
|
import knex from "knex";
|
|
|
|
import * as Logging from "~/common/logging";
|
|
|
|
const envConfig = configs["development"];
|
|
|
|
Logging.log(`SETUP: database`, envConfig);
|
|
|
|
const db = knex(envConfig);
|
|
|
|
Logging.log(`RUNNING: setup-database.js`);
|
|
|
|
Promise.all([db.raw('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"')]);
|
|
|
|
Logging.log(`FINISHED: setup-database.js`);
|
|
Logging.log(` CTRL +C to return to terminal.`);
|