#!/bin/bash
# Apply migration for ads-tracking-service-net

export ConnectionStrings__DefaultConnection="Host=ep-holy-glitter-a4hongg7-pooler.us-east-1.aws.neon.tech;Port=5432;Database=ads_tracking_service;Username=neondb_owner;Password=npg_Ssfy6HKO0cXI;SSL Mode=Require;Channel Binding=require"

cd "$(dirname "$0")/../src/AdsTrackingService.Infrastructure"

echo "Applying migration to ads_tracking_service database..."
dotnet ef database update --startup-project ../AdsTrackingService.API --context AdsTrackingServiceContext

echo "Migration complete!"
