Hello! This issue is mainly related to the database types supported by Dify.
Based on your error message pymysql.err.ProgrammingError and your mention of using seekdb (OceanBase/MySQL compatible) as the metadata database, the core reason for the problem is:
Dify’s core metadata database currently only officially supports PostgreSQL, not MySQL or OceanBase.
Here’s a detailed analysis:
1. Why the error “Table doesn’t exist”?
Dify uses SQLAlchemy and Alembic for database migrations (automatic table creation). Since Dify’s code and migration scripts are specifically written for PostgreSQL (using many PG-specific features like UUID types, JSONB field indexes, etc.), when you force the DB_TYPE configuration to mysql or connect to a MySQL protocol database:
- The automatic migration scripts may not execute correctly, leading to tables not being created.
- Or, PG-specific features relied upon by the application at startup are unavailable on MySQL, resulting in some tables being missing.
The dify_plugin database in your screenshot might have some tables, but these are likely attempts by the plugin system to create them, while core business tables (like workflow_schedule_plans, used for scheduled workflows) failed to be created.
2. Database Compatibility Explanation
- Core Business Database (Metadata DB): Must be PostgreSQL (version usually requires v14+). This is where application configurations, users, workflow definitions, logs, and other core data are stored.
- Vector Database (Vector DB): Dify supports various vector stores, including Weaviate, Qdrant, Milvus, PgVector, OceanBase (as a vector store), etc.
Important distinction: You can use OceanBase/SeekDB as a vector database, but you cannot use it to replace PostgreSQL as the core business database.
3. Solution
Please revert the core database configuration in docker-compose.yml or environment variables to PostgreSQL.
Recommended correct architecture configuration:
- Core Database (
db): Use the default Postgres container in your Docker deployment, or an externally hosted PostgreSQL database. - Vector Database (
vector_store): If you want to use OceanBase/SeekDB, only configure it as the vector storage backend.
Reference configuration (.env):
# Core Database (must be PostgreSQL)
DB_TYPE=postgres
DB_HOST=<Your Postgres address>
DB_PORT=5432
DB_DATABASE=dify
# Vector Database (can use OceanBase)
VECTOR_STORE=oceanbase
OCEANBASE_VECTOR_HOST=<Your SeekDB/OceanBase address>
OCEANBASE_VECTOR_PORT=2881
...
Summary
The current error is because Dify has a strong dependency on PostgreSQL and cannot properly initialize the core table structure on MySQL/OceanBase. Please switch the main database back to PostgreSQL to resolve this issue.