Skip to content

Commit 9aec796

Browse files
committed
changes seeds and migrations for the departments table. removes 'manager' from departments as its not needed explicitly, can be gathered from a query about department manager
1 parent 5397f94 commit 9aec796

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

data/migrations/20201116211523_users.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ exports.up = function (knex) {
1010
.createTable("departments", (tbl) => {
1111
tbl.increments();
1212
tbl.string("department", 128).notNullable();
13-
tbl.string("manager_first_name", 128).notNullable();
14-
tbl.string("manager_last_name", 128).notNullable();
13+
tbl.string("description", 128).notNullable();
1514
})
1615

1716
.createTable("job_titles", (tbl) => {

data/seeds/02_departments.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,39 @@ exports.seed = function (knex) {
33
return knex("departments").insert([
44
{
55
department: "Product Management",
6-
manager_first_name: "Annmarie",
7-
manager_last_name: "Lenaghen",
6+
description: "Manages products at all levels"
87
},
98
{
109
department: "Business Development",
11-
manager_first_name: "Thorndike",
12-
manager_last_name: "Twells",
10+
description: "Business Development department description goes here."
1311
},
1412
{
1513
department: "Accounting",
16-
manager_first_name: "Agustin",
17-
manager_last_name: "Flipsen",
14+
description: "Accounting department description goes here.stin"
1815
},
1916
{
2017
department: "Production",
21-
manager_first_name: "Hedvige",
22-
manager_last_name: "Vasenkov",
18+
description: "Production department description goes here."
2319
},
2420
{
2521
department: "Services",
26-
manager_first_name: "Jolyn",
27-
manager_last_name: "Adney",
22+
description: "Services department description goes here."
2823
},
2924
{
3025
department: "Sales",
31-
manager_first_name: "Aloise",
32-
manager_last_name: "MacInherney",
26+
description: "Sales department description goes here."
3327
},
3428
{
3529
department: "Support",
36-
manager_first_name: "Joyan",
37-
manager_last_name: "Ambrosoni",
30+
description: "Support department description goes here."
3831
},
3932
{
4033
department: "Research and Development",
41-
manager_first_name: "Olly",
42-
manager_last_name: "Sproul",
34+
description: "Research and Development department description goes here."
4335
},
4436
{
4537
department: "Training",
46-
manager_first_name: "Augustus",
47-
manager_last_name: "Daviot",
38+
description: "Training department description goes here."
4839
},
4940
]);
5041
};

0 commit comments

Comments
 (0)