Skip to content

Commit 3001f0b

Browse files
AllesandriaAllesandria
authored andcommitted
skeleton build of serverjs
1 parent 834674d commit 3001f0b

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

api/server.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
// build your server here and require it from index.js
2+
3+
4+
const express = require('express');
5+
const router = express.Router();
6+
7+
8+
9+
10+
11+
12+
13+
14+
module.exports = router;
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
//TASKS TABLE
22
exports.up = function (knex) {
33
return knex.schema.createTable('tasks', tbl => {
44
tbl.increments('task_id');
@@ -11,19 +11,18 @@ exports.up = function (knex) {
1111
.inTable('projects')
1212

1313

14-
})
14+
});
1515

1616

1717
};
1818

1919

2020
exports.down = function (knex) {
21-
return knex.schema.dropTableIfExists('tasks')
21+
return knex.schema.dropTableIfExists('tasks');
2222

2323

2424
};
2525

2626
// Figure out the migration order of tables
2727
//determine what seeds are going to be for each table with constraints
28-
//Take assessment test when finished with Sprint 2 Challenge
29-
//hackerrank, leetcode and hackathon
28+

data/migrations/20220820055419_merge_table.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ exports.up = function (knex) {
1313
.references('resource_id')
1414
.inTable('resources')
1515
.notNullable();
16+
17+
tbl.varchar('project_description')
18+
.references('project_description')
19+
.inTable('projects')
20+
1621
})
1722

1823

0 commit comments

Comments
 (0)