20251230081037_Migration_20251230161000.cs
3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Rcs.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class Migration_20251230161000 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "manufacturers");
migrationBuilder.DropTable(
name: "robot_type_configs");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "manufacturers",
columns: table => new
{
manufacturer_id = table.Column<Guid>(type: "uuid", nullable: false),
address = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
contact_person = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
contact_phone = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: true),
created_at = table.Column<DateTime>(type: "timestamp", nullable: true),
is_enabled = table.Column<bool>(type: "boolean", nullable: false),
manufacturer_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
manufacturer_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
remarks = table.Column<string>(type: "text", nullable: true),
sort_order = table.Column<int>(type: "integer", nullable: false),
updated_at = table.Column<DateTime>(type: "timestamp", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_manufacturers", x => x.manufacturer_id);
});
migrationBuilder.CreateTable(
name: "robot_type_configs",
columns: table => new
{
robot_type_id = table.Column<Guid>(type: "uuid", nullable: false),
created_at = table.Column<DateTime>(type: "timestamp", nullable: true),
description = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
is_enabled = table.Column<bool>(type: "boolean", nullable: false),
remarks = table.Column<string>(type: "text", nullable: true),
sort_order = table.Column<int>(type: "integer", nullable: false),
type_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
type_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
updated_at = table.Column<DateTime>(type: "timestamp", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_robot_type_configs", x => x.robot_type_id);
});
}
}
}