-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downgrade .Net 9 to .Net 8 due to dependency Pomelo.EntityFrameworkCo…
…re.MySql isnt updated to .Net 9 RC (or greater)
- Loading branch information
1 parent
2d30d37
commit 36b0a68
Showing
10 changed files
with
109 additions
and
27 deletions.
There are no files selected for viewing
Binary file not shown.
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
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,42 @@ | ||
CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` ( | ||
`MigrationId` varchar(150) CHARACTER SET utf8mb4 NOT NULL, | ||
`ProductVersion` varchar(32) CHARACTER SET utf8mb4 NOT NULL, | ||
CONSTRAINT `PK___EFMigrationsHistory` PRIMARY KEY (`MigrationId`) | ||
) CHARACTER SET=utf8mb4; | ||
|
||
START TRANSACTION; | ||
|
||
ALTER DATABASE CHARACTER SET utf8mb4; | ||
|
||
CREATE TABLE `Users` ( | ||
`Id` int NOT NULL AUTO_INCREMENT, | ||
`Username` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`Password` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`FirstName` longtext CHARACTER SET utf8mb4 NULL, | ||
`LastName` longtext CHARACTER SET utf8mb4 NULL, | ||
`Role` int NULL, | ||
CONSTRAINT `PK_Users` PRIMARY KEY (`Id`) | ||
) CHARACTER SET=utf8mb4; | ||
|
||
CREATE TABLE `RefreshToken` ( | ||
`Id` int NOT NULL AUTO_INCREMENT, | ||
`Token` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`Expires` datetime NOT NULL, | ||
`Created` datetime NOT NULL, | ||
`CreatedByIp` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`Revoked` datetime NULL, | ||
`RevokedByIp` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`ReplacedByToken` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`ReasonRevoked` longtext CHARACTER SET utf8mb4 NOT NULL, | ||
`UserId` int NOT NULL, | ||
CONSTRAINT `PK_RefreshToken` PRIMARY KEY (`Id`), | ||
CONSTRAINT `FK_RefreshToken_Users_UserId` FOREIGN KEY (`UserId`) REFERENCES `Users` (`Id`) ON DELETE CASCADE | ||
) CHARACTER SET=utf8mb4; | ||
|
||
CREATE INDEX `IX_RefreshToken_UserId` ON `RefreshToken` (`UserId`); | ||
|
||
INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) | ||
VALUES ('20241004114847_InitialCreateMySQL', '8.0.8'); | ||
|
||
COMMIT; | ||
|
40 changes: 40 additions & 0 deletions
40
server/api/LCPMobileAppApi/Scripts/sql/migscrPostgresSQL.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,40 @@ | ||
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ( | ||
"MigrationId" character varying(150) NOT NULL, | ||
"ProductVersion" character varying(32) NOT NULL, | ||
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId") | ||
); | ||
|
||
START TRANSACTION; | ||
|
||
CREATE TABLE "Users" ( | ||
"Id" integer GENERATED BY DEFAULT AS IDENTITY, | ||
"Username" text NOT NULL, | ||
"Password" text NOT NULL, | ||
"FirstName" text, | ||
"LastName" text, | ||
"Role" integer, | ||
CONSTRAINT "PK_Users" PRIMARY KEY ("Id") | ||
); | ||
|
||
CREATE TABLE "RefreshToken" ( | ||
"Id" integer GENERATED BY DEFAULT AS IDENTITY, | ||
"Token" text NOT NULL, | ||
"Expires" timestamp with time zone NOT NULL, | ||
"Created" timestamp with time zone NOT NULL, | ||
"CreatedByIp" text NOT NULL, | ||
"Revoked" timestamp with time zone, | ||
"RevokedByIp" text NOT NULL, | ||
"ReplacedByToken" text NOT NULL, | ||
"ReasonRevoked" text NOT NULL, | ||
"UserId" integer NOT NULL, | ||
CONSTRAINT "PK_RefreshToken" PRIMARY KEY ("Id"), | ||
CONSTRAINT "FK_RefreshToken_Users_UserId" FOREIGN KEY ("UserId") REFERENCES "Users" ("Id") ON DELETE CASCADE | ||
); | ||
|
||
CREATE INDEX "IX_RefreshToken_UserId" ON "RefreshToken" ("UserId"); | ||
|
||
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") | ||
VALUES ('20241004114813_InitialCreatePostgresSQL', '8.0.8'); | ||
|
||
COMMIT; | ||
|
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
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
36b0a68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See and read more at:
EF Core 9 support #1841