diff --git a/database/migrations/2025_06_12_034045_drop_caculated_scores_table.php b/database/migrations/2025_06_12_034045_drop_caculated_scores_table.php new file mode 100644 index 0000000..5dd6b4d --- /dev/null +++ b/database/migrations/2025_06_12_034045_drop_caculated_scores_table.php @@ -0,0 +1,31 @@ +id(); + $table->foreignIdFor(Entry::class)->constrained()->cascadeOnDelete()->cascadeOnUpdate(); + $table->string('mode'); + $table->json('calculatedScore'); + $table->timestamps(); + }); + } +}; diff --git a/database/migrations/2025_06_12_034242_create_total_scores_table.php b/database/migrations/2025_06_12_034242_create_total_scores_table.php new file mode 100644 index 0000000..0c5d89d --- /dev/null +++ b/database/migrations/2025_06_12_034242_create_total_scores_table.php @@ -0,0 +1,32 @@ +id(); + $table->foreignIdFor(Entry::class)->constrained()->cascadeOnDelete()->cascadeOnUpdate(); + $table->decimal('seating_total', 9, 6)->after('subscores'); + $table->decimal('advancement_total', 9, 6)->after('seating_total'); + $table->json('subscore_totals'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('total_scores'); + } +};