using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace New.Infrastructure.Persistence.Migrations
{
///
public partial class InitialCreate : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "legacy_ownership",
columns: table => new
{
legacy_aanvraag_id = table.Column(type: "integer", nullable: false),
registration_application_id = table.Column(type: "uuid", nullable: false),
taken_over_at = table.Column(type: "timestamp", nullable: false),
domain_writes_since = table.Column(type: "integer", nullable: false, defaultValue: 0)
},
constraints: table =>
{
table.PrimaryKey("PK_legacy_ownership", x => x.legacy_aanvraag_id);
});
migrationBuilder.CreateTable(
name: "registration_applications",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
Bsn = table.Column(type: "character varying(9)", maxLength: 9, nullable: false),
Surname = table.Column(type: "text", nullable: false),
Initials = table.Column(type: "text", nullable: false),
AddressStreet = table.Column(type: "text", nullable: true),
AddressNumber = table.Column(type: "text", nullable: true),
AddressPostalCode = table.Column(type: "text", nullable: true),
AddressCity = table.Column(type: "text", nullable: true),
Email = table.Column(type: "text", nullable: true),
Phone = table.Column(type: "text", nullable: true),
PreferredChannel = table.Column(type: "text", nullable: false),
DiplomaCode = table.Column(type: "text", nullable: false),
DiplomaCountryOfIssue = table.Column(type: "text", nullable: false),
DiplomaIssuedOn = table.Column(type: "date", nullable: false),
AssessmentOutcome = table.Column(type: "text", nullable: true),
AssessmentMotivation = table.Column(type: "text", nullable: true),
AssessmentVerifiedItems = table.Column>(type: "text[]", nullable: false),
AssessmentExceptionReason = table.Column(type: "text", nullable: true),
AssessmentRejectionCategory = table.Column(type: "text", nullable: true),
AssessmentDecidedOn = table.Column(type: "date", nullable: true),
CaseFrameworkCaseId = table.Column(type: "uuid", nullable: true),
CaseExternalReference = table.Column(type: "text", nullable: true),
CaseProcessStatus = table.Column(type: "text", nullable: true),
ReceivedOn = table.Column(type: "date", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_registration_applications", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_legacy_ownership_registration_application_id",
table: "legacy_ownership",
column: "registration_application_id",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "legacy_ownership");
migrationBuilder.DropTable(
name: "registration_applications");
}
}
}