slate/scripts/drop-database.js
2020-11-16 23:50:08 -08:00

28 lines
706 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("pending"),
db.schema.dropTable("activity"),
db.schema.dropTable("trusted"),
db.schema.dropTable("subscriptions"),
db.schema.dropTable("keys"),
db.schema.dropTable("keys"),
db.schema.dropTable("stats"),
db.schema.dropTable('deals'),
db.schema.dropTable("orphans")
]);
console.log(`FINISHED: drop-database.js`);
console.log(` CTRL +C to return to terminal.`);