CREATE TABLE "ur_ingest_session_fs_path_entry" (
"ur_ingest_session_fs_path_entry_id" VARCHAR PRIMARY KEY NOT NULL,
"ingest_session_id" VARCHAR NOT NULL,
"ingest_fs_path_id" VARCHAR NOT NULL,
"uniform_resource_id" VARCHAR,
"file_path_abs" TEXT NOT NULL,
"file_path_rel_parent" TEXT NOT NULL,
"file_path_rel" TEXT NOT NULL,
"file_basename" TEXT NOT NULL,
"file_extn" TEXT,
"captured_executable" TEXT CHECK(json_valid(captured_executable) OR captured_executable IS NULL),
"ur_status" TEXT,
"ur_diagnostics" TEXT CHECK(json_valid(ur_diagnostics) OR ur_diagnostics IS NULL),
"ur_transformations" TEXT CHECK(json_valid(ur_transformations) OR ur_transformations IS NULL),
"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("ingest_session_id") REFERENCES "ur_ingest_session"("ur_ingest_session_id"),
FOREIGN KEY("ingest_fs_path_id") REFERENCES "ur_ingest_session_fs_path"("ur_ingest_session_fs_path_id"),
FOREIGN KEY("uniform_resource_id") REFERENCES "uniform_resource"("uniform_resource_id")
)