generated from axonivy-market/market-product
-
Notifications
You must be signed in to change notification settings - Fork 1
/
scripts.sql
52 lines (47 loc) · 1.32 KB
/
scripts.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
create table TicketRequest (
id varchar(32) not null,
version int,
createdByUserName varchar(255),
createdDate datetime2,
flaggedDeletedByUserName varchar(255),
flaggedDeletedDate datetime2,
modifiedByUserName varchar(255),
modifiedDate datetime2,
caseId int,
ticketTitle varchar(250),
ticketNumber varchar(250),
ticketType varchar(250),
ticketRaiser varchar(250),
ticketDescription varchar(1000),
forwardToMail varchar(50),
primary key (id)
)
create table ApprovalHistory (
id varchar(32) not null,
version int,
createdByUserName varchar(255),
createdDate datetime2,
flaggedDeletedByUserName varchar(255),
flaggedDeletedDate datetime2,
modifiedByUserName varchar(255),
modifiedDate datetime2,
approvalDate datetime2,
comment varchar(1000),
decision varchar(100),
isEditing bit,
selectedConfirmations varchar(1000),
primary key (id)
)
create table RequestApprovalHistory (
requestId varchar(32) not null,
approvalHistoryId varchar(32) not null,
primary key (requestId, approvalHistoryId)
)
alter table RequestApprovalHistory
add constraint fk_requestApprovalHistory_request
foreign key (requestId)
references TicketRequest(id)
alter table RequestApprovalHistory
add constraint fk_requestApprovalHistory_approvalHistory
foreign key (approvalHistoryId)
references ApprovalHistory(id);