-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed8965b
commit 9ac5f9e
Showing
52 changed files
with
1,413 additions
and
108 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
database/migrations/2014_10_12_000000_create_users_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateUsersTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('users', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('name'); | ||
$table->string('email')->unique(); | ||
$table->string('password'); | ||
$table->rememberToken(); | ||
$table->string('profile_photo_path', 2048)->nullable(); | ||
$table->text('two_factor_secret')->nullable(); | ||
$table->text('two_factor_recovery_codes')->nullable(); | ||
$table->string('timezone')->default('UTC')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('users'); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
database/migrations/2014_10_12_100000_create_password_resets_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreatePasswordResetsTable extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('password_reset_tokens', function (Blueprint $table) { | ||
$table->string('email')->index(); | ||
$table->string('token'); | ||
$table->timestamp('created_at')->nullable(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('password_reset_tokens'); | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
database/migrations/2018_08_08_100000_create_telescope_entries_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Get the migration connection name. | ||
*/ | ||
public function getConnection(): ?string | ||
{ | ||
return config('telescope.storage.database.connection'); | ||
} | ||
|
||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
$schema = Schema::connection($this->getConnection()); | ||
|
||
$schema->create('telescope_entries', function (Blueprint $table) { | ||
$table->bigIncrements('sequence'); | ||
$table->uuid('uuid'); | ||
$table->uuid('batch_id'); | ||
$table->string('family_hash')->nullable(); | ||
$table->boolean('should_display_on_index')->default(true); | ||
$table->string('type', 20); | ||
$table->longText('content'); | ||
$table->dateTime('created_at')->nullable(); | ||
|
||
$table->unique('uuid'); | ||
$table->index('batch_id'); | ||
$table->index('family_hash'); | ||
$table->index('created_at'); | ||
$table->index(['type', 'should_display_on_index']); | ||
}); | ||
|
||
$schema->create('telescope_entries_tags', function (Blueprint $table) { | ||
$table->uuid('entry_uuid'); | ||
$table->string('tag'); | ||
|
||
$table->primary(['entry_uuid', 'tag']); | ||
$table->index('tag'); | ||
|
||
$table->foreign('entry_uuid') | ||
->references('uuid') | ||
->on('telescope_entries') | ||
->onDelete('cascade'); | ||
}); | ||
|
||
$schema->create('telescope_monitoring', function (Blueprint $table) { | ||
$table->string('tag')->primary(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
$schema = Schema::connection($this->getConnection()); | ||
|
||
$schema->dropIfExists('telescope_entries_tags'); | ||
$schema->dropIfExists('telescope_entries'); | ||
$schema->dropIfExists('telescope_monitoring'); | ||
} | ||
}; |
26 changes: 26 additions & 0 deletions
26
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('failed_jobs', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('uuid')->unique(); | ||
$table->text('connection'); | ||
$table->text('queue'); | ||
$table->longText('payload'); | ||
$table->longText('exception'); | ||
$table->timestamp('failed_at')->useCurrent(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('failed_jobs'); | ||
} | ||
}; |
27 changes: 27 additions & 0 deletions
27
database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('personal_access_tokens', function (Blueprint $table) { | ||
$table->id(); | ||
$table->morphs('tokenable'); | ||
$table->string('name'); | ||
$table->string('token', 64)->unique(); | ||
$table->text('abilities')->nullable(); | ||
$table->timestamp('last_used_at')->nullable(); | ||
$table->timestamp('expires_at')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('personal_access_tokens'); | ||
} | ||
}; |
25 changes: 25 additions & 0 deletions
25
database/migrations/2021_06_23_192743_create_sessions_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('sessions', function (Blueprint $table) { | ||
$table->string('id')->primary(); | ||
$table->foreignId('user_id')->nullable()->index(); | ||
$table->string('ip_address', 45)->nullable(); | ||
$table->text('user_agent')->nullable(); | ||
$table->text('payload'); | ||
$table->integer('last_activity')->index(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('sessions'); | ||
} | ||
}; |
38 changes: 38 additions & 0 deletions
38
database/migrations/2021_06_23_211827_create_servers_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('servers', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedBigInteger('user_id'); | ||
$table->string('name')->index(); | ||
$table->string('ssh_user')->nullable(); | ||
$table->ipAddress('ip')->index()->nullable(); | ||
$table->ipAddress('local_ip')->nullable(); | ||
$table->unsignedInteger('provider_id')->nullable(); | ||
$table->integer('port')->default(22); | ||
$table->string('os'); | ||
$table->string('type'); | ||
$table->json('type_data')->nullable(); | ||
$table->string('provider'); | ||
$table->json('provider_data')->nullable(); | ||
$table->longText('authentication')->nullable(); | ||
$table->longText('public_key')->nullable(); | ||
$table->string('status')->default('installing'); | ||
$table->integer('progress')->default(0); | ||
$table->string('progress_step')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('servers'); | ||
} | ||
}; |
30 changes: 30 additions & 0 deletions
30
database/migrations/2021_06_23_214143_create_services_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use App\Enums\ServiceStatus; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('services', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedBigInteger('server_id'); | ||
$table->string('type'); | ||
$table->json('type_data')->nullable(); | ||
$table->string('name'); | ||
$table->string('version'); | ||
$table->string('status')->default(ServiceStatus::INSTALLING); | ||
$table->boolean('is_default')->default(1); | ||
$table->string('unit')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('services'); | ||
} | ||
}; |
26 changes: 26 additions & 0 deletions
26
database/migrations/2021_06_25_102220_create_jobs_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('jobs', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('queue')->index(); | ||
$table->longText('payload'); | ||
$table->integer('attempts'); | ||
$table->integer('reserved_at')->nullable(); | ||
$table->integer('available_at'); | ||
$table->integer('created_at'); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('jobs'); | ||
} | ||
}; |
26 changes: 26 additions & 0 deletions
26
database/migrations/2021_06_25_124831_create_server_logs_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('server_logs', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedBigInteger('server_id'); | ||
$table->unsignedBigInteger('site_id')->nullable(); | ||
$table->string('type'); | ||
$table->string('name'); | ||
$table->string('disk'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('server_logs'); | ||
} | ||
}; |
35 changes: 35 additions & 0 deletions
35
database/migrations/2021_06_26_211903_create_sites_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('sites', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedBigInteger('server_id')->index(); | ||
$table->string('type'); | ||
$table->json('type_data')->nullable(); | ||
$table->string('domain')->index(); | ||
$table->json('aliases')->nullable(); | ||
$table->string('web_directory')->nullable(); | ||
$table->string('path'); | ||
$table->string('php_version')->nullable(); | ||
$table->string('source_control')->nullable(); | ||
$table->string('repository')->nullable(); | ||
$table->string('branch')->nullable(); | ||
$table->integer('port')->nullable(); | ||
$table->string('status')->default('installing'); | ||
$table->integer('progress')->default(0)->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('sites'); | ||
} | ||
}; |
24 changes: 24 additions & 0 deletions
24
database/migrations/2021_06_28_085814_create_source_controls_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('source_controls', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('provider'); | ||
$table->json('provider_data')->nullable(); | ||
$table->longText('access_token')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('source_controls'); | ||
} | ||
}; |
Oops, something went wrong.