mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-30 22:13:47 +03:00
20 lines
435 B
JavaScript
20 lines
435 B
JavaScript
import configs from "~/knexfile";
|
|
import knex from "knex";
|
|
|
|
const envConfig = configs["development"];
|
|
|
|
console.log(`SETUP: database`, envConfig);
|
|
|
|
const db = knex(envConfig);
|
|
|
|
console.log(`RUNNING: drop-database.js`);
|
|
|
|
Promise.all([
|
|
db.schema.dropTable("users"),
|
|
db.schema.dropTable("slates"),
|
|
db.schema.dropTable("keys"),
|
|
]);
|
|
|
|
console.log(`FINISHED: drop-database.js`);
|
|
console.log(` CTRL +C to return to terminal.`);
|