-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDBSchema.sql
More file actions
55 lines (44 loc) · 1.48 KB
/
DBSchema.sql
File metadata and controls
55 lines (44 loc) · 1.48 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
/****** Object: Table [dbo].[UserCredentials] Script Date: 24-01-2025 03:55:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UserCredentials](
[Id] [uniqueidentifier] NOT NULL,
[DateCreated] [datetimeoffset](7) NOT NULL,
[DateUpdated] [datetimeoffset](7) NULL,
[DateDeleted] [datetimeoffset](7) NULL,
[IsDeleted] [bit] NOT NULL,
[Salt] [nvarchar](50) NULL,
[Password] [nvarchar](200) NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Users] Script Date: 24-01-2025 03:55:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Users](
[Id] [uniqueidentifier] NOT NULL,
[DateCreated] [datetimeoffset](7) NOT NULL,
[DateUpdated] [datetimeoffset](7) NULL,
[DateDeleted] [datetimeoffset](7) NULL,
[IsDeleted] [bit] NOT NULL,
[Email] [nvarchar](50) NOT NULL,
[Name] [nvarchar](50) NOT NULL,
[PhoneNumber] [nvarchar](20) NULL,
[LinkedInUrl] [nvarchar](200) NULL,
[Role] [tinyint] NOT NULL,
[Status] [tinyint] NULL,
[AliasName] [nvarchar](50) NULL,
CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[UserCredentials] WITH CHECK ADD CONSTRAINT [FK_UserCredentials_Users] FOREIGN KEY([Id])
REFERENCES [dbo].[Users] ([Id])
GO
ALTER TABLE [dbo].[UserCredentials] CHECK CONSTRAINT [FK_UserCredentials_Users]
GO