using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace TeleWave.Infrastructure.Migrations { /// public partial class ImageRegistry : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Images", columns: table => new { Id = table.Column(type: "uuid", nullable: false), Category = table.Column(type: "integer", nullable: false), FileExtension = table.Column( type: "character varying(16)", maxLength: 16, nullable: false ), OriginalFileName = table.Column( type: "character varying(512)", maxLength: 512, nullable: true ), CreatedAt = table.Column( type: "timestamp with time zone", nullable: false ), }, constraints: table => { table.PrimaryKey("PK_Images", x => x.Id); } ); migrationBuilder.CreateIndex( name: "IX_Images_Category_CreatedAt", table: "Images", columns: new[] { "Category", "CreatedAt" } ); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable(name: "Images"); } } }