| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- use App\Database\Migrations\TenantMigration;
- return new class extends TenantMigration
- {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('company_rates', function (Blueprint $table) {
- $table->id();
- $table->unsignedBigInteger('company_id')->nullable();
- $table->foreign('company_id')->nullable()->references('id')->on('companies')->onUpdate('cascade')->onDelete('cascade');
- $table->decimal('amount', total: 8, places: 2);
- $table->string('type')->nullable();
- $table->string('group')->nullable();
- $table->text('description')->nullable();
- $table->boolean('enabled')->default(1);
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('company_rates');
- }
- };
|