Skip to content
Snippets Groups Projects
Commit 0cce9c42 authored by Bernard Roland (Student Com20)'s avatar Bernard Roland (Student Com20)
Browse files

Extended the database model

parent 93d89f3c
Branches
Tags
No related merge requests found
......@@ -40,10 +40,18 @@ export async function up(database: Knex): Promise<void> {
table.text('name').notNullable();
table.text('text').notNullable();
table.enum('status', [ 'open', 'closed', 'suspended' ]).notNullable();
table.enum('priority', [ 'low', 'medium', 'high', 'urgent' ]).notNullable();
table.dateTime('created').notNullable();
table.dateTime('edited').notNullable();
})
.createTable('task_dependencies', table => {
table.uuid('task_id').notNullable().references('tasks.id');
table.uuid('requires_id').notNullable().references('tasks.id');
table.primary(['task_id', 'requires_id']);
})
.createTable('task_requirements', table => {
table.uuid('task_id').notNullable().references('tasks.id');
table.uuid('role_id').notNullable().references('users.id');
table.uuid('role_id').notNullable().references('roles.id');
table.primary(['task_id', 'role_id']);
table.integer('time').notNullable();
})
......@@ -60,6 +68,8 @@ export async function up(database: Knex): Promise<void> {
table.uuid('task_id').notNullable().references('tasks.id');
table.uuid('user_id').notNullable().references('users.id');
table.text('text').notNullable();
table.dateTime('created').notNullable();
table.dateTime('edited').notNullable();
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment