using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Mccn.Modules.Hello.Infrastructure.Migrations
{
///
public partial class InitialCreate : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "hello");
migrationBuilder.CreateTable(
name: "inbox_message_consumers",
schema: "hello",
columns: table => new
{
inbox_message_id = table.Column(type: "uuid", nullable: false),
name = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_inbox_message_consumers", x => new { x.inbox_message_id, x.name });
});
migrationBuilder.CreateTable(
name: "inbox_messages",
schema: "hello",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
type = table.Column(type: "text", nullable: false),
content = table.Column(type: "text", nullable: false),
occurred_on_utc = table.Column(type: "timestamp with time zone", nullable: false),
processed_on_utc = table.Column(type: "timestamp with time zone", nullable: true),
error = table.Column(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("pk_inbox_messages", x => x.id);
});
migrationBuilder.CreateTable(
name: "welcomed_users",
schema: "hello",
columns: table => new
{
id = table.Column(type: "uuid", nullable: false),
user_id = table.Column(type: "uuid", nullable: false),
email = table.Column(type: "text", nullable: false),
first_name = table.Column(type: "text", nullable: false),
last_name = table.Column(type: "text", nullable: false),
welcomed_at = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_welcomed_users", x => x.id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "inbox_message_consumers",
schema: "hello");
migrationBuilder.DropTable(
name: "inbox_messages",
schema: "hello");
migrationBuilder.DropTable(
name: "welcomed_users",
schema: "hello");
}
}
}