0029_musehub_commits_created_at_server_default.py
python
sha256:5601f81903b6c70ddd11bd88a5a257ee6dfd38aa3b85b19746c100c030657f1e
chore: update smoke_muse.sh comment to reference rc9
Sonnet 4.6
minor
⚠ breaking
20 days ago
| 1 | """Add server_default now() to musehub_commits.created_at. |
| 2 | |
| 3 | The ORM model declared server_default=sa.func.now() but it was never applied |
| 4 | to the DB, causing NOT NULL violations when the push handler inserts a commit |
| 5 | without supplying created_at explicitly. |
| 6 | |
| 7 | Revision ID: 0029 |
| 8 | Revises: 0028 |
| 9 | """ |
| 10 | from __future__ import annotations |
| 11 | |
| 12 | from alembic import op |
| 13 | import sqlalchemy as sa |
| 14 | |
| 15 | |
| 16 | revision = "0029" |
| 17 | down_revision = "0028" |
| 18 | branch_labels = None |
| 19 | depends_on = None |
| 20 | |
| 21 | |
| 22 | def upgrade() -> None: |
| 23 | op.get_bind().execute(sa.text( |
| 24 | "ALTER TABLE musehub_commits ALTER COLUMN created_at SET DEFAULT now()" |
| 25 | )) |
| 26 | |
| 27 | |
| 28 | def downgrade() -> None: |
| 29 | op.get_bind().execute(sa.text( |
| 30 | "ALTER TABLE musehub_commits ALTER COLUMN created_at DROP DEFAULT" |
| 31 | )) |
File History
2 commits
sha256:5601f81903b6c70ddd11bd88a5a257ee6dfd38aa3b85b19746c100c030657f1e
chore: update smoke_muse.sh comment to reference rc9
Sonnet 4.6
minor
⚠
20 days ago
sha256:39e9c4e6f2134da0732e6983268a218178973936f8d7ca03c91f2b5ad42133c8
fix: use read_object_bytes in blob viewer; add zstd magic d…
Sonnet 4.6
patch
20 days ago