C# Discord bot made using NetCord for keeping a TikTok-style streak
1using System;
2using Microsoft.EntityFrameworkCore.Migrations;
3
4#nullable disable
5
6namespace StreakBot.Migrations
7{
8 /// <inheritdoc />
9 public partial class InitialCreate : Migration
10 {
11 /// <inheritdoc />
12 protected override void Up(MigrationBuilder migrationBuilder)
13 {
14 migrationBuilder.CreateTable(
15 name: "Channels",
16 columns: table => new
17 {
18 Id = table.Column<int>(type: "INTEGER", nullable: false)
19 .Annotation("Sqlite:Autoincrement", true),
20 ServerId = table.Column<ulong>(type: "INTEGER", nullable: false),
21 ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
22 ChannelType = table.Column<int>(type: "INTEGER", nullable: false)
23 },
24 constraints: table =>
25 {
26 table.PrimaryKey("PK_Channels", x => x.Id);
27 });
28
29 migrationBuilder.CreateTable(
30 name: "Streaks",
31 columns: table => new
32 {
33 Id = table.Column<int>(type: "INTEGER", nullable: false)
34 .Annotation("Sqlite:Autoincrement", true),
35 CreatedDate = table.Column<DateTime>(type: "TEXT", nullable: false),
36 User1Id = table.Column<ulong>(type: "INTEGER", nullable: false),
37 User2Id = table.Column<ulong>(type: "INTEGER", nullable: false),
38 ServerId = table.Column<ulong>(type: "INTEGER", nullable: false),
39 User1MessageSent = table.Column<bool>(type: "INTEGER", nullable: false),
40 User2MessageSent = table.Column<bool>(type: "INTEGER", nullable: false),
41 StreakNumber = table.Column<int>(type: "INTEGER", nullable: false),
42 LastResetCheck = table.Column<DateTime>(type: "TEXT", nullable: false),
43 ReminderSent = table.Column<bool>(type: "INTEGER", nullable: false)
44 },
45 constraints: table =>
46 {
47 table.PrimaryKey("PK_Streaks", x => x.Id);
48 });
49 }
50
51 /// <inheritdoc />
52 protected override void Down(MigrationBuilder migrationBuilder)
53 {
54 migrationBuilder.DropTable(
55 name: "Channels");
56
57 migrationBuilder.DropTable(
58 name: "Streaks");
59 }
60 }
61}