Implement API security baseline (sys_user, JWT, audit fields, transactions, unique constraints) and Web real login with 401 handling. Document setup and development workflows in root, WmsLite.Api, and WmsLite.Web README files. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
855 B
C#
27 lines
855 B
C#
using FluentMigrator;
|
|
|
|
namespace WmsLite.Api.Database.Migrations;
|
|
|
|
[Migration(7, "Inbound order line: unit nullable until receive")]
|
|
public class InboundOrderLineUnitNullable0007 : Migration
|
|
{
|
|
public override void Up()
|
|
{
|
|
if (Schema.Table("inbound_order_line").Exists()
|
|
&& Schema.Table("inbound_order_line").Column("unit").Exists())
|
|
{
|
|
Execute.Sql("ALTER TABLE inbound_order_line ALTER COLUMN unit DROP NOT NULL;");
|
|
}
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
if (Schema.Table("inbound_order_line").Exists()
|
|
&& Schema.Table("inbound_order_line").Column("unit").Exists())
|
|
{
|
|
Execute.Sql("UPDATE inbound_order_line SET unit = '' WHERE unit IS NULL;");
|
|
Execute.Sql("ALTER TABLE inbound_order_line ALTER COLUMN unit SET NOT NULL;");
|
|
}
|
|
}
|
|
}
|