Store SHA256 checksums with artifacts and add multiple hash support
This commit is contained in:
12
migrations/003_checksum_fields.sql
Normal file
12
migrations/003_checksum_fields.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- 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;
|
||||
Reference in New Issue
Block a user