-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
msaad
committed
Sep 20, 2024
1 parent
bbfc455
commit ded21d7
Showing
7 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
src/TimeLogService/TimeLogService.DataBase/dbo/Tables/Organization.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
src/TimeLogService/TimeLogService.DataBase/dbo/Tables/User.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
CREATE TABLE [dbo].[User] | ||
( | ||
[Id] INT IDENTITY (1, 1) PRIMARY KEY NOT NULL, | ||
[UserId] NVARCHAR(100) NOT NULL UNIQUE, | ||
[EmailAddress] VARCHAR(50) NOT NULL, | ||
[PublicAlias] NVARCHAR(100) NOT NULL, | ||
[CoreRevision] INT NOT NULL, | ||
[TimeStamp] DATETIME NOT NULL, | ||
[Revision] INT NOT NULL | ||
[EmailAddress] VARCHAR(50) NOT NULL UNIQUE, | ||
) |
12 changes: 12 additions & 0 deletions
12
src/TimeLogService/TimeLogService.DataBase/dbo/Tables/UserPath.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE [dbo].[UserPath] | ||
( | ||
[Id] INT NOT NULL PRIMARY KEY, | ||
[UserId] INT NOT NULL, | ||
[PathType] NVARCHAR(150) NOT NULL, | ||
|
||
CONSTRAINT FK_UserPath_Uesr | ||
FOREIGN KEY (UserId) | ||
REFERENCES [dbo].[User] (Id) | ||
ON DELETE CASCADE | ||
ON UPDATE CASCADE | ||
) |
8 changes: 8 additions & 0 deletions
8
src/TimeLogService/TimeLogService.DataBase/dbo/Tables/UserPathOrganizations.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE TABLE [dbo].[UserPathOrganizations] ( | ||
[PathId] INT NOT NULL, | ||
[OrganizationId] INT NOT NULL, | ||
[CreationDate] DATETIME | ||
PRIMARY KEY ([PathId], [OrganizationId]) NOT NULL, | ||
FOREIGN KEY ([PathId]) REFERENCES [dbo].[UserPath]([Id]), | ||
FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization]([Id]) | ||
); |