-
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.
- Loading branch information
1 parent
6d2fa5a
commit 5080303
Showing
5 changed files
with
289 additions
and
1 deletion.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
RecipeManagement/src/RecipeManagement/Migrations/20231216232837_FirstMigraTION.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
RecipeManagement/src/RecipeManagement/Migrations/20231216232837_FirstMigraTION.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,46 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace RecipeManagement.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class FirstMigraTION : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Recipes", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), | ||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
Directions = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
RecipeSourceLink = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
ImageLink = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
Rating = table.Column<int>(type: "int", nullable: true), | ||
Visibility = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
DateOfOrigin = table.Column<DateTime>(type: "date", nullable: true), | ||
CreatedOn = table.Column<DateTime>(type: "datetime2", nullable: false), | ||
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
LastModifiedOn = table.Column<DateTime>(type: "datetime2", nullable: true), | ||
LastModifiedBy = table.Column<string>(type: "nvarchar(max)", nullable: true), | ||
IsDeleted = table.Column<bool>(type: "bit", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Recipes", x => x.Id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Recipes"); | ||
} | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
RecipeManagement/src/RecipeManagement/Migrations/RecipesDbContextModelSnapshot.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,77 @@ | ||
// <auto-generated /> | ||
using System; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
using RecipeManagement.Databases; | ||
|
||
#nullable disable | ||
|
||
namespace RecipeManagement.Migrations | ||
{ | ||
[DbContext(typeof(RecipesDbContext))] | ||
partial class RecipesDbContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "7.0.11") | ||
.HasAnnotation("Relational:MaxIdentifierLength", 128); | ||
|
||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); | ||
|
||
modelBuilder.Entity("RecipeManagement.Domain.Recipes.Recipe", b => | ||
{ | ||
b.Property<Guid>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("uniqueidentifier"); | ||
b.Property<string>("CreatedBy") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<DateTime>("CreatedOn") | ||
.HasColumnType("datetime2"); | ||
b.Property<DateTime?>("DateOfOrigin") | ||
.HasColumnType("date"); | ||
b.Property<string>("Description") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<string>("Directions") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<string>("ImageLink") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<bool>("IsDeleted") | ||
.HasColumnType("bit"); | ||
b.Property<string>("LastModifiedBy") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<DateTime?>("LastModifiedOn") | ||
.HasColumnType("datetime2"); | ||
b.Property<int?>("Rating") | ||
.HasColumnType("int"); | ||
b.Property<string>("RecipeSourceLink") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<string>("Title") | ||
.HasColumnType("nvarchar(max)"); | ||
b.Property<string>("Visibility") | ||
.HasColumnType("nvarchar(max)"); | ||
b.HasKey("Id"); | ||
b.ToTable("Recipes"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
RecipeManagement/src/RecipeManagement/RecipeManagement.WebApi.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
RecipeManagement/src/RecipeManagement/appsettings.Development.json
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