mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
added unique check for barcode
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace barkmanapi.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class barcodeisunique : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_inventory_barcode",
|
||||
table: "inventory",
|
||||
column: "barcode",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_inventory_barcode",
|
||||
table: "inventory");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user