aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2020-12-30 17:48:30 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2020-12-30 17:48:30 +0200
commitfb56c49681746c8c47c1da43c918b37df5f214a1 (patch)
tree780a7ae16198a0649988cd4a677e984477ffb150 /src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs
parente2958817c79f29722fedc1ea8ddcedea894a0f20 (diff)
downloadDevHive-fb56c49681746c8c47c1da43c918b37df5f214a1.tar
DevHive-fb56c49681746c8c47c1da43c918b37df5f214a1.tar.gz
DevHive-fb56c49681746c8c47c1da43c918b37df5f214a1.zip
Adding coomment layers
Diffstat (limited to 'src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs')
-rw-r--r--src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs b/src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs
new file mode 100644
index 0000000..b952be5
--- /dev/null
+++ b/src/DevHive.Data/Migrations/20201230154737_CommentMigration.cs
@@ -0,0 +1,31 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace DevHive.Data.Migrations
+{
+ public partial class CommentMigration : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Comments",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "uuid", nullable: false),
+ UserId = table.Column<Guid>(type: "uuid", nullable: false),
+ Message = table.Column<string>(type: "text", nullable: true),
+ Date = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Comments", x => x.Id);
+ });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Comments");
+ }
+ }
+}