- Add MinIO S3-compatible storage to docker-compose (dev, staging, prod) - Create migrations 103-108 (waveform_url, user_folders, user_files, user_storage_quotas, gear_items.is_public, gear_images) - Add Go models: UserFile, UserFolder, StorageQuota, GearImage - Add WaveformURL to Track model, IsPublic + GearImages to GearItem model
10 lines
414 B
SQL
10 lines
414 B
SQL
-- Migration 108: Create gear_images table (v0.501 G1.2)
|
|
CREATE TABLE IF NOT EXISTS gear_images (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
gear_id UUID NOT NULL REFERENCES gear_items(id) ON DELETE CASCADE,
|
|
image_url VARCHAR(500) NOT NULL,
|
|
position INT NOT NULL DEFAULT 0,
|
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX idx_gear_images_gear_id ON gear_images(gear_id);
|