added unique check for barcode

This commit is contained in:
2026-06-10 20:03:07 -05:00
parent 2e927efe0a
commit f77f9fb9ea
6 changed files with 301 additions and 3 deletions
@@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace barkmanapi.Migrations
{
/// <inheritdoc />
public partial class barcodestring : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "barcode",
table: "inventory",
type: "text",
nullable: false,
oldClrType: typeof(int),
oldType: "integer");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "barcode",
table: "inventory",
type: "integer",
nullable: false,
oldClrType: typeof(string),
oldType: "text");
}
}
}