-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
3,691 additions
and
136 deletions.
There are no files selected for viewing
1,177 changes: 1,177 additions & 0 deletions
1,177
Server/Migrations/PostgreSql/20230523215805_Replace DbLogger with Serilog.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
Server/Migrations/PostgreSql/20230523215805_Replace DbLogger with Serilog.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Remotely.Server.Migrations.PostgreSql | ||
{ | ||
/// <inheritdoc /> | ||
public partial class ReplaceDbLoggerwithSerilog : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "EventLogs"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "EventLogs", | ||
columns: table => new | ||
{ | ||
ID = table.Column<string>(type: "text", nullable: false), | ||
OrganizationID = table.Column<string>(type: "text", nullable: true), | ||
EventType = table.Column<int>(type: "integer", nullable: false), | ||
Message = table.Column<string>(type: "text", nullable: true), | ||
Source = table.Column<string>(type: "text", nullable: true), | ||
StackTrace = table.Column<string>(type: "text", nullable: true), | ||
TimeStamp = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_EventLogs", x => x.ID); | ||
table.ForeignKey( | ||
name: "FK_EventLogs_Organizations_OrganizationID", | ||
column: x => x.OrganizationID, | ||
principalTable: "Organizations", | ||
principalColumn: "ID"); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_EventLogs_OrganizationID", | ||
table: "EventLogs", | ||
column: "OrganizationID"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.