diff options
| author | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2023-02-10 16:19:46 +0100 |
|---|---|---|
| committer | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2023-02-10 16:19:46 +0100 |
| commit | 00c3b32e2db200a2f42396ac7f8381704ec97268 (patch) | |
| tree | 089d68dcbda127d4c95ccca9b0c9a18b59dc8bdc /CoreWiki/Migrations | |
Initial Commit
Diffstat (limited to 'CoreWiki/Migrations')
| -rw-r--r-- | CoreWiki/Migrations/20230209093124_initial.Designer.cs | 42 | ||||
| -rw-r--r-- | CoreWiki/Migrations/20230209093124_initial.cs | 35 | ||||
| -rw-r--r-- | CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs | 39 |
3 files changed, 116 insertions, 0 deletions
diff --git a/CoreWiki/Migrations/20230209093124_initial.Designer.cs b/CoreWiki/Migrations/20230209093124_initial.Designer.cs new file mode 100644 index 0000000..11af7b7 --- /dev/null +++ b/CoreWiki/Migrations/20230209093124_initial.Designer.cs @@ -0,0 +1,42 @@ +// <auto-generated /> +using System; +using CoreWiki.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace CoreWiki.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20230209093124_initial")] + partial class initial + { + /// <inheritdoc /> + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); + + modelBuilder.Entity("CoreWiki.Models.Article", b => + { + b.Property<string>("Topic") + .HasColumnType("TEXT"); + + b.Property<string>("Content") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property<DateTime>("Published") + .HasColumnType("TEXT"); + + b.HasKey("Topic"); + + b.ToTable("Articles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/CoreWiki/Migrations/20230209093124_initial.cs b/CoreWiki/Migrations/20230209093124_initial.cs new file mode 100644 index 0000000..84a7453 --- /dev/null +++ b/CoreWiki/Migrations/20230209093124_initial.cs @@ -0,0 +1,35 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace CoreWiki.Migrations +{ + /// <inheritdoc /> + public partial class initial : Migration + { + /// <inheritdoc /> + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Articles", + columns: table => new + { + Topic = table.Column<string>(type: "TEXT", nullable: false), + Published = table.Column<DateTime>(type: "TEXT", nullable: false), + Content = table.Column<string>(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Articles", x => x.Topic); + }); + } + + /// <inheritdoc /> + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Articles"); + } + } +} diff --git a/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs b/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs new file mode 100644 index 0000000..fb063f5 --- /dev/null +++ b/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs @@ -0,0 +1,39 @@ +// <auto-generated /> +using System; +using CoreWiki.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace CoreWiki.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + partial class ApplicationDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); + + modelBuilder.Entity("CoreWiki.Models.Article", b => + { + b.Property<string>("Topic") + .HasColumnType("TEXT"); + + b.Property<string>("Content") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property<DateTime>("Published") + .HasColumnType("TEXT"); + + b.HasKey("Topic"); + + b.ToTable("Articles"); + }); +#pragma warning restore 612, 618 + } + } +} |
