güncelleme
This commit is contained in:
210
Migrations/20250811081119_mig10.Designer.cs
generated
Normal file
210
Migrations/20250811081119_mig10.Designer.cs
generated
Normal file
@@ -0,0 +1,210 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DugunSalonu.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DugunSalonu.Migrations
|
||||
{
|
||||
[DbContext(typeof(dugunsalonuContext))]
|
||||
[Migration("20250811081119_mig10")]
|
||||
partial class mig10
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Il", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("il");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Ilce", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<int>("ILid")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("ilid");
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("ilce");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<bool>("admin")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("aktif")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ceptel")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("character varying(10)");
|
||||
|
||||
b.Property<string>("eposta")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<string>("kullaniciadi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<string>("parola")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("soyadi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("kullanici");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Referans", b =>
|
||||
{
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<bool>("aktif")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("id")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("kk")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("kodu")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("character varying(20)");
|
||||
|
||||
b.Property<DateTime>("kts")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("turu")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasIndex("turu", "kodu")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("referans");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("CepTel")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("character varying(10)");
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("character varying(150)");
|
||||
|
||||
b.Property<string>("adres")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("character varying(250)");
|
||||
|
||||
b.Property<string>("eposta")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ilceid")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("ilid")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("telefon")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("vergidairesi")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("verginumarasi")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("webadres")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ilid");
|
||||
|
||||
b.ToTable("salon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||
{
|
||||
b.HasOne("DugunSalonu.Models.Il", "il")
|
||||
.WithMany()
|
||||
.HasForeignKey("ilid");
|
||||
|
||||
b.Navigation("il");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
65
Migrations/20250811081119_mig10.cs
Normal file
65
Migrations/20250811081119_mig10.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DugunSalonu.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class mig10 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_referans",
|
||||
table: "referans");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "kts",
|
||||
table: "referans",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldDefaultValueSql: "NOW()");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "id",
|
||||
table: "referans",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer")
|
||||
.OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "kts",
|
||||
table: "referans",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
defaultValueSql: "NOW()",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "id",
|
||||
table: "referans",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_referans",
|
||||
table: "referans",
|
||||
column: "id");
|
||||
}
|
||||
}
|
||||
}
|
230
Migrations/20250811082022_mig11.Designer.cs
generated
Normal file
230
Migrations/20250811082022_mig11.Designer.cs
generated
Normal file
@@ -0,0 +1,230 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DugunSalonu.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DugunSalonu.Migrations
|
||||
{
|
||||
[DbContext(typeof(dugunsalonuContext))]
|
||||
[Migration("20250811082022_mig11")]
|
||||
partial class mig11
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Il", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("il");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Ilce", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<int>("ILid")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("ilid");
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ILid");
|
||||
|
||||
b.ToTable("ilce");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<bool>("admin")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("aktif")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("ceptel")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("character varying(10)");
|
||||
|
||||
b.Property<string>("eposta")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<string>("kullaniciadi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<string>("parola")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("soyadi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("kullanici");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Referans", b =>
|
||||
{
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<bool>("aktif")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("id")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("kk")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("kodu")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("character varying(20)");
|
||||
|
||||
b.Property<DateTime>("kts")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("turu")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasIndex("turu", "kodu")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("referans");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("CepTel")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("character varying(10)");
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("character varying(150)");
|
||||
|
||||
b.Property<string>("adres")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("character varying(250)");
|
||||
|
||||
b.Property<string>("eposta")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("ilceid")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("ilid")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("telefon")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("vergidairesi")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("verginumarasi")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("webadres")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ilid");
|
||||
|
||||
b.ToTable("salon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Ilce", b =>
|
||||
{
|
||||
b.HasOne("DugunSalonu.Models.Il", "Il")
|
||||
.WithMany("ilceler")
|
||||
.HasForeignKey("ILid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Il");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||
{
|
||||
b.HasOne("DugunSalonu.Models.Il", "il")
|
||||
.WithMany("salons")
|
||||
.HasForeignKey("ilid");
|
||||
|
||||
b.Navigation("il");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Il", b =>
|
||||
{
|
||||
b.Navigation("ilceler");
|
||||
|
||||
b.Navigation("salons");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
39
Migrations/20250811082022_mig11.cs
Normal file
39
Migrations/20250811082022_mig11.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DugunSalonu.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class mig11 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ilce_ilid",
|
||||
table: "ilce",
|
||||
column: "ilid");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ilce_il_ilid",
|
||||
table: "ilce",
|
||||
column: "ilid",
|
||||
principalTable: "il",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ilce_il_ilid",
|
||||
table: "ilce");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ilce_ilid",
|
||||
table: "ilce");
|
||||
}
|
||||
}
|
||||
}
|
@@ -47,16 +47,19 @@ namespace DugunSalonu.Migrations
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<int>("ILid")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("ilid");
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.Property<int>("ilid")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ILid");
|
||||
|
||||
b.ToTable("ilce");
|
||||
});
|
||||
|
||||
@@ -108,12 +111,6 @@ namespace DugunSalonu.Migrations
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Referans", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||
|
||||
b.Property<string>("adi")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
@@ -122,6 +119,9 @@ namespace DugunSalonu.Migrations
|
||||
b.Property<bool>("aktif")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("id")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("kk")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -131,17 +131,13 @@ namespace DugunSalonu.Migrations
|
||||
.HasColumnType("character varying(20)");
|
||||
|
||||
b.Property<DateTime>("kts")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("NOW()");
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("turu")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("turu", "kodu")
|
||||
.IsUnique();
|
||||
|
||||
@@ -199,14 +195,32 @@ namespace DugunSalonu.Migrations
|
||||
b.ToTable("salon");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Ilce", b =>
|
||||
{
|
||||
b.HasOne("DugunSalonu.Models.Il", "Il")
|
||||
.WithMany("ilceler")
|
||||
.HasForeignKey("ILid")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Il");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||
{
|
||||
b.HasOne("DugunSalonu.Models.Il", "il")
|
||||
.WithMany()
|
||||
.WithMany("salons")
|
||||
.HasForeignKey("ilid");
|
||||
|
||||
b.Navigation("il");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DugunSalonu.Models.Il", b =>
|
||||
{
|
||||
b.Navigation("ilceler");
|
||||
|
||||
b.Navigation("salons");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user