Skip to content

Commit a53b33f

Browse files
AllesandriaAllesandria
authored andcommitted
updated config settings in knexfile
1 parent cf46872 commit a53b33f

File tree

4 files changed

+974
-75
lines changed

4 files changed

+974
-75
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ You are not allowed to collaborate during the sprint challenge.
1010

1111
## Project Set Up
1212

13-
- [ ] Run `npm install` to install your dependencies.
14-
- [ ] Run tests locally executing `npm test`.
13+
- [ x] Run `npm install` to install your dependencies.
14+
- [x ] Run tests locally executing `npm test`.
1515

1616
## Project Instructions
1717

@@ -43,23 +43,23 @@ Build the migration(s) in Knex inside the `data/migrations` folder using appropr
4343

4444
- [ ] A **project** is what needs to be done and is stored in a `projects` table with the following columns:
4545

46-
- [ ] `project_id` - primary key
47-
- [ ] `project_name` - required
48-
- [ ] `project_description` - optional
49-
- [ ] `project_completed` - the database defaults it to `false` (integer 0) if not provided
46+
- [ ] `project_id` - primary key - table.increments("project_id")
47+
- [ ] `project_name` - required - varchar -notNullable()
48+
- [ ] `project_description` - optional - varchar
49+
- [ ] `project_completed` - the database defaults it to `false` (integer 0) if not provided - boolean - false(0)
5050

51-
- [ ] A **resource** is anything needed to complete a project and is stored in a `resources` table with the following columns:
51+
- [ ] A **resource** is anything needed to complete a project and is stored in a `resources` table with the following columns:
5252

53-
- [ ] `resource_id` - primary key
54-
- [ ] `resource_name` - required and unique
55-
- [ ] `resource_description` - optional
53+
- [ ] `resource_id` - primary key - table.increments("resource_id")
54+
- [ ] `resource_name` - required and unique - notNullable - varchar
55+
- [ ] `resource_description` - optional - varchar
5656

5757
- [ ] A **task** is one of the steps needed to complete a project and is stored in a `tasks` table with the following columns:
5858

59-
- [ ] `task_id` - primary key
60-
- [ ] `task_description` - required
61-
- [ ] `task_notes` - optional
62-
- [ ] `task_completed` - the database defaults it to `false` (integer 0) if not provided
59+
- [ ] `task_id` - primary key - table.increments("task_id")
60+
- [ ] `task_description` - required - notNullable - varchar
61+
- [ ] `task_notes` - optional - varchar
62+
- [ ] `task_completed` - the database defaults it to `false` (integer 0) if not provided -boolean (fals)
6363
- [ ] `project_id` - required and points to an actual `project_id` in the `projects` table
6464

6565
- [ ] A **resource assignment** connects a resource and a project, and is stored in a `project_resources` table. You decide what columns to use.

knexfile.js

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,10 @@ module.exports = {
88
development: {
99
client: 'sqlite3',
1010
connection: {
11-
filename: './dev.sqlite3'
12-
}
13-
},
14-
15-
staging: {
16-
client: 'postgresql',
17-
connection: {
18-
database: 'my_db',
19-
user: 'username',
20-
password: 'password'
21-
},
22-
pool: {
23-
min: 2,
24-
max: 10
25-
},
26-
migrations: {
27-
tableName: 'knex_migrations'
28-
}
29-
},
30-
31-
production: {
32-
client: 'postgresql',
33-
connection: {
34-
database: 'my_db',
35-
user: 'username',
36-
password: 'password'
37-
},
38-
pool: {
39-
min: 2,
40-
max: 10
11+
filename: './data/projects2.db3'
4112
},
4213
migrations: {
43-
tableName: 'knex_migrations'
14+
directory: './data/migrations'
4415
}
4516
}
4617

0 commit comments

Comments
 (0)