-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-data-sources.sh
More file actions
executable file
Β·54 lines (47 loc) Β· 1.52 KB
/
setup-data-sources.sh
File metadata and controls
executable file
Β·54 lines (47 loc) Β· 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
echo "π Data Sources Quick Start"
echo "============================"
echo ""
# Check if we're in the www directory
if [ ! -f "artisan" ]; then
echo "β Error: Please run this script from the www directory"
exit 1
fi
echo "π¦ Step 1: Running migrations..."
php artisan migrate --force
echo ""
echo "π± Step 2: Seeding sample data sources..."
php artisan db:seed --class=DataSourceSeeder
echo ""
echo "π Step 3: Fetching data from sources..."
php artisan data-sources:refresh --all
echo ""
echo "β
Setup complete!"
echo ""
echo "π Data Sources Summary:"
echo "----------------------"
php artisan tinker --execute="
\$enabled = App\Models\DataSource::enabled()->count();
\$total = App\Models\DataSource::count();
echo \"β Total sources: \$total\n\";
echo \"β Enabled sources: \$enabled\n\";
echo \"β Disabled sources: \" . (\$total - \$enabled) . \"\n\";
"
echo ""
echo "π― Next Steps:"
echo "-------------"
echo "1. Start the Laravel server: php artisan serve"
echo "2. Start Vite dev server: npm run dev"
echo "3. Visit: http://localhost:8000/data-sources"
echo ""
echo "π Documentation:"
echo "----------------"
echo "- User Guide: docs/DATA_SOURCES_GUIDE.md"
echo "- Implementation: docs/DATA_SOURCES_IMPLEMENTATION.md"
echo ""
echo "π§ Useful Commands:"
echo "------------------"
echo " php artisan data-sources:refresh # Refresh expired caches"
echo " php artisan data-sources:refresh --all # Refresh all sources"
echo " php artisan schedule:work # Run background jobs"
echo ""