SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'Walking' for column 'excercise_type' at row 1
public function up()
{
Schema::table('diabetic_records', function (Blueprint $table) {
$table->unsignedInteger('user_id')->nullable()->after('id');
$table->decimal('glucose_level',5,2)->nullable()->after('user_id');
$table->string('glucose_level_time')->nullable()->after('glucose_level');
$table->string('food_name')->nullable()->after('glucose_level_time');
$table->integer('food_amount')->nullable()->after('food_name');
$table->string('treatment')->nullable()->after('food_amount');
$table->string('medication_name')->nullable()->after('treatment');
$table->decimal('medication_dose',6,2)->nullable()->after('medication_name');
$table->string('medication_time')->nullable()->after('medication_dose');
$table->integer('excercise_type')->nullable()->after('medication_time');
$table->integer('excercise_duration')->nullable()->after('excercise_type');
});
}
1366is not a valid date/time, andWalkingis not an integer. You're either trying to insert incorrect data, or you're trying to change a column type for a table that already contains data that doesn't match the new column type. - rickdenhaan