refactor: Rename SCHEMA_SQL to INITIAL_SCHEMA_SQL

This aligns with ADR-033's migration system redesign. The initial schema
represents the v1.0.0 baseline and should not be modified. All schema
changes after v1.0.0 must go in migration files.

Changes:
- Renamed SCHEMA_SQL → INITIAL_SCHEMA_SQL in database.py
- Updated all references in migrations.py comments
- Added comment: "DO NOT MODIFY - This represents the v1.0.0 schema state"
- No functional changes, purely documentation improvement

Part of v1.1.0 migration system redesign (Phase 2).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-25 09:59:17 -07:00
parent d9df55ae63
commit 8352c3ab7c
2 changed files with 20 additions and 18 deletions

View File

@@ -7,8 +7,10 @@ import sqlite3
from pathlib import Path
# Database schema
SCHEMA_SQL = """
# Initial database schema (v1.0.0 baseline)
# DO NOT MODIFY - This represents the v1.0.0 schema state
# All schema changes after v1.0.0 must go in migration files
INITIAL_SCHEMA_SQL = """
-- Notes metadata (content is in files)
CREATE TABLE IF NOT EXISTS notes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -107,7 +109,7 @@ def init_db(app=None):
# Create database and initial schema
conn = sqlite3.connect(db_path)
try:
conn.executescript(SCHEMA_SQL)
conn.executescript(INITIAL_SCHEMA_SQL)
conn.commit()
if logger:
logger.info(f"Database initialized: {db_path}")