using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace kehati.Migrations
{
///
public partial class LokasiFauna : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ms_lokasi_fauna",
columns: table => new
{
MsLokasiFaunaId = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ms_lokasi_id = table.Column(type: "integer", nullable: false),
ms_fauna_id = table.Column(type: "integer", nullable: false),
created_at = table.Column(type: "timestamp with time zone", nullable: false),
updated_at = table.Column(type: "timestamp with time zone", nullable: true),
},
constraints: table =>
{
table.PrimaryKey("PK_MsLokasiFaunaId", x => x.MsLokasiFaunaId);
table.ForeignKey(
name: "FK_LokasiId",
column: x => x.ms_lokasi_id,
principalTable: "ms_lokasi",
principalColumn: "MsLokasiId");
table.ForeignKey(
name: "FK_FaunaId",
column: x => x.ms_fauna_id,
principalTable: "ms_fauna",
principalColumn: "MsFaunaId");
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}