CREATE TABLE IF NOT EXISTS DiscussionTopics (
    TopicId BIGINT NOT NULL,
    ForumId BIGINT,
    OrgUnitId INT,
    Name VARCHAR(1000),
    Description VARCHAR(1000),
    MustPostToParticipate TINYINT(1),
    AllowAnon TINYINT(1),
    IsHidden TINYINT(1),
    RequiresApproval TINYINT(1),
    LastPostDate DATETIME,
    LastPostUserId BIGINT,
    NumViews BIGINT,
    SortOrder INT,
    IsDeleted TINYINT(1),
    DeletedDate DATETIME,
    DeletedByUserId INT,
    GradeItemId INT,
    ScoreOutOf FLOAT,
    ScoreCalculationMethod VARCHAR(19) COMMENT 'Average, Max, Min, Mode Max, Mode Min, Sum, null',
    IncludeNonScoredValues TINYINT(1),
    Version BIGINT,
    ResultId INT,
    StartDate DATETIME,
    StartDateAvailabilityType SMALLINT,
    EndDate DATETIME,
    EndDateAvailabilityType SMALLINT,
    AIUtilization INT COMMENT '0=None, 1=AI+Review, 2=AI+Edit, 3=Assisted, 4=AI Generated',
    PRIMARY KEY (TopicId)
) CHARACTER SET utf8mb4;