-- Loot profiles for BetterLoot integration CREATE TABLE loot_profiles ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), license_id UUID NOT NULL REFERENCES licenses(id) ON DELETE CASCADE, profile_name VARCHAR(100) NOT NULL, description TEXT, loot_table JSONB NOT NULL DEFAULT '{}', loot_groups JSONB NOT NULL DEFAULT '{}', is_active BOOLEAN NOT NULL DEFAULT false, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() ); CREATE INDEX idx_loot_profiles_license ON loot_profiles(license_id);