Skip to content

Commit ba3a5be

Browse files
AllesandriaAllesandria
authored andcommitted
resources table built
1 parent 287098e commit ba3a5be

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

data/migrations/20220819053947_projects_table.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ exports.up = function(knex) {
55
tbl.varchar('project_name').notNullable();
66
tbl.varchar('project_description');
77
tbl.boolean('project_completed');
8-
})
9-
10-
8+
});
119

1210
};
1311

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
exports.up = function(knex) {
3+
return knex.schema.createTable('resources', tbl => {
4+
tbl.increments('resource_id');
5+
tbl.varchar('resource_name').notNullable().unique();
6+
tbl.varchar('resource_description');
7+
})
8+
9+
10+
11+
};
12+
13+
14+
exports.down = function(knex) {
15+
return knex.schema.dropTableIfExists('resources')
16+
17+
18+
};

0 commit comments

Comments
 (0)