2024_07_24_094500_create_configuration_table.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('configuration', function (Blueprint $table) {
  15. $table->id();
  16. $table->string('logo')->nullable();
  17. $table->string('name')->nullable();
  18. $table->string('address')->nullable();
  19. $table->string('countrry')->nullable();
  20. $table->string('province')->nullable();
  21. $table->string('fiscal_code')->nullable();
  22. $table->string('vat')->nullable();
  23. $table->integer('fiscal_year_month_from')->defaulut(1);
  24. $table->integer('fiscal_year_month_to')->default(12);
  25. $table->unsignedBigInteger('subscription_causal_id')->nullable();
  26. $table->foreign('subscription_causal_id')->nullable()->references('id')->on('causals')->onUpdate('cascade')->onDelete('cascade');
  27. $table->softDeletes();
  28. $table->timestamps();
  29. });
  30. }
  31. /**
  32. * Reverse the migrations.
  33. *
  34. * @return void
  35. */
  36. public function down()
  37. {
  38. Schema::dropIfExists('configuration');
  39. }
  40. };