45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace NetinaShop.Repository.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddNewsletterMember : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "NewsletterMembers",
|
|
schema: "public",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
PhoneNumber = table.Column<string>(type: "text", nullable: false),
|
|
Email = table.Column<string>(type: "text", nullable: false),
|
|
RemovedAt = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
|
CreatedBy = table.Column<string>(type: "text", nullable: true),
|
|
IsRemoved = table.Column<bool>(type: "boolean", nullable: false),
|
|
RemovedBy = table.Column<string>(type: "text", nullable: true),
|
|
ModifiedAt = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
|
ModifiedBy = table.Column<string>(type: "text", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_NewsletterMembers", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "NewsletterMembers",
|
|
schema: "public");
|
|
}
|
|
}
|
|
}
|