diff --git a/HardwareShop/HardwareShopDatabaseImplement/HardwareShopDatabase.cs b/HardwareShop/HardwareShopDatabaseImplement/HardwareShopDatabase.cs
index 5bb2507..36bfb0d 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/HardwareShopDatabase.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/HardwareShopDatabase.cs
@@ -10,7 +10,7 @@ namespace HardwareShopDatabaseImplement
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
- optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=Computer_Hardware_Store3;Username=postgres;Password=1234");
+ optionsBuilder.UseNpgsql("Host=localhost;Port=5433;Database=Computer_Hardware_Store;Username=user;Password=12345");
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}
diff --git a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408110229_Init.Designer.cs b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408132346_mama-say-mama-sa-mama-coo-sa.Designer.cs
similarity index 98%
rename from HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408110229_Init.Designer.cs
rename to HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408132346_mama-say-mama-sa-mama-coo-sa.Designer.cs
index e825072..652cf01 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408110229_Init.Designer.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408132346_mama-say-mama-sa-mama-coo-sa.Designer.cs
@@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace HardwareShopDatabaseImplement.Migrations
{
[DbContext(typeof(HardwareShopDatabase))]
- [Migration("20230408110229_Init")]
- partial class Init
+ [Migration("20230408132346_mama-say-mama-sa-mama-coo-sa")]
+ partial class mamasaymamasamamacoosa
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -414,13 +414,11 @@ namespace HardwareShopDatabaseImplement.Migrations
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Build", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Builds")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Comment", b =>
@@ -431,26 +429,22 @@ namespace HardwareShopDatabaseImplement.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Comments")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Build");
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Purchase", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Purchases")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Component", b =>
diff --git a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408110229_Init.cs b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408132346_mama-say-mama-sa-mama-coo-sa.cs
similarity index 99%
rename from HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408110229_Init.cs
rename to HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408132346_mama-say-mama-sa-mama-coo-sa.cs
index 03137de..3678ddd 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408110229_Init.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230408132346_mama-say-mama-sa-mama-coo-sa.cs
@@ -1,4 +1,5 @@
-using Microsoft.EntityFrameworkCore.Migrations;
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
@@ -6,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace HardwareShopDatabaseImplement.Migrations
{
///
- public partial class Init : Migration
+ public partial class mamasaymamasamamacoosa : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs b/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs
index 6e882bc..1043277 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs
@@ -411,13 +411,11 @@ namespace HardwareShopDatabaseImplement.Migrations
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Build", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Builds")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Comment", b =>
@@ -428,26 +426,22 @@ namespace HardwareShopDatabaseImplement.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Comments")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Build");
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Purchase", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Purchases")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Component", b =>