Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2023_10_11_210415_create_localizations_table.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. */
  10. public function up(): void
  11. {
  12. Schema::create('localizations', function (Blueprint $table) {
  13. $table->id();
  14. $table->foreignId('company_id')->constrained()->cascadeOnDelete();
  15. $table->string('language')->default('en');
  16. $table->string('timezone')->nullable();
  17. $table->string('date_format')->default('M j, Y');
  18. $table->string('time_format')->default('g:i A');
  19. $table->unsignedTinyInteger('fiscal_year_end_month')->default(12);
  20. $table->unsignedTinyInteger('fiscal_year_end_day')->default(31);
  21. $table->unsignedTinyInteger('week_start')->default(1);
  22. $table->string('number_format')->default('comma_dot');
  23. $table->boolean('percent_first')->default(false);
  24. $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
  25. $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. */
  32. public function down(): void
  33. {
  34. Schema::dropIfExists('localizations');
  35. }
  36. };