Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fahrtenbuch
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWP WS21_22 - Fahrtenbuch
Team Einhorn
fahrtenbuch
Commits
a9a0990c
Commit
a9a0990c
authored
3 years ago
by
alrwasheda
Browse files
Options
Downloads
Patches
Plain Diff
temporary testing-seeders deleted
parent
74d2b7c3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/src/db/seeder.ts
+0
-44
0 additions, 44 deletions
server/src/db/seeder.ts
server/src/server.ts
+0
-3
0 additions, 3 deletions
server/src/server.ts
with
0 additions
and
47 deletions
server/src/db/seeder.ts
deleted
100644 → 0
+
0
−
44
View file @
74d2b7c3
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
;
This diff is collapsed.
Click to expand it.
server/src/server.ts
+
0
−
3
View file @
a9a0990c
...
@@ -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
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment