mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -8,7 +8,7 @@ class CreateUsersTable extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
Schema::create('users', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
|
@ -8,7 +8,7 @@ class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table): void {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
|
@ -21,7 +21,7 @@ public function up(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->create('telescope_entries', function (Blueprint $table) {
|
||||
$schema->create('telescope_entries', function (Blueprint $table): void {
|
||||
$table->bigIncrements('sequence');
|
||||
$table->uuid('uuid');
|
||||
$table->uuid('batch_id');
|
||||
@ -38,7 +38,7 @@ public function up(): void
|
||||
$table->index(['type', 'should_display_on_index']);
|
||||
});
|
||||
|
||||
$schema->create('telescope_entries_tags', function (Blueprint $table) {
|
||||
$schema->create('telescope_entries_tags', function (Blueprint $table): void {
|
||||
$table->uuid('entry_uuid');
|
||||
$table->string('tag');
|
||||
|
||||
@ -51,7 +51,7 @@ public function up(): void
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
$schema->create('telescope_monitoring', function (Blueprint $table) {
|
||||
$schema->create('telescope_monitoring', function (Blueprint $table): void {
|
||||
$table->string('tag')->primary();
|
||||
});
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
Schema::create('failed_jobs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
Schema::create('sessions', function (Blueprint $table): void {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('servers', function (Blueprint $table) {
|
||||
Schema::create('servers', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->string('name')->index();
|
||||
|
@ -9,7 +9,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('services', function (Blueprint $table) {
|
||||
Schema::create('services', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->string('type');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
Schema::create('jobs', function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('server_logs', function (Blueprint $table) {
|
||||
Schema::create('server_logs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->unsignedBigInteger('site_id')->nullable();
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sites', function (Blueprint $table) {
|
||||
Schema::create('sites', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id')->index();
|
||||
$table->string('type');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('source_controls', function (Blueprint $table) {
|
||||
Schema::create('source_controls', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('provider');
|
||||
$table->json('provider_data')->nullable();
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('deployments', function (Blueprint $table) {
|
||||
Schema::create('deployments', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('site_id');
|
||||
$table->unsignedBigInteger('deployment_script_id');
|
||||
|
@ -9,7 +9,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('databases', function (Blueprint $table) {
|
||||
Schema::create('databases', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->string('name');
|
||||
|
@ -9,7 +9,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('database_users', function (Blueprint $table) {
|
||||
Schema::create('database_users', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->string('username');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('firewall_rules', function (Blueprint $table) {
|
||||
Schema::create('firewall_rules', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->string('type');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cron_jobs', function (Blueprint $table) {
|
||||
Schema::create('cron_jobs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->text('command');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('deployment_scripts', function (Blueprint $table) {
|
||||
Schema::create('deployment_scripts', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('site_id');
|
||||
$table->string('name')->nullable();
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ssls', function (Blueprint $table) {
|
||||
Schema::create('ssls', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('site_id');
|
||||
$table->string('type')->default('letsencrypt');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('redirects', function (Blueprint $table) {
|
||||
Schema::create('redirects', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('site_id');
|
||||
$table->integer('mode');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('queues', function (Blueprint $table) {
|
||||
Schema::create('queues', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedInteger('server_id')->nullable();
|
||||
$table->unsignedBigInteger('site_id');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ssh_keys', function (Blueprint $table) {
|
||||
Schema::create('ssh_keys', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->string('name');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('server_ssh_keys', function (Blueprint $table) {
|
||||
Schema::create('server_ssh_keys', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->unsignedBigInteger('ssh_key_id');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('git_hooks', function (Blueprint $table) {
|
||||
Schema::create('git_hooks', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('site_id');
|
||||
$table->unsignedBigInteger('source_control_id');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('server_providers', function (Blueprint $table) {
|
||||
Schema::create('server_providers', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->string('profile')->nullable();
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('scripts', function (Blueprint $table) {
|
||||
Schema::create('scripts', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->string('name');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('script_executions', function (Blueprint $table) {
|
||||
Schema::create('script_executions', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('script_id');
|
||||
$table->unsignedBigInteger('server_id');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('notification_channels', function (Blueprint $table) {
|
||||
Schema::create('notification_channels', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('provider');
|
||||
$table->string('label');
|
||||
|
@ -8,7 +8,7 @@ class CreateStorageProvidersTable extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('storage_providers', function (Blueprint $table) {
|
||||
Schema::create('storage_providers', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('provider');
|
||||
$table->string('label')->nullable();
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('backups', function (Blueprint $table) {
|
||||
Schema::create('backups', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('type');
|
||||
$table->string('name');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('backup_files', function (Blueprint $table) {
|
||||
Schema::create('backup_files', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedInteger('backup_id');
|
||||
$table->string('name');
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->longText('ssh_key')->nullable()->after('repository');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->dropColumn('ssh_key');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->string('url')->nullable()->after('provider');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->dropColumn('url');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->string('profile')->after('provider')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->dropColumn('profile');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('source_control_id')->nullable()->after('source_control');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->dropColumn('source_control_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,25 +8,25 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('storage_providers', function (Blueprint $table) {
|
||||
Schema::table('storage_providers', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('user_id')->after('id');
|
||||
$table->string('profile')->after('user_id');
|
||||
$table->longText('credentials')->nullable()->after('provider');
|
||||
});
|
||||
Schema::table('storage_providers', function (Blueprint $table) {
|
||||
Schema::table('storage_providers', function (Blueprint $table): void {
|
||||
$table->dropColumn(['token', 'refresh_token', 'token_expires_at', 'label', 'connected']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('storage_providers', function (Blueprint $table) {
|
||||
Schema::table('storage_providers', function (Blueprint $table): void {
|
||||
$table->string('token')->nullable();
|
||||
$table->string('refresh_token')->nullable();
|
||||
$table->string('token_expires_at')->nullable();
|
||||
$table->string('label')->nullable();
|
||||
});
|
||||
Schema::table('storage_providers', function (Blueprint $table) {
|
||||
Schema::table('storage_providers', function (Blueprint $table): void {
|
||||
$table->dropColumn(['user_id', 'profile', 'credentials']);
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('backups', function (Blueprint $table) {
|
||||
Schema::table('backups', function (Blueprint $table): void {
|
||||
$table->dropColumn('name');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('backups', function (Blueprint $table) {
|
||||
Schema::table('backups', function (Blueprint $table): void {
|
||||
$table->string('name')->nullable();
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('backup_files', function (Blueprint $table) {
|
||||
Schema::table('backup_files', function (Blueprint $table): void {
|
||||
$table->string('restored_to')->after('status')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('backup_files', function (Blueprint $table) {
|
||||
Schema::table('backup_files', function (Blueprint $table): void {
|
||||
$table->dropColumn('restored_to');
|
||||
});
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->timestamp('two_factor_confirmed_at')
|
||||
->after('two_factor_recovery_codes')
|
||||
->nullable();
|
||||
@ -23,7 +23,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropColumn([
|
||||
'two_factor_confirmed_at',
|
||||
]);
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('projects', function (Blueprint $table) {
|
||||
Schema::create('projects', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->bigInteger('user_id');
|
||||
$table->string('name');
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
Schema::table('servers', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('project_id')->nullable()->after('id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
Schema::table('servers', function (Blueprint $table): void {
|
||||
$table->dropColumn('project_id');
|
||||
});
|
||||
}
|
||||
|
@ -9,10 +9,10 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('current_project_id')->nullable()->after('timezone');
|
||||
});
|
||||
User::query()->each(function (User $user) {
|
||||
User::query()->each(function (User $user): void {
|
||||
$project = $user->createDefaultProject();
|
||||
$user->servers()->update(['project_id' => $project->id]);
|
||||
});
|
||||
@ -20,7 +20,7 @@ public function up(): void
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropColumn('current_project_id');
|
||||
});
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('server_logs', function (Blueprint $table) {
|
||||
Schema::table('server_logs', function (Blueprint $table): void {
|
||||
$table->boolean('is_remote')->default(false);
|
||||
});
|
||||
}
|
||||
@ -21,7 +21,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('server_logs', function (Blueprint $table) {
|
||||
Schema::table('server_logs', function (Blueprint $table): void {
|
||||
$table->dropColumn('is_remote');
|
||||
});
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('metrics', function (Blueprint $table) {
|
||||
Schema::create('metrics', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('server_id');
|
||||
$table->decimal('load', 5, 2);
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->string('role')->default(UserRole::USER);
|
||||
});
|
||||
User::query()->update(['role' => UserRole::ADMIN]);
|
||||
@ -24,7 +24,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropColumn('role');
|
||||
});
|
||||
}
|
||||
|
@ -13,16 +13,16 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('user_project', function (Blueprint $table) {
|
||||
Schema::create('user_project', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->unsignedBigInteger('project_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
Project::all()->each(function (Project $project) {
|
||||
Project::all()->each(function (Project $project): void {
|
||||
$project->users()->attach($project->user_id);
|
||||
});
|
||||
User::all()->each(function (User $user) {
|
||||
User::all()->each(function (User $user): void {
|
||||
$user->current_project_id = $user->projects()->first()?->id;
|
||||
$user->save();
|
||||
});
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('projects', function (Blueprint $table) {
|
||||
Schema::table('projects', function (Blueprint $table): void {
|
||||
$table->dropColumn('user_id');
|
||||
});
|
||||
}
|
||||
@ -21,7 +21,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('projects', function (Blueprint $table) {
|
||||
Schema::table('projects', function (Blueprint $table): void {
|
||||
$table->bigInteger('user_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('project_id')->nullable();
|
||||
});
|
||||
}
|
||||
@ -21,7 +21,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->dropColumn('project_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
Schema::table('servers', function (Blueprint $table): void {
|
||||
$table->integer('updates')->default(0);
|
||||
$table->timestamp('last_update_check')->nullable();
|
||||
});
|
||||
@ -16,7 +16,7 @@ public function up(): void
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
Schema::table('servers', function (Blueprint $table): void {
|
||||
$table->dropColumn('updates');
|
||||
$table->dropColumn('last_update_check');
|
||||
});
|
||||
|
@ -10,7 +10,7 @@ public function up(): void
|
||||
{
|
||||
Schema::dropIfExists('script_executions');
|
||||
|
||||
Schema::create('script_executions', function (Blueprint $table) {
|
||||
Schema::create('script_executions', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('script_id');
|
||||
$table->unsignedBigInteger('server_log_id')->nullable();
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('notification_channels', function (Blueprint $table) {
|
||||
Schema::table('notification_channels', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('project_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('notification_channels', function (Blueprint $table) {
|
||||
Schema::table('notification_channels', function (Blueprint $table): void {
|
||||
$table->dropColumn('project_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('storage_providers', function (Blueprint $table) {
|
||||
Schema::table('storage_providers', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('project_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('storage_providers', function (Blueprint $table) {
|
||||
Schema::table('storage_providers', function (Blueprint $table): void {
|
||||
$table->dropColumn('project_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('server_providers', function (Blueprint $table) {
|
||||
Schema::table('server_providers', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('project_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('server_providers', function (Blueprint $table) {
|
||||
Schema::table('server_providers', function (Blueprint $table): void {
|
||||
$table->dropColumn('project_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tags', function (Blueprint $table) {
|
||||
Schema::create('tags', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('project_id');
|
||||
$table->string('name');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('taggables', function (Blueprint $table) {
|
||||
Schema::create('taggables', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('tag_id');
|
||||
$table->unsignedBigInteger('taggable_id');
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('databases', function (Blueprint $table) {
|
||||
Schema::table('databases', function (Blueprint $table): void {
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('databases', function (Blueprint $table) {
|
||||
Schema::table('databases', function (Blueprint $table): void {
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('source_controls', function (Blueprint $table) {
|
||||
Schema::table('source_controls', function (Blueprint $table): void {
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('ssls', function (Blueprint $table) {
|
||||
Schema::table('ssls', function (Blueprint $table): void {
|
||||
$table->unsignedInteger('log_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('ssls', function (Blueprint $table) {
|
||||
Schema::table('ssls', function (Blueprint $table): void {
|
||||
$table->dropColumn('log_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('ssh_keys', function (Blueprint $table) {
|
||||
Schema::table('ssh_keys', function (Blueprint $table): void {
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('ssh_keys', function (Blueprint $table) {
|
||||
Schema::table('ssh_keys', function (Blueprint $table): void {
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('scripts', function (Blueprint $table) {
|
||||
Schema::table('scripts', function (Blueprint $table): void {
|
||||
$table->unsignedInteger('project_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('scripts', function (Blueprint $table) {
|
||||
Schema::table('scripts', function (Blueprint $table): void {
|
||||
$table->dropColumn('project_id');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('script_executions', function (Blueprint $table) {
|
||||
Schema::table('script_executions', function (Blueprint $table): void {
|
||||
$table->unsignedInteger('server_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('script_executions', function (Blueprint $table) {
|
||||
Schema::table('script_executions', function (Blueprint $table): void {
|
||||
$table->dropColumn('server_id');
|
||||
});
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->string('user')->default(config('core.ssh_user'));
|
||||
});
|
||||
}
|
||||
@ -21,7 +21,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->dropColumn('user');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->boolean('force_ssl')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sites', function (Blueprint $table) {
|
||||
Schema::table('sites', function (Blueprint $table): void {
|
||||
$table->dropColumn('force_ssl');
|
||||
});
|
||||
}
|
||||
|
@ -8,14 +8,14 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('ssls', function (Blueprint $table) {
|
||||
Schema::table('ssls', function (Blueprint $table): void {
|
||||
$table->string('email')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('ssls', function (Blueprint $table) {
|
||||
Schema::table('ssls', function (Blueprint $table): void {
|
||||
$table->dropColumn('email');
|
||||
});
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('load_balancer_servers', function (Blueprint $table) {
|
||||
Schema::create('load_balancer_servers', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('load_balancer_id');
|
||||
$table->string('ip');
|
||||
|
@ -10,13 +10,13 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('ssls', function (Blueprint $table) {
|
||||
Schema::table('ssls', function (Blueprint $table): void {
|
||||
$table->boolean('is_active')->default(false);
|
||||
$table->string('certificate_path')->nullable();
|
||||
$table->string('pk_path')->nullable();
|
||||
$table->string('ca_path')->nullable();
|
||||
});
|
||||
Site::query()->chunk(100, function ($sites) {
|
||||
Site::query()->chunk(100, function ($sites): void {
|
||||
foreach ($sites as $site) {
|
||||
foreach ($site->ssls as $ssl) {
|
||||
if ($ssl->type === SslType::LETSENCRYPT) {
|
||||
@ -44,7 +44,7 @@ public function up(): void
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('ssls', function (Blueprint $table) {
|
||||
Schema::table('ssls', function (Blueprint $table): void {
|
||||
$table->dropColumn('is_active');
|
||||
$table->dropColumn('certificate_path');
|
||||
$table->dropColumn('pk_path');
|
||||
|
@ -8,7 +8,7 @@
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('files', function (Blueprint $table) {
|
||||
Schema::create('files', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->unsignedBigInteger('server_id');
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('firewall_rules', function (Blueprint $table) {
|
||||
Schema::table('firewall_rules', function (Blueprint $table): void {
|
||||
$table->string('name')->default('Undefined')->after('id');
|
||||
$table->ipAddress('source')->default(null)->nullable()->change();
|
||||
});
|
||||
@ -31,7 +31,7 @@ public function down(): void
|
||||
DB::statement("UPDATE firewall_rules SET source = '0.0.0.0' WHERE source is null");
|
||||
DB::statement("UPDATE firewall_rules SET mask = '0' WHERE mask is null");
|
||||
|
||||
Schema::table('firewall_rules', function (Blueprint $table) {
|
||||
Schema::table('firewall_rules', function (Blueprint $table): void {
|
||||
$table->dropColumn('name');
|
||||
$table->ipAddress('source')->default('0.0.0.0')->change();
|
||||
});
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('databases', function (Blueprint $table) {
|
||||
Schema::table('databases', function (Blueprint $table): void {
|
||||
$table->string('collation')->nullable();
|
||||
$table->string('charset')->nullable();
|
||||
});
|
||||
@ -42,7 +42,7 @@ public function up(): void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('databases', function (Blueprint $table) {
|
||||
Schema::table('databases', function (Blueprint $table): void {
|
||||
$table->dropColumn('collation');
|
||||
$table->dropColumn('charset');
|
||||
});
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('commands', function (Blueprint $table) {
|
||||
Schema::create('commands', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedInteger('site_id');
|
||||
$table->string('name');
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('command_executions', function (Blueprint $table) {
|
||||
Schema::create('command_executions', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('command_id');
|
||||
$table->unsignedInteger('server_id');
|
||||
|
Reference in New Issue
Block a user