2026-01-15 01:13:44 +00:00
|
|
|
<?php
|
|
|
|
|
|
refactor: settings redesign, Spanish translations, language system, strict_types
Settings pages:
- Redesign layout to match Sendkit (max-w-4xl, space-y-12, Separator sections)
- Merge Members page into Workspace settings with Table, invite Dialog, ConfirmDeleteModal
- Add workspace logo upload/delete routes and controller methods
- Translate all hardcoded strings in Workspace.vue modals
Language system:
- Drop languages table, replace language_id FK with locale string column on users
- Create config/languages.php for available languages and default locale
- Add Spanish (es) translations (13 files)
- Simplify HandleInertiaRequests, ProfileController, RegisteredUserController
Code quality:
- Add declare(strict_types=1) to all PHP files
- Fix MastodonPublisher using wrong attribute (filename -> original_filename)
- Fix HasMediaTest for new has_photo/photo_url accessors
- Fix PublishToSocialPlatformTest type error revealed by strict_types
- Remove orphaned Language model from AppServiceProvider morph map
- Update User TypeScript interface (has_photo, photo_url, locale)
- Eager load media relation on workspaces to prevent N+1
- Add 8 new tests for workspace logo upload/delete
- Update workspace settings test to assert members/invitations props
All 710 tests passing.
2026-03-30 03:20:43 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-01-15 01:13:44 +00:00
|
|
|
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
|
|
|
|
|
{
|
2026-01-18 16:10:01 +00:00
|
|
|
Schema::create('languages', function (Blueprint $table) {
|
|
|
|
|
$table->uuid('id')->primary();
|
|
|
|
|
$table->string('name');
|
2026-01-18 22:56:04 +00:00
|
|
|
$table->string('code');
|
2026-01-18 16:10:01 +00:00
|
|
|
$table->timestamps();
|
|
|
|
|
});
|
|
|
|
|
|
2026-01-15 01:13:44 +00:00
|
|
|
Schema::create('users', function (Blueprint $table) {
|
|
|
|
|
$table->uuid('id')->primary();
|
|
|
|
|
$table->string('name');
|
|
|
|
|
$table->string('email')->unique();
|
|
|
|
|
$table->timestamp('email_verified_at')->nullable();
|
2026-05-03 20:42:44 +00:00
|
|
|
$table->string('password')->nullable();
|
|
|
|
|
$table->string('google_id')->nullable()->unique();
|
2026-01-15 01:13:44 +00:00
|
|
|
$table->text('two_factor_secret')->nullable();
|
|
|
|
|
$table->text('two_factor_recovery_codes')->nullable();
|
|
|
|
|
$table->timestamp('two_factor_confirmed_at')->nullable();
|
|
|
|
|
$table->rememberToken();
|
2026-04-15 01:22:04 +00:00
|
|
|
$table->uuid('account_id')->nullable();
|
2026-01-17 02:46:30 +00:00
|
|
|
$table->uuid('current_workspace_id')->nullable();
|
2026-01-18 16:10:01 +00:00
|
|
|
$table->uuid('language_id')->nullable();
|
2026-01-15 01:13:44 +00:00
|
|
|
$table->timestamps();
|
2026-01-18 16:10:01 +00:00
|
|
|
|
|
|
|
|
$table->foreign('language_id')->references('id')->on('languages')->nullOnDelete();
|
2026-01-15 01:13:44 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
|
|
|
|
$table->string('email')->primary();
|
|
|
|
|
$table->string('token');
|
|
|
|
|
$table->timestamp('created_at')->nullable();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Schema::create('sessions', function (Blueprint $table) {
|
|
|
|
|
$table->string('id')->primary();
|
|
|
|
|
$table->uuid('user_id')->nullable()->index();
|
|
|
|
|
$table->string('ip_address', 45)->nullable();
|
|
|
|
|
$table->text('user_agent')->nullable();
|
|
|
|
|
$table->longText('payload');
|
|
|
|
|
$table->integer('last_activity')->index();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*/
|
|
|
|
|
public function down(): void
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('sessions');
|
2026-01-18 16:10:01 +00:00
|
|
|
Schema::dropIfExists('password_reset_tokens');
|
|
|
|
|
Schema::dropIfExists('users');
|
|
|
|
|
Schema::dropIfExists('languages');
|
2026-01-15 01:13:44 +00:00
|
|
|
}
|
|
|
|
|
};
|