fix: Add platform_post_id column per Gemini review
- Added platform_post_id VARCHAR(255) for Phase 2 API matching - Added composite index on (platform, platform_post_id) - Future-proofs manual entries for automatic API sync Chronicler #76 (per Gemini consultation)
This commit is contained in:
@@ -37,7 +37,10 @@ CREATE TABLE social_posts (
|
||||
-- Metadata
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
updated_at TIMESTAMP DEFAULT NOW(),
|
||||
notes TEXT
|
||||
notes TEXT,
|
||||
|
||||
-- Platform native ID (for Phase 2 API matching)
|
||||
platform_post_id VARCHAR(255)
|
||||
);
|
||||
|
||||
-- Account-level snapshots (weekly or on-demand)
|
||||
@@ -65,6 +68,7 @@ CREATE TABLE social_account_snapshots (
|
||||
-- Indexes for common queries
|
||||
CREATE INDEX idx_social_posts_platform ON social_posts(platform);
|
||||
CREATE INDEX idx_social_posts_posted_at ON social_posts(posted_at DESC);
|
||||
CREATE INDEX idx_social_posts_platform_post_id ON social_posts(platform, platform_post_id);
|
||||
CREATE INDEX idx_social_snapshots_platform_date ON social_account_snapshots(platform, snapshot_date DESC);
|
||||
|
||||
-- Comments
|
||||
|
||||
Reference in New Issue
Block a user