some progress

This commit is contained in:
Doar Mihai
2026-01-24 12:16:10 +02:00
parent 3665a1d5a3
commit 612cc097f8
51 changed files with 8089 additions and 470 deletions
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('domains', function (Blueprint $table) {
$table->id();
$table->foreignId('site_id')->constrained()->onDelete('cascade');
$table->string('domain');
$table->timestamp('expires_at')->nullable();
$table->timestamp('last_checked_at')->nullable();
$table->boolean('is_active')->default(true);
$table->timestamps();
$table->index(['site_id', 'is_active']);
$table->index('expires_at');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('domains');
}
};
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sitemaps', function (Blueprint $table) {
$table->id();
$table->foreignId('site_id')->constrained()->onDelete('cascade');
$table->string('url');
$table->timestamp('last_checked_at')->nullable();
$table->boolean('is_valid')->default(true);
$table->text('last_error')->nullable();
$table->boolean('is_active')->default(true);
$table->integer('url_count')->nullable();
$table->timestamps();
$table->index(['site_id', 'is_active']);
$table->index('is_valid');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sitemaps');
}
};
@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->json('notification_channels')->nullable()->after('notification_preferences');
$table->string('slack_webhook_url')->nullable()->after('notification_channels');
$table->string('telegram_chat_id')->nullable()->after('slack_webhook_url');
$table->string('discord_webhook_url')->nullable()->after('telegram_chat_id');
$table->string('teams_webhook_url')->nullable()->after('discord_webhook_url');
$table->string('google_chat_webhook_url')->nullable()->after('teams_webhook_url');
$table->string('webhook_url')->nullable()->after('google_chat_webhook_url');
$table->string('sms_phone_number')->nullable()->after('webhook_url');
$table->string('opsgenie_api_key')->nullable()->after('sms_phone_number');
$table->string('pagerduty_integration_key')->nullable()->after('opsgenie_api_key');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn([
'notification_channels',
'slack_webhook_url',
'telegram_chat_id',
'discord_webhook_url',
'teams_webhook_url',
'google_chat_webhook_url',
'webhook_url',
'sms_phone_number',
'opsgenie_api_key',
'pagerduty_integration_key',
]);
});
}
};
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('site_features', function (Blueprint $table) {
$table->id();
$table->foreignId('site_id')->constrained()->onDelete('cascade');
$table->string('feature_type'); // uptime, ssl, dns, broken_links, domain, sitemap, health_check, tcp_port
$table->boolean('is_enabled')->default(true);
$table->json('settings')->nullable(); // Feature-specific settings
$table->timestamp('last_checked_at')->nullable();
$table->timestamps();
$table->unique(['site_id', 'feature_type']);
$table->index('is_enabled');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('site_features');
}
};