diff --git a/config/database.php b/config/database.php index 42ecfe2..bdaf8b9 100644 --- a/config/database.php +++ b/config/database.php @@ -1,5 +1,7 @@ [ + 'types' => [ + 'timestamp' => TimestampType::class, + ], + ], + ]; diff --git a/database/migrations/2025_11_13_171048_fix_coupon_nullable_fields.php b/database/migrations/2025_11_13_171048_fix_coupon_nullable_fields.php new file mode 100644 index 0000000..adaa2b3 --- /dev/null +++ b/database/migrations/2025_11_13_171048_fix_coupon_nullable_fields.php @@ -0,0 +1,35 @@ +timestamp('coupon_createdate')->useCurrent()->change(); + $table->integer('coupon_limitquantity')->nullable()->default(null)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('coupon', function (Blueprint $table) { + $table->integer('coupon_limitquantity')->nullable(false)->default(1)->change(); + }); + } +}