move to uuids for portfolios, users, and all market data

This commit is contained in:
hackerESQ
2024-08-07 12:43:49 -05:00
parent 45b3800389
commit 4a2da61fa6
13 changed files with 47 additions and 116 deletions
@@ -15,10 +15,10 @@ class CreateTransactionsTable extends Migration
public function up()
{
Schema::create('transactions', function (Blueprint $table) {
$table->id();
$table->string('symbol');
$table->uuid('id')->primary();
$table->string('symbol', 15);
$table->foreignIdFor(Portfolio::class, 'portfolio_id')->onDelete('cascade');
$table->string('transaction_type');
$table->string('transaction_type', 15);
$table->float('quantity', 12, 4);
$table->float('cost_basis', 12, 4);
$table->float('sale_price', 12, 4)->nullable();