Skip to content

[Feature] Support OceanBase deployment (OceanBase MySQL mode) #247

@wowo-zZ

Description

@wowo-zZ

Problem

SkillHub currently assumes PostgreSQL in several places, which makes it hard to deploy in OceanBase-based environments.

From the current codebase, PostgreSQL-specific assumptions exist in:

  • runtime config and Hibernate dialect: server/skillhub-app/src/main/resources/application.yml
  • PostgreSQL driver and Flyway dependency: server/skillhub-app/pom.xml
  • migration scripts under server/skillhub-app/src/main/resources/db/migration/
  • search implementation under server/skillhub-search/src/main/java/com/iflytek/skillhub/search/postgres/
  • native upsert SQL in server/skillhub-infra/src/main/java/com/iflytek/skillhub/infra/jpa/SkillVersionStatsJpaRepository.java

Examples already present in the repo include:

  • BIGSERIAL
  • JSONB
  • TIMESTAMPTZ
  • plpgsql
  • ON CONFLICT
  • tsvector / GIN

Based on the current OceanBase compatibility-mode documentation, this request should target OceanBase MySQL mode rather than PostgreSQL compatibility:

Proposed Solution

Add official support for running SkillHub on OceanBase MySQL mode.

Suggested scope:

  • introduce an explicit database profile such as postgres / oceanbase-mysql
  • remove hard-coded PostgreSQL assumptions from configuration and persistence wiring
  • provide an OceanBase-compatible migration path
  • isolate PostgreSQL-specific search logic from portable application behavior
  • add integration validation against a real OceanBase instance

Suggested minimum acceptance criteria:

  • SkillHub can start successfully on OceanBase MySQL mode
  • schema migration can complete on a clean OceanBase tenant
  • core flows work: auth, namespace, publish, review, download
  • OceanBase search behavior and limitations are documented

Alternatives Considered

  • keep PostgreSQL as the only supported database
  • support only core transactional features first, and defer search parity

Impact

  • Migration: high
  • Deployment: medium to high
  • Search: medium to high
  • API/SDK: no expected contract change for initial support

Contract Or SDK Impact

No intentional OpenAPI or SDK change is expected for initial OceanBase support, but deployment and operator docs would need updates.

Metadata

Metadata

Assignees

Labels

effort/m中等改动,存在一定协同成本 / Medium change with noticeable coordination cost.priority/p3低优先级 / Low priority triage bucket.triage/needs-info需要补充更多信息后才能分流 / Issue needs more detail before it can be routed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions