using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DugunSalonu.Migrations { /// public partial class mig10 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_referans", table: "referans"); migrationBuilder.AlterColumn( name: "kts", table: "referans", type: "timestamp with time zone", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp with time zone", oldDefaultValueSql: "NOW()"); migrationBuilder.AlterColumn( name: "id", table: "referans", type: "integer", nullable: false, oldClrType: typeof(int), oldType: "integer") .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "kts", table: "referans", type: "timestamp with time zone", nullable: false, defaultValueSql: "NOW()", oldClrType: typeof(DateTime), oldType: "timestamp with time zone"); migrationBuilder.AlterColumn( 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"); } } }