Skip to content
Snippets Groups Projects
Commit a9a0990c authored by alrwasheda's avatar alrwasheda :speech_balloon:
Browse files

temporary testing-seeders deleted

parent 74d2b7c3
No related branches found
No related tags found
No related merge requests found
import Boat from "./models/Boat";
const seedBoatTable = async () => {
if ((await Boat.count()) < 1) {
await Boat.create({
id: 1,
name: "boat one",
boatType: "canoe",
status: false,
active: true,
seats: 5,
tags: ["big", "yellow"]
});
await Boat.create({
id: 2,
name: "boat two",
boatType: "kayak",
status: false,
active: true,
seats: 4,
tags: ["red"]
});
await Boat.create({
id: 3,
name: "boat three",
boatType: "speedboat",
status: false,
active: false,
seats: 2,
tags: ["dangerous", "fast"]
});
}
};
const seedCheckInTable = async () => {};
const seedCustomerTable = async () => {};
const runSeeders = async () => {
await seedBoatTable();
await seedCheckInTable();
await seedCustomerTable();
};
export default runSeeders;
...@@ -6,7 +6,6 @@ import createInitialEmployeeIfNotExists from "./db/createInitialEmployee"; ...@@ -6,7 +6,6 @@ import createInitialEmployeeIfNotExists from "./db/createInitialEmployee";
import showAllDBs from "./db/DB_Information/showAllDBs"; import showAllDBs from "./db/DB_Information/showAllDBs";
import showTables from "./db/DB_Information/showDBTables"; import showTables from "./db/DB_Information/showDBTables";
import showTableContent from "./db/DB_Information/showTableContent"; import showTableContent from "./db/DB_Information/showTableContent";
// import runSeeders from "./db/seeder";
import accountsRouter from "./routes/accounts.routes"; import accountsRouter from "./routes/accounts.routes";
import authRouter from "./routes/auth.routes"; import authRouter from "./routes/auth.routes";
import boatsRouter from "./routes/boatRoutes.routes"; import boatsRouter from "./routes/boatRoutes.routes";
...@@ -14,12 +13,10 @@ import userRouter from "./routes/user.routes"; ...@@ -14,12 +13,10 @@ import userRouter from "./routes/user.routes";
import boatTypeRouter from "./routes/boatTypeRoutes.routes"; import boatTypeRouter from "./routes/boatTypeRoutes.routes";
import entryRouter from "./routes/createLogEntryRoutes.routes"; import entryRouter from "./routes/createLogEntryRoutes.routes";
let init = async () => { let init = async () => {
//DB //DB
const sequelize = await initializeDatabase(); const sequelize = await initializeDatabase();
await createInitialEmployeeIfNotExists(); await createInitialEmployeeIfNotExists();
// await runSeeders();
// server // server
const app = express(); const app = express();
app.use(express.json()); app.use(express.json());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment