From 36ec95f1995326d3c5a25d6a22bf0dbb31106ea4 Mon Sep 17 00:00:00 2001 From: Jolys Enzo Date: Wed, 22 Mar 2023 18:37:38 +0100 Subject: [PATCH] avec migration --- Sources/Entity_Framework/BDD.db-shm | Bin 32768 -> 0 bytes Sources/Entity_Framework/BDD.db-wal | 0 .../20230322173202_test2.Designer.cs | 379 ------------------ .../Migrations/20230322173202_test2.cs | 22 - ...ner.cs => 20230322173709_test.Designer.cs} | 2 +- ...2172943_test.cs => 20230322173709_test.cs} | 0 6 files changed, 1 insertion(+), 402 deletions(-) delete mode 100644 Sources/Entity_Framework/BDD.db-shm delete mode 100644 Sources/Entity_Framework/BDD.db-wal delete mode 100644 Sources/Entity_Framework/Migrations/20230322173202_test2.Designer.cs delete mode 100644 Sources/Entity_Framework/Migrations/20230322173202_test2.cs rename Sources/Entity_Framework/Migrations/{20230322172943_test.Designer.cs => 20230322173709_test.Designer.cs} (99%) rename Sources/Entity_Framework/Migrations/{20230322172943_test.cs => 20230322173709_test.cs} (100%) diff --git a/Sources/Entity_Framework/BDD.db-shm b/Sources/Entity_Framework/BDD.db-shm deleted file mode 100644 index fe9ac2845eca6fe6da8a63cd096d9cf9e24ece10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeIuAr62r3 -using System; -using Entity_Framework; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Entity_Framework.Migrations -{ - [DbContext(typeof(BDDContext))] - [Migration("20230322173202_test2")] - partial class test2 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "7.0.3"); - - modelBuilder.Entity("Entity_Framework.Entity.Circuits", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Circuits"); - - b.HasData( - new - { - Id = 1, - Name = "test_CIRCUIT" - }); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("IdPiloteProprietaire") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IdPiloteProprietaire") - .IsUnique(); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Ecuries"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Images", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Base64") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("IdPilote") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("IdPilote") - .IsUnique(); - - b.ToTable("Images"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Email") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Password") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Pseudo") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .IsUnique(); - - b.HasIndex("Pseudo") - .IsUnique(); - - b.ToTable("Pilotes"); - - b.HasData( - new - { - Id = 1, - Email = "test@gmail.com", - Password = "7NcYcNGWMxapfjrDQIyYNa2M8PPBvHA1J8MCZVNPda4=", - Pseudo = "test_PILOTE" - }); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Points", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("A_Steer") - .HasColumnType("REAL"); - - b.Property("Distance") - .HasColumnType("REAL"); - - b.Property("G_Lat") - .HasColumnType("REAL"); - - b.Property("G_Lon") - .HasColumnType("REAL"); - - b.Property("IdTours") - .HasColumnType("INTEGER"); - - b.Property("Latitude") - .HasColumnType("REAL"); - - b.Property("Longitude") - .HasColumnType("REAL"); - - b.Property("NGearASCII") - .HasColumnType("REAL"); - - b.Property("P_BreakF") - .HasColumnType("REAL"); - - b.Property("R_Pedal") - .HasColumnType("REAL"); - - b.Property("Timer") - .HasColumnType("REAL"); - - b.Property("V_Car") - .HasColumnType("REAL"); - - b.HasKey("Id"); - - b.HasIndex("IdTours"); - - b.ToTable("Points"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Relations.Relation_Pilote_Ecurie", b => - { - b.Property("IdPilote") - .HasColumnType("INTEGER"); - - b.Property("IdEcurie") - .HasColumnType("INTEGER"); - - b.Property("EcurieId") - .HasColumnType("INTEGER"); - - b.Property("Grade") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("PiloteId") - .HasColumnType("INTEGER"); - - b.HasKey("IdPilote", "IdEcurie"); - - b.HasIndex("EcurieId"); - - b.HasIndex("PiloteId"); - - b.ToTable("RelationEcuriePilote"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Sessions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Date") - .HasColumnType("TEXT"); - - b.Property("IdCircuit") - .HasColumnType("INTEGER"); - - b.Property("IdPilote") - .HasColumnType("INTEGER"); - - b.Property("Name") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IdCircuit"); - - b.HasIndex("IdPilote"); - - b.ToTable("Sessions"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Tours", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("IdSession") - .HasColumnType("INTEGER"); - - b.Property("Numero") - .HasColumnType("INTEGER"); - - b.Property("Temps") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("IdSession"); - - b.ToTable("Tours"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b => - { - b.HasOne("Entity_Framework.Entity.Pilotes", "PiloteProprietaire") - .WithOne("EcuriePropriétaire") - .HasForeignKey("Entity_Framework.Entity.Ecuries", "IdPiloteProprietaire") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PiloteProprietaire"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Images", b => - { - b.HasOne("Entity_Framework.Entity.Pilotes", "Pilote") - .WithOne("Image") - .HasForeignKey("Entity_Framework.Entity.Images", "IdPilote") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Pilote"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Points", b => - { - b.HasOne("Entity_Framework.Entity.Tours", "Tours") - .WithMany("Points") - .HasForeignKey("IdTours") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Relations.Relation_Pilote_Ecurie", b => - { - b.HasOne("Entity_Framework.Entity.Ecuries", "Ecurie") - .WithMany("PilotesRelation") - .HasForeignKey("EcurieId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Entity_Framework.Entity.Pilotes", "Pilote") - .WithMany("Ecurie") - .HasForeignKey("PiloteId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Ecurie"); - - b.Navigation("Pilote"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Sessions", b => - { - b.HasOne("Entity_Framework.Entity.Circuits", "Circuit") - .WithMany("Course") - .HasForeignKey("IdCircuit") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Entity_Framework.Entity.Pilotes", "Pilote") - .WithMany("Sessions") - .HasForeignKey("IdPilote") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Circuit"); - - b.Navigation("Pilote"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Tours", b => - { - b.HasOne("Entity_Framework.Entity.Sessions", "Session") - .WithMany("Tours") - .HasForeignKey("IdSession") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Session"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Circuits", b => - { - b.Navigation("Course"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b => - { - b.Navigation("PilotesRelation"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b => - { - b.Navigation("Ecurie"); - - b.Navigation("EcuriePropriétaire") - .IsRequired(); - - b.Navigation("Image") - .IsRequired(); - - b.Navigation("Sessions"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Sessions", b => - { - b.Navigation("Tours"); - }); - - modelBuilder.Entity("Entity_Framework.Entity.Tours", b => - { - b.Navigation("Points"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Sources/Entity_Framework/Migrations/20230322173202_test2.cs b/Sources/Entity_Framework/Migrations/20230322173202_test2.cs deleted file mode 100644 index 9227a93..0000000 --- a/Sources/Entity_Framework/Migrations/20230322173202_test2.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Entity_Framework.Migrations -{ - /// - public partial class test2 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/Sources/Entity_Framework/Migrations/20230322172943_test.Designer.cs b/Sources/Entity_Framework/Migrations/20230322173709_test.Designer.cs similarity index 99% rename from Sources/Entity_Framework/Migrations/20230322172943_test.Designer.cs rename to Sources/Entity_Framework/Migrations/20230322173709_test.Designer.cs index f0da2c9..3cd1c85 100644 --- a/Sources/Entity_Framework/Migrations/20230322172943_test.Designer.cs +++ b/Sources/Entity_Framework/Migrations/20230322173709_test.Designer.cs @@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Entity_Framework.Migrations { [DbContext(typeof(BDDContext))] - [Migration("20230322172943_test")] + [Migration("20230322173709_test")] partial class test { /// diff --git a/Sources/Entity_Framework/Migrations/20230322172943_test.cs b/Sources/Entity_Framework/Migrations/20230322173709_test.cs similarity index 100% rename from Sources/Entity_Framework/Migrations/20230322172943_test.cs rename to Sources/Entity_Framework/Migrations/20230322173709_test.cs