Skip to content

Commit

Permalink
#405 - rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofrewak committed Mar 20, 2024
1 parent a829d4d commit 604c1a0
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 69 deletions.
2 changes: 1 addition & 1 deletion app/Domain/EmployeesMilestonesRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getUpcomingBirthdays(?string $searchText, string $direction = "a
->search($searchText)
->get();

return $users->sortBy(fn(User $user): int => (int) $user->upcomingBirthday()->diffInDays(Carbon::today()), descending: $direction !== "asc");
return $users->sortBy(fn(User $user): int => (int)$user->upcomingBirthday()->diffInDays(Carbon::today()), descending: $direction !== "asc");
}

public function getSeniority(?string $searchText, string $direction = "asc"): Collection
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"spatie/laravel-slack-slash-command": "1.12"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.12",
"blumilksoftware/codestyle": "^2.8",
"laravel/dusk": "^8.0",
"mockery/mockery": "^1.6",
Expand Down
164 changes: 157 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions config/sanctum.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
))),
"guard" => ["web"],
"expiration" => null,
'middleware' => [
'authenticate_session' => AuthenticateSession::class,
'encrypt_cookies' => EncryptCookies::class,
'validate_csrf_token' => ValidateCsrfToken::class,
"middleware" => [
"authenticate_session" => AuthenticateSession::class,
"encrypt_cookies" => EncryptCookies::class,
"validate_csrf_token" => ValidateCsrfToken::class,
],
];
Original file line number Diff line number Diff line change
@@ -1,70 +1,62 @@
<?php

declare(strict_types=1);

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.
*/
return new class() extends Migration {
public function getConnection(): string|null
{
return config('telescope.storage.database.connection');
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", function (Blueprint $table): void {
$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');
$schema->create("telescope_entries_tags", function (Blueprint $table): void {
$table->uuid("entry_uuid");
$table->string("tag");

$table->primary(['entry_uuid', 'tag']);
$table->index('tag');
$table->primary(["entry_uuid", "tag"]);
$table->index("tag");

$table->foreign('entry_uuid')
->references('uuid')
->on('telescope_entries')
->onDelete('cascade');
$table->foreign("entry_uuid")
->references("uuid")
->on("telescope_entries")
->onDelete("cascade");
});

$schema->create('telescope_monitoring', function (Blueprint $table) {
$table->string('tag')->primary();
$schema->create("telescope_monitoring", function (Blueprint $table): void {
$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');
$schema->dropIfExists("telescope_entries_tags");
$schema->dropIfExists("telescope_entries");
$schema->dropIfExists("telescope_monitoring");
}
};
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
return new class() extends Migration {
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');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$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();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');
Schema::dropIfExists("personal_access_tokens");
}
};

0 comments on commit 604c1a0

Please sign in to comment.