using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Infrastructure.Migrations { public partial class CreateLink : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "links", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), Url = table.Column(type: "TEXT", maxLength: 500, nullable: false), CreatedAt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_links", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_links_Url", table: "links", column: "Url", unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "links"); } } }