Files
momentry_core/schema/public_schema.sql
T
Accusys 8b1efb307b docs: schema.sql integration decision request
**M4 測試結果**:
- Migration 路徑: 15/42,Worker 失敗
- schema.sql 路徑: Worker 乾淨啟動成功

**根本問題**:
- Migration 27 個失敗(結構性問題)
- Transaction 中止連鎖
- 無法逐檔修復

**M4 建議**:
- 改用 schema.sql 為單一來源
- 全新安裝 → schema.sql
- 既有 DB → migration 歷史

**當前狀態**:
- M4 已有 schema2.sql(已驗證)
- Core 需要 schema2.sql 文件
- 需要修改 runner 跳過邏輯

**等待 M4 指示**:
1. schema2.sql 傳輸方式
2. 整合選項建議
3. Runner 設計方案
2026-10-05 00:59:28 +08:00

25 lines
666 B
PL/PgSQL

-- Schema: public_schema.sql
-- Purpose: Complete schema definition for Momentry Core
-- Source: Derived from production database + M4 verification
-- Date: 2026-10-05
-- Status: Validated on M5Max128 (Worker startup success)
-- This file is the single source of truth for new installations.
-- For existing database upgrades, use migrations/ directory.
BEGIN;
-- Extensions
CREATE EXTENSION IF NOT EXISTS vector;
-- Schema version tracking
CREATE TABLE IF NOT EXISTS schema_migrations (
version VARCHAR(255) PRIMARY KEY,
applied_at TIMESTAMPTZ DEFAULT NOW()
);
-- Tables will be added here based on M4's schema2.sql
-- This is a template file
COMMIT;