· 8 years ago · Jul 07, 2018, 11:04 AM
1USE [Billy]
2GO
3
4--<pg/check_online>
5
6IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Cheques')
7 CREATE TABLE [dbo].[Cheques](
8 [Id] [uniqueidentifier] NOT NULL,
9 [TransactionId] [uniqueidentifier] NOT NULL,
10 [RequestId] [nvarchar](256) NOT NULL,
11 [ClientId] [nvarchar](max) NULL,
12 [Path] [nvarchar](max) NULL,
13 [FiscalDocNumber] [int] NOT NULL,
14 [DocNumber] [nvarchar](max) NULL,
15 [Date] [datetime2] NOT NULL,
16 [TotalAmount] [decimal](18,2) NOT NULL,
17 [FiscalSign] [int] NOT NULL,
18 [DocumentType] [int] NOT NULL,
19 [QR] [nvarchar](max) NULL,
20 [FNSerialNumber] [nvarchar](max) NULL,
21 [DeviceSerialNumber] [nvarchar](max) NULL,
22 [DeviceRegistrationNumber] [nvarchar](max) NULL,
23 [ErrorMessages] [nvarchar](max) NOT NULL,
24 [ErrorCode] [int] NULL,
25 [Timestamp] [bigint] NOT NULL,
26 CONSTRAINT [PK_Cheques] PRIMARY KEY CLUSTERED ([Id] ASC)
27)
28
29--</pg/check_online>