güncelleme

This commit is contained in:
2025-08-11 11:22:31 +03:00
parent 5616230e67
commit 5c7bb2c399
10 changed files with 599 additions and 55 deletions

View 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");
}
}
}