bigIncrements('id'); $t->foreignId('device_id')->constrained('devices')->cascadeOnDelete(); $t->string('metric',60); $t->decimal('value',10,3)->nullable(); $t->string('value_text',50)->nullable(); $t->timestamp('recorded_at',3); $t->index(['device_id','metric','recorded_at'],'idx_dmt'); $t->index('recorded_at','idx_rec'); }); } public function down(): void { Schema::dropIfExists('readings'); } };