mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-12 22:11:54 +00:00
42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace barkmanapi.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class postyFirst : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "inventory",
|
|
columns: table => new
|
|
{
|
|
id = table.Column<int>(type: "integer", nullable: false)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
name = table.Column<string>(type: "text", nullable: false),
|
|
brand = table.Column<string>(type: "text", nullable: false),
|
|
serial_number = table.Column<string>(type: "text", nullable: true),
|
|
status = table.Column<string>(type: "text", nullable: true),
|
|
rental_price = table.Column<float>(type: "real", nullable: true),
|
|
replacement_cost = table.Column<float>(type: "real", nullable: true),
|
|
notes = table.Column<string>(type: "text", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("pk_inventory", x => x.id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "inventory");
|
|
}
|
|
}
|
|
}
|