CREATE TABLE ontologies (
id VARCHAR(50) NOT NULL,
name VARCHAR(255) NOT NULL,
uri VARCHAR(255),
description TEXT,
ontology_id VARCHAR(50),
created_at JSON NOT NULL,
updated_at JSON NOT NULL,
properties JSON,
tenant_id VARCHAR(50) NOT NULL,
license_tier JSON,
parent_ontology VARCHAR(255),
child_ontologies JSON,
category JSON,
version VARCHAR(255),
namespace VARCHAR(255),
status JSON NOT NULL,
project_id VARCHAR(50),
object_properties JSON,
individuals JSON,
axioms JSON,
generation_source JSON,
quality_score FLOAT,
validation_status VARCHAR(255),
content BLOB,
format VARCHAR(255),
size BIGINT,
foundational_type JSON,
authority VARCHAR(255),
is_preloaded BOOLEAN,
documentation_url VARCHAR(255),
supported_formats JSON,
compatibility_matrix JSON,
metadata JSON,
domain VARCHAR(255),
deleted BOOLEAN,
workflow_progress JSON,
upper_ontology VARCHAR(255),
version_iri VARCHAR(512),
has_pending_changes BOOLEAN DEFAULT '0',
active_version_id VARCHAR(50),
pending_draft_json TEXT,
draft_submitted_by VARCHAR(255),
draft_submitted_at VARCHAR(50),
current_published_version_id VARCHAR(50),
initial_generated_version_id VARCHAR(50),
graph_uri VARCHAR(512),
source_document_ids TEXT,
source_id VARCHAR(50),
PRIMARY KEY (id)
)