Files
investbrain/database/migrations/2021_02_25_041236_create_dividends_table.php
T
2024-08-10 13:30:34 -05:00

36 lines
781 B
PHP

<?php
use App\Models\MarketData;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDividendsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('dividends', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->date('date');
$table->foreignIdFor(MarketData::class, 'symbol');
$table->float('dividend_amount', 12, 4);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('dividends');
}
}