Skip to content

Commit

Permalink
Add command to create the admin_log table in the database
Browse files Browse the repository at this point in the history
  • Loading branch information
MythicalCuddles committed Oct 18, 2019
1 parent f6fc1b3 commit d177bc5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DiscordBot/Database/DatabaseActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ private static void CreateTablesIfNotExists()
"`requestedIn` BIGINT NOT NULL," +
"PRIMARY KEY (`requestQuoteId`)" +
") ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;");

ExecuteNonQueryCommand("CREATE TABLE IF NOT EXISTS `admin_log` (" +
"`logId` INT NOT NULL AUTO_INCREMENT," +
"`executedBy` BIGINT NOT NULL," +
"`action` TEXT NOT NULL," +
"`executedAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP," +
"`executedIn` BIGINT NOT NULL," +
"`userMentioned` BIGINT NULL," +
"PRIMARY KEY (`logId`)" +
") ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;");
}
}
}

0 comments on commit d177bc5

Please sign in to comment.