using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MessengerBroker.Db.Sql.Migrations
{
///
public partial class Initial : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Messages",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
BrokerId = table.Column(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Messages", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Syncs",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
BrokerId = table.Column(type: "uniqueidentifier", nullable: false),
StartedUtc = table.Column(type: "datetime2", nullable: false),
FinishedUtc = table.Column(type: "datetime2", nullable: true),
Changes = table.Column(type: "bigint", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Syncs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
BrokerId = table.Column(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Messages");
migrationBuilder.DropTable(
name: "Syncs");
migrationBuilder.DropTable(
name: "Users");
}
}
}