We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c69abbb commit bafb7c2Copy full SHA for bafb7c2
data/migrations/20220820054510_project_resources_table.js
@@ -1,15 +1,24 @@
1
-/**
2
- * @param { import("knex").Knex } knex
3
- * @returns { Promise<void> }
4
- */
+
5
exports.up = function(knex) {
6
-
+ return knex.schema.createTable('tasks', tbl => {
+ tbl.increments('task_id');
+ tbl.varchar('task_description').notNullable();
+ tbl.varchar('task_notes');
7
+ tbl.boolean('task_completed');
8
+ tbl.integer('project_id')
9
+ .notNullable()
10
+ .references('project_id')
11
+ .inTable('projects')
12
13
14
+ })
15
16
17
};
18
19
20
exports.down = function(knex) {
21
+ return knex.schema.dropTableIfExists('tasks')
22
23
24
0 commit comments