feat: stats
This commit is contained in:
@@ -12,7 +12,7 @@ return new class extends Migration
|
||||
{
|
||||
$connection = (new HealthCheckResultHistoryItem)->getConnectionName();
|
||||
$tableName = EloquentHealthResultStore::getHistoryItemInstance()->getTable();
|
||||
|
||||
|
||||
Schema::connection($connection)->create($tableName, function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
@@ -27,7 +27,7 @@ return new class extends Migration
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
|
||||
Schema::connection($connection)->table($tableName, function (Blueprint $table) {
|
||||
$table->index('created_at');
|
||||
$table->index('batch');
|
||||
|
||||
@@ -4,18 +4,19 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('meal_posts', function (Blueprint $table) {
|
||||
$table->ulid('id')->primary();
|
||||
$table->ulid('id')->primary();
|
||||
$table->foreignUlid('user_id')->constrained('users')->cascadeOnDelete();
|
||||
$table->string('image_url', 2048);
|
||||
$table->text('caption')->nullable();
|
||||
$table->integer('calories')->nullable();
|
||||
$table->decimal('proteins',8,2)->nullable();
|
||||
$table->decimal('carbs',8,2)->nullable();
|
||||
$table->decimal('fats',8,2)->nullable();
|
||||
$table->decimal('proteins', 8, 2)->nullable();
|
||||
$table->decimal('carbs', 8, 2)->nullable();
|
||||
$table->decimal('fats', 8, 2)->nullable();
|
||||
$table->string('title');
|
||||
$table->timestamp('eaten_at');
|
||||
$table->timestamps();
|
||||
|
||||
Reference in New Issue
Block a user