fix: remove non-deterministic CHECK constraint from templates table
- SQLite doesn't allow datetime('now') in CHECK constraints
- Drop tables before recreating to ensure clean schema
- 6-month filtering is already handled in application logic
- Successfully fetched and stored 199 templates
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,10 +39,7 @@ CREATE TABLE IF NOT EXISTS templates (
|
||||
created_at DATETIME,
|
||||
updated_at DATETIME,
|
||||
url TEXT,
|
||||
scraped_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT fresh_template CHECK (
|
||||
datetime(updated_at) >= datetime('now', '-6 months')
|
||||
)
|
||||
scraped_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Templates indexes
|
||||
|
||||
Reference in New Issue
Block a user