Advertisement
otkalce

Task06 - Notification table

Apr 3rd, 2023
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | Source Code | 0 0
  1. CREATE TABLE [Notification](
  2. [Id] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL,
  3. [Guid] [uniqueidentifier] NOT NULL,
  4. [CreatedAt] [datetime2](7) NOT NULL,
  5. [UpdatedAt] [datetime2](7) NULL,
  6. [Receiver] [nvarchar](256) NOT NULL,
  7. [Subject] [nvarchar](256) NULL,
  8. [Body] [nvarchar](max) NOT NULL,
  9. [SentAt] [datetime2](7) NULL
  10. )
  11.  
  12. ALTER TABLE [Notification]
  13. ADD CONSTRAINT [DF_Notification_Guid]
  14. DEFAULT (newid()) FOR [Guid]
  15. GO
  16.  
  17. ALTER TABLE [Notification]
  18. ADD CONSTRAINT [DF_Notification_CreatedAt]
  19. DEFAULT (getutcdate()) FOR [CreatedAt]
  20. GO
  21.  
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement