document_a
This commit is contained in:
63
database.js
63
database.js
@@ -260,31 +260,34 @@ function createSQLiteTables() {
|
|||||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||||
)`);
|
)`);
|
||||||
|
|
||||||
db.run(`CREATE TABLE IF NOT EXISTS tasks (
|
db.run(`CREATE TABLE IF NOT EXISTS tasks (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
title TEXT NOT NULL,
|
title TEXT NOT NULL,
|
||||||
description TEXT,
|
description TEXT,
|
||||||
status TEXT DEFAULT 'active',
|
status TEXT DEFAULT 'active',
|
||||||
created_by INTEGER NOT NULL,
|
created_by INTEGER NOT NULL,
|
||||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||||
deleted_at DATETIME,
|
deleted_at DATETIME,
|
||||||
deleted_by INTEGER,
|
deleted_by INTEGER,
|
||||||
original_task_id INTEGER,
|
original_task_id INTEGER,
|
||||||
start_date DATETIME,
|
start_date DATETIME,
|
||||||
due_date DATETIME,
|
due_date DATETIME,
|
||||||
rework_comment TEXT,
|
rework_comment TEXT,
|
||||||
closed_at DATETIME,
|
closed_at DATETIME,
|
||||||
closed_by INTEGER,
|
closed_by INTEGER,
|
||||||
task_type TEXT DEFAULT "regular",
|
task_type TEXT DEFAULT "regular",
|
||||||
type TEXT,
|
type TEXT,
|
||||||
approver_group_id INTEGER,
|
approver_group_id INTEGER,
|
||||||
document_id INTEGER,
|
document_id INTEGER,
|
||||||
FOREIGN KEY (created_by) REFERENCES users (id),
|
document_n TEXT,
|
||||||
FOREIGN KEY (deleted_by) REFERENCES users (id),
|
document_d TEXT,
|
||||||
FOREIGN KEY (original_task_id) REFERENCES tasks (id),
|
document_a TEXT,
|
||||||
FOREIGN KEY (closed_by) REFERENCES users (id)
|
FOREIGN KEY (created_by) REFERENCES users (id),
|
||||||
)`);
|
FOREIGN KEY (deleted_by) REFERENCES users (id),
|
||||||
|
FOREIGN KEY (original_task_id) REFERENCES tasks (id),
|
||||||
|
FOREIGN KEY (closed_by) REFERENCES users (id)
|
||||||
|
)`);
|
||||||
|
|
||||||
db.run(`CREATE TABLE IF NOT EXISTS task_assignments (
|
db.run(`CREATE TABLE IF NOT EXISTS task_assignments (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
@@ -720,7 +723,10 @@ function checkAndUpdateTableStructure() {
|
|||||||
{ name: 'task_type', type: 'TEXT DEFAULT "regular"' },
|
{ name: 'task_type', type: 'TEXT DEFAULT "regular"' },
|
||||||
{ name: 'type', type: 'TEXT' },
|
{ name: 'type', type: 'TEXT' },
|
||||||
{ name: 'approver_group_id', type: 'INTEGER' },
|
{ name: 'approver_group_id', type: 'INTEGER' },
|
||||||
{ name: 'document_id', type: 'INTEGER' }
|
{ name: 'document_id', type: 'INTEGER' },
|
||||||
|
{ name: 'document_n', type: 'TEXT' },
|
||||||
|
{ name: 'document_d', type: 'TEXT' },
|
||||||
|
{ name: 'document_a', type: 'TEXT' }
|
||||||
],
|
],
|
||||||
task_assignments: [
|
task_assignments: [
|
||||||
{ name: 'id', type: 'INTEGER PRIMARY KEY AUTOINCREMENT' },
|
{ name: 'id', type: 'INTEGER PRIMARY KEY AUTOINCREMENT' },
|
||||||
@@ -1106,7 +1112,10 @@ async function createPostgresTables() {
|
|||||||
task_type VARCHAR(50) DEFAULT 'regular',
|
task_type VARCHAR(50) DEFAULT 'regular',
|
||||||
type VARCHAR(100),
|
type VARCHAR(100),
|
||||||
approver_group_id INTEGER,
|
approver_group_id INTEGER,
|
||||||
document_id INTEGER
|
document_id INTEGER,
|
||||||
|
document_n TEXT,
|
||||||
|
document_d TEXT,
|
||||||
|
document_a TEXT
|
||||||
)
|
)
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user