CREATE TABLE "ur_ingest_session_plm_milestone" (
"ur_ingest_session_plm_milestone_id" VARCHAR PRIMARY KEY NOT NULL,
"ur_ingest_session_plm_acct_project_id" VARCHAR NOT NULL,
"title" TEXT NOT NULL,
"milestone_id" TEXT NOT NULL,
"url" TEXT NOT NULL,
"html_url" TEXT NOT NULL,
"open_issues" INTEGER,
"closed_issues" INTEGER,
"due_on" TIMESTAMPTZ,
"closed_at" TIMESTAMPTZ,
"elaboration" TEXT CHECK(json_valid(elaboration) OR elaboration IS NULL),
"created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
"created_by" TEXT DEFAULT 'UNKNOWN',
"updated_at" TIMESTAMPTZ,
"updated_by" TEXT,
"deleted_at" TIMESTAMPTZ,
"deleted_by" TEXT,
"activity_log" TEXT,
FOREIGN KEY("ur_ingest_session_plm_acct_project_id") REFERENCES "ur_ingest_session_plm_acct_project"("ur_ingest_session_plm_acct_project_id")
)