diff options
author | crupest <crupest@outlook.com> | 2020-12-17 23:49:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 23:49:16 +0800 |
commit | ebc2892d1546b8b59bd1c9adabe8a96a2e2a0754 (patch) | |
tree | f27b279237a6a7ab3b6a09206f3fec6a5524674b /BackEnd/Timeline/Migrations/20201217093401_AddHighlightTimelines.cs | |
parent | b0ee9afddd4f7ecf8a183ab8d8e9e575324a2b68 (diff) | |
parent | d452781c81e6d19076cf9d356877e154b2e34e91 (diff) | |
download | timeline-ebc2892d1546b8b59bd1c9adabe8a96a2e2a0754.tar.gz timeline-ebc2892d1546b8b59bd1c9adabe8a96a2e2a0754.tar.bz2 timeline-ebc2892d1546b8b59bd1c9adabe8a96a2e2a0754.zip |
Merge pull request #192 from crupest/highlight-timeline
Highlight timeline.
Diffstat (limited to 'BackEnd/Timeline/Migrations/20201217093401_AddHighlightTimelines.cs')
-rw-r--r-- | BackEnd/Timeline/Migrations/20201217093401_AddHighlightTimelines.cs | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Migrations/20201217093401_AddHighlightTimelines.cs b/BackEnd/Timeline/Migrations/20201217093401_AddHighlightTimelines.cs new file mode 100644 index 00000000..e838615e --- /dev/null +++ b/BackEnd/Timeline/Migrations/20201217093401_AddHighlightTimelines.cs @@ -0,0 +1,55 @@ +using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Timeline.Migrations
+{
+ public partial class AddHighlightTimelines : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "highlight_timelines",
+ columns: table => new
+ {
+ id = table.Column<long>(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ timeline_id = table.Column<long>(type: "INTEGER", nullable: false),
+ operator_id = table.Column<long>(type: "INTEGER", nullable: true),
+ add_time = table.Column<DateTime>(type: "TEXT", nullable: false),
+ order = table.Column<long>(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_highlight_timelines", x => x.id);
+ table.ForeignKey(
+ name: "FK_highlight_timelines_timelines_timeline_id",
+ column: x => x.timeline_id,
+ principalTable: "timelines",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_highlight_timelines_users_operator_id",
+ column: x => x.operator_id,
+ principalTable: "users",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Restrict);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_highlight_timelines_operator_id",
+ table: "highlight_timelines",
+ column: "operator_id");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_highlight_timelines_timeline_id",
+ table: "highlight_timelines",
+ column: "timeline_id");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "highlight_timelines");
+ }
+ }
+}
|