using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace TeleWave.Infrastructure.Migrations { /// public partial class AddMediaAssets : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "MediaAssets", columns: table => new { Id = table.Column(type: "uuid", nullable: false), OriginalFileName = table.Column( type: "character varying(512)", maxLength: 512, nullable: false ), OriginalExtension = table.Column( type: "character varying(16)", maxLength: 16, nullable: false ), Source = table.Column(type: "integer", nullable: false), Status = table.Column(type: "integer", nullable: false), Duration = table.Column(type: "interval", nullable: true), SegmentSeconds = table.Column(type: "integer", nullable: true), SegmentCount = table.Column(type: "integer", nullable: true), Width = table.Column(type: "integer", nullable: true), Height = table.Column(type: "integer", nullable: true), VideoCodec = table.Column( type: "character varying(32)", maxLength: 32, nullable: true ), AudioCodec = table.Column( type: "character varying(32)", maxLength: 32, nullable: true ), RelativePath = table.Column( type: "character varying(256)", maxLength: 256, nullable: true ), ErrorMessage = table.Column( type: "character varying(2048)", maxLength: 2048, nullable: true ), CreatedAt = table.Column( type: "timestamp with time zone", nullable: false ), UpdatedAt = table.Column( type: "timestamp with time zone", nullable: false ), }, constraints: table => { table.PrimaryKey("PK_MediaAssets", x => x.Id); } ); migrationBuilder.CreateIndex( name: "IX_MediaAssets_CreatedAt", table: "MediaAssets", column: "CreatedAt" ); migrationBuilder.CreateIndex( name: "IX_MediaAssets_Status", table: "MediaAssets", column: "Status" ); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable(name: "MediaAssets"); } } }