66 lines
2.1 KiB
C#
66 lines
2.1 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|