using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Hutopy.Modules.Messaging.Migrations { /// public partial class Initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.EnsureSchema( name: "Messaging"); migrationBuilder.CreateTable( name: "Messages", schema: "Messaging", columns: table => new { Id = table.Column(type: "uuid", nullable: false), SubjectId = table.Column(type: "uuid", nullable: false), ParentId = table.Column(type: "uuid", nullable: true), Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), CreatedBy = table.Column(type: "uuid", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), DeletedBy = table.Column(type: "uuid", nullable: true), DeletedAt = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Messages", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Messages", schema: "Messaging"); } } }