referans tablosu üretildi. Türü ve Kodu için kontrol sağlandı.

This commit is contained in:
2025-08-10 17:21:52 +03:00
parent 2ab4d14a58
commit ab7878a43b
5 changed files with 356 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DugunSalonu.Migrations
{
/// <inheritdoc />
public partial class mg9 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "referans",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
turu = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
kodu = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
adi = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
kts = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "NOW()"),
kk = table.Column<int>(type: "integer", nullable: false),
aktif = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_referans", x => x.id);
});
migrationBuilder.CreateIndex(
name: "IX_referans_turu_kodu",
table: "referans",
columns: new[] { "turu", "kodu" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "referans");
}
}
}