using System; using System.Collections.Generic; using DysonNetwork.Sphere.Storage; using Microsoft.EntityFrameworkCore.Migrations; using NodaTime; #nullable disable namespace DysonNetwork.Sphere.Migrations { /// public partial class SafetyAbuseReport : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn>( name: "sensitive_marks", table: "posts", type: "jsonb", nullable: true); migrationBuilder.CreateTable( name: "abuse_reports", columns: table => new { id = table.Column(type: "uuid", nullable: false), resource_identifier = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), type = table.Column(type: "integer", nullable: false), reason = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false), resolved_at = table.Column(type: "timestamp with time zone", nullable: true), resolution = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: true), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), deleted_at = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("pk_abuse_reports", x => x.id); table.ForeignKey( name: "fk_abuse_reports_accounts_account_id", column: x => x.account_id, principalTable: "accounts", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "ix_abuse_reports_account_id", table: "abuse_reports", column: "account_id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "abuse_reports"); migrationBuilder.DropColumn( name: "sensitive_marks", table: "posts"); } } }