- Add sha256 field to API responses as explicit alias of artifact id - Add checksum_sha1 and s3_etag fields to artifacts table - Compute MD5, SHA1, and capture S3 ETag during upload - Update StorageResult to return all checksums from storage layer - Add migration 003_checksum_fields.sql for existing databases - Add Dockerfile.local and docker-compose.local.yml for local development - Update schemas to include all checksum fields in responses
13 lines
701 B
SQL
13 lines
701 B
SQL
-- Migration 003: Additional Checksum Fields
|
|
-- Adds checksum_sha1 and s3_etag fields to artifacts table
|
|
|
|
-- ============================================
|
|
-- Artifacts: Add checksum_sha1 and s3_etag fields
|
|
-- ============================================
|
|
ALTER TABLE artifacts ADD COLUMN IF NOT EXISTS checksum_sha1 VARCHAR(40);
|
|
ALTER TABLE artifacts ADD COLUMN IF NOT EXISTS s3_etag VARCHAR(64);
|
|
|
|
-- Create indexes for checksum lookups (optional, for verification queries)
|
|
CREATE INDEX IF NOT EXISTS idx_artifacts_checksum_md5 ON artifacts(checksum_md5) WHERE checksum_md5 IS NOT NULL;
|
|
CREATE INDEX IF NOT EXISTS idx_artifacts_checksum_sha1 ON artifacts(checksum_sha1) WHERE checksum_sha1 IS NOT NULL;
|