47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
|
|
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
|
|
{
|
|
if(!Schema::hasTable('moon_mining_tax')) {
|
|
Schema::create('moon_mining_tax', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('moon_id');
|
|
$table->string('name');
|
|
$table->decimal('worth', 20, 2);
|
|
$table->decimal('tax_bracket', 5, 2);
|
|
$table->decimal('tax_amount', 20, 2);
|
|
$table->dateTime('rental_end');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
|
|
if(!Schema::hasTable('mining_tax')) {
|
|
Schema::create('mining_tax', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('character_id');
|
|
$table->string('character_name');
|
|
$table->dateTime('month_end');
|
|
$table->decimal('amount', 20, 2);
|
|
});
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('moon_mining_tax');
|
|
}
|
|
};
|