-
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.
Merge pull request #7 from Elyas-Amini/develop
Update answer and question based on content
- Loading branch information
Showing
13 changed files
with
437 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<Platforms>AnyCPU;x64;x86</Platforms> | ||
<Authors>EasyMicroservices</Authors> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Version>0.0.0.3</Version> | ||
<Version>0.0.0.4</Version> | ||
<Description>client generated code.</Description> | ||
<Copyright>[email protected]</Copyright> | ||
<PackageTags>microservice,Question,Questions,client</PackageTags> | ||
|
135 changes: 135 additions & 0 deletions
135
...ces.QuestionsMicroservice.Database/Migrations/20230912081053_Update_Questions.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
123 changes: 123 additions & 0 deletions
123
...icroservices.QuestionsMicroservice.Database/Migrations/20230912081053_Update_Questions.cs
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,123 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace EasyMicroservices.QuestionsMicroservice.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class Update_Questions : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Questions", | ||
columns: table => new | ||
{ | ||
Id = table.Column<long>(type: "bigint", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
UniqueIdentity = table.Column<string>(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), | ||
CreationDateTime = table.Column<DateTime>(type: "datetime2", nullable: false), | ||
ModificationDateTime = table.Column<DateTime>(type: "datetime2", nullable: true), | ||
DeletedDateTime = table.Column<DateTime>(type: "datetime2", nullable: true), | ||
IsDeleted = table.Column<bool>(type: "bit", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Questions", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Answers", | ||
columns: table => new | ||
{ | ||
Id = table.Column<long>(type: "bigint", nullable: false) | ||
.Annotation("SqlServer:Identity", "1, 1"), | ||
QuestionId = table.Column<long>(type: "bigint", nullable: false), | ||
Content = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
UniqueIdentity = table.Column<string>(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), | ||
IsDeleted = table.Column<bool>(type: "bit", nullable: false), | ||
DeletedDateTime = table.Column<DateTime>(type: "datetime2", nullable: true), | ||
CreationDateTime = table.Column<DateTime>(type: "datetime2", nullable: false), | ||
ModificationDateTime = table.Column<DateTime>(type: "datetime2", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Answers", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_Answers_Questions_QuestionId", | ||
column: x => x.QuestionId, | ||
principalTable: "Questions", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Answers_CreationDateTime", | ||
table: "Answers", | ||
column: "CreationDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Answers_DeletedDateTime", | ||
table: "Answers", | ||
column: "DeletedDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Answers_IsDeleted", | ||
table: "Answers", | ||
column: "IsDeleted"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Answers_ModificationDateTime", | ||
table: "Answers", | ||
column: "ModificationDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Answers_QuestionId", | ||
table: "Answers", | ||
column: "QuestionId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Answers_UniqueIdentity", | ||
table: "Answers", | ||
column: "UniqueIdentity"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Questions_CreationDateTime", | ||
table: "Questions", | ||
column: "CreationDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Questions_DeletedDateTime", | ||
table: "Questions", | ||
column: "DeletedDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Questions_IsDeleted", | ||
table: "Questions", | ||
column: "IsDeleted"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Questions_ModificationDateTime", | ||
table: "Questions", | ||
column: "ModificationDateTime"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Questions_UniqueIdentity", | ||
table: "Questions", | ||
column: "UniqueIdentity"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Answers"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Questions"); | ||
} | ||
} | ||
} |
Oops, something went wrong.