From 6bd480c898d5c0b43fd3e9249eb4c713d1af3ce7 Mon Sep 17 00:00:00 2001 From: cllesme1 Date: Fri, 26 Jan 2024 22:57:37 +0100 Subject: [PATCH] migration --- App/Test.Librairy.db | Bin 20480 -> 0 bytes ...26215342_deuxiemeTestMigration.Designer.cs | 47 ++++++++++++++++++ .../20240126215342_deuxiemeTestMigration.cs | 36 ++++++++++++++ ...6215524_seuxiemeTestMigrationn.Designer.cs | 47 ++++++++++++++++++ .../20240126215524_seuxiemeTestMigrationn.cs | 22 ++++++++ .../Migrations/LibraryContextModelSnapshot.cs | 44 ++++++++++++++++ 6 files changed, 196 insertions(+) delete mode 100644 App/Test.Librairy.db create mode 100644 ContextLib/Migrations/20240126215342_deuxiemeTestMigration.Designer.cs create mode 100644 ContextLib/Migrations/20240126215342_deuxiemeTestMigration.cs create mode 100644 ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.Designer.cs create mode 100644 ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.cs create mode 100644 ContextLib/Migrations/LibraryContextModelSnapshot.cs diff --git a/App/Test.Librairy.db b/App/Test.Librairy.db deleted file mode 100644 index 6f7d24949e793a4828d65d5fb7e5056e6ca45aa6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 zcmeI&F>ljA6bJCLleRRH37e;ilf}@gRTKwGI@YZYu$nl*xuQl0S#EO$i_})_iv(lg zo3Qg`7@3%v85p@laobo9d#nGGPxjr}FMdCJv7N!|P9z0APtuD}(x>DR(RH#K4Z?L!S7|Jqdy!&EqFXL` zwf!_1P0r*Sk!I>-3u#qpuD)u%YilHmN8;1`@`e+c%=$s;?*w+~a7Eo{52iPpp_*3z zNz{UX00bZa0SG_<0uX=z1Rwwb2teS@2|Up%%xpDV&zg3tWk0uVdpD3Glh-dU_8QHG zT~l>w^ +using ContextLib; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ContextLib.Migrations +{ + [DbContext(typeof(LibraryContext))] + [Migration("20240126215342_deuxiemeTestMigration")] + partial class deuxiemeTestMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("Entities.BookEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("id"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ContextLib/Migrations/20240126215342_deuxiemeTestMigration.cs b/ContextLib/Migrations/20240126215342_deuxiemeTestMigration.cs new file mode 100644 index 0000000..98b40da --- /dev/null +++ b/ContextLib/Migrations/20240126215342_deuxiemeTestMigration.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ContextLib.Migrations +{ + /// + public partial class deuxiemeTestMigration : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "BooksSet", + columns: table => new + { + id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Title = table.Column(type: "TEXT", nullable: false), + Author = table.Column(type: "TEXT", nullable: false), + Isbn = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BooksSet", x => x.id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "BooksSet"); + } + } +} diff --git a/ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.Designer.cs b/ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.Designer.cs new file mode 100644 index 0000000..e6269f8 --- /dev/null +++ b/ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.Designer.cs @@ -0,0 +1,47 @@ +// +using ContextLib; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ContextLib.Migrations +{ + [DbContext(typeof(LibraryContext))] + [Migration("20240126215524_seuxiemeTestMigrationn")] + partial class seuxiemeTestMigrationn + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("Entities.BookEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("id"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.cs b/ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.cs new file mode 100644 index 0000000..60a27d0 --- /dev/null +++ b/ContextLib/Migrations/20240126215524_seuxiemeTestMigrationn.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ContextLib.Migrations +{ + /// + public partial class seuxiemeTestMigrationn : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/ContextLib/Migrations/LibraryContextModelSnapshot.cs b/ContextLib/Migrations/LibraryContextModelSnapshot.cs new file mode 100644 index 0000000..3fb3450 --- /dev/null +++ b/ContextLib/Migrations/LibraryContextModelSnapshot.cs @@ -0,0 +1,44 @@ +// +using ContextLib; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ContextLib.Migrations +{ + [DbContext(typeof(LibraryContext))] + partial class LibraryContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); + + modelBuilder.Entity("Entities.BookEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Author") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Isbn") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("id"); + + b.ToTable("BooksSet"); + }); +#pragma warning restore 612, 618 + } + } +}