-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigration_fix.cs
More file actions
40 lines (36 loc) · 1.53 KB
/
migration_fix.cs
File metadata and controls
40 lines (36 loc) · 1.53 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
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace ShopService.Migrations
{
/// <inheritdoc />
public partial class AddAppConfiguration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "app_configurations",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
key = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false),
description = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_app_configurations", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "app_configurations");
}
}
}