using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace RecNet.Infrastructure.Persistence.Migrations { /// public partial class Relationships : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Relationships", columns: table => new { OwnerProfileId = table.Column(type: "uuid", nullable: false), ProfileId = table.Column(type: "uuid", nullable: false), Muted = table.Column(type: "boolean", nullable: false), Ignored = table.Column(type: "boolean", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Relationships", x => new { x.OwnerProfileId, x.ProfileId }); table.ForeignKey( name: "FK_Relationships_Profiles_OwnerProfileId", column: x => x.OwnerProfileId, principalTable: "Profiles", principalColumn: "ProfileId", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Relationships_Profiles_ProfileId", column: x => x.ProfileId, principalTable: "Profiles", principalColumn: "ProfileId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Relationships_ProfileId", table: "Relationships", column: "ProfileId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Relationships"); } } }