feat: nene2.database 抽象化層と Alembic をセットアップする#17
Merged
Conversation
- DatabaseQueryExecutorInterface / DatabaseTransactionManagerInterface (ABC) を追加 - DatabaseConnectionException を追加 - SqlAlchemyQueryExecutor / SqlAlchemyTransactionManager を実装(SQLite/MySQL/PostgreSQL 対応) - alembic init + env.py を環境変数ベースの URL 構築に設定 - 001: notes / tags テーブルの initial migration を追加 - sqlalchemy>=2.0, alembic>=1.13 を dependencies に追加 - data/ を .gitignore に追加 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DatabaseQueryExecutorInterface/DatabaseTransactionManagerInterface(ABC) を新設SqlAlchemyQueryExecutorで SQLite / MySQL / PostgreSQL に対応(SQLAlchemy Core、ORM なし)env.pyがDB_ADAPTER/DB_NAME環境変数から URL を構築notes/tagsテーブル(created_at / updated_at 付き)Test plan
DB_ADAPTER=sqlite DB_NAME=data/nene2.db uv run alembic upgrade headでテーブル作成確認Closes #14
🤖 Generated with Claude Code