-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_tables.sql
More file actions
56 lines (50 loc) · 1.76 KB
/
Copy pathinstall_tables.sql
File metadata and controls
56 lines (50 loc) · 1.76 KB
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
52
53
54
55
56
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'MailAlerts')
CREATE TABLE [dbo].[MailAlerts](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Enabled] [bit] NOT NULL CONSTRAINT [DF_MailAlerts_Enabled] DEFAULT ((1)),
[Query] [varchar](3000) NOT NULL,
[Subject] [varchar](100) NOT NULL,
[Message] [varchar](3000) NULL,
[Recipients] [varchar](1000) NOT NULL,
[LastTrue] [bit] NOT NULL CONSTRAINT [DF_MailAlerts_LastTrue] DEFAULT ((0)),
[LastTrueTime] [datetime] NULL,
[LastCheckTime] [datetime] NULL,
[MinutesResend] [int] NULL,
[MessageQuery] [varchar](3000) NULL,
[LastStatus] [varchar](300) NULL
) ON [PRIMARY]
GO
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'MailConfig')
CREATE TABLE [dbo].[MailConfig](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ServerURL] [varchar](100) NOT NULL,
[ServerPort] [int] NOT NULL,
[Username] [varchar](50) NOT NULL,
[Password] [varchar](150) NOT NULL,
[SenderName] [varchar](50) NOT NULL,
[SenderAddress] [varchar](50) NOT NULL,
[ServiceCommand] [varchar](50) NULL
) ON [PRIMARY]
GO
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'MailRequests')
CREATE TABLE [dbo].[MailRequests](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Subject] [varchar](100) NOT NULL,
[Message] [varchar](max) NULL,
[RecipientTo] [varchar](1000) NOT NULL,
[RecipientBCC] [varchar](1000) NULL,
[RecipientCC] [varchar](1000) NULL,
[Sent] [bit] NOT NULL CONSTRAINT [DF_MailRequests_Sent] DEFAULT ((0)),
[CreatedTime] [datetime] NOT NULL CONSTRAINT [DF_MailRequests_CreatedTime] DEFAULT (getdate()),
[SentTime] [datetime] NULL,
[LastStatus] [varchar](500) NULL CONSTRAINT [DF_MailRequests_LastStatus] DEFAULT ('Request Send')
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO