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:
czlonkowski
2025-06-20 00:08:28 +02:00
parent 08f9d1ad30
commit f038f72049
3 changed files with 11 additions and 5 deletions

View File

@@ -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