50 lines
2.0 KiB
C#
50 lines
2.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Hutopy.Modules.Tipping.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Initial : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.EnsureSchema(
|
|
name: "Tipping");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Tips",
|
|
schema: "Tipping",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
CreatorId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Status = table.Column<short>(type: "smallint", nullable: false),
|
|
Amount = table.Column<decimal>(type: "numeric", nullable: false),
|
|
Currency = table.Column<string>(type: "text", nullable: false),
|
|
Message = table.Column<string>(type: "text", nullable: false),
|
|
StripeSessionId = table.Column<string>(type: "text", nullable: false),
|
|
StripeInvoiceUrl = table.Column<string>(type: "text", nullable: true),
|
|
CreatedBy = table.Column<Guid>(type: "uuid", nullable: false),
|
|
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
|
|
DeletedBy = table.Column<Guid>(type: "uuid", nullable: true),
|
|
DeletedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Tips", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Tips",
|
|
schema: "Tipping");
|
|
}
|
|
}
|
|
}
|