referans tablosu üretildi. Türü ve Kodu için kontrol sağlandı.
This commit is contained in:
47
Migrations/20250810141631_mg9.cs
Normal file
47
Migrations/20250810141631_mg9.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user