Notion to MD ERD

Tables (3)

notion_connections

  • id — VARCHAR(100) — Primary key — NOT NULL
  • notion_workspace_id — VARCHAR(100) — NOT NULL
  • notion_workspace_name — VARCHAR(255)
  • encrypted_access_token — TEXT — NOT NULL
  • connection_status — VARCHAR(30) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

notion_page_documents

  • id — BIGSERIAL — Primary key — NOT NULL
  • search_scope_id — BIGINT — Foreign key → notion_page_documents.search_scope_id — NOT NULL
  • parent_document_id — BIGINT — Foreign key → notion_page_documents.id
  • notion_page_id — VARCHAR(100) — NOT NULL
  • title — TEXT — NOT NULL
  • notion_url — TEXT — NOT NULL
  • markdown_content — TEXT — NOT NULL
  • notion_last_edited_at — TIMESTAMPTZ
  • imported_at — TIMESTAMPTZ — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

notion_search_scopes

  • id — BIGSERIAL — Primary key — NOT NULL
  • notion_connection_id — VARCHAR(100) — Foreign key → notion_connections.id — NOT NULL
  • root_notion_page_id — VARCHAR(100) — NOT NULL
  • root_page_title — TEXT — NOT NULL
  • import_status — VARCHAR(30) — NOT NULL
  • last_imported_at — TIMESTAMPTZ
  • last_error_message — TEXT
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL