Skip to content

A free open source IT asset/license management system

Added migrations

snipe932a54572572
diff --git a/database/migrations/2026_07_17_000001_change_maintenance_dates_to_datetime.php b/database/migrations/2026_07_17_000001_change_maintenance_dates_to_datetime.php
new file mode 100644
index 0000000000..c75ffb4b89
--- /dev/null
+++ b/database/migrations/2026_07_17_000001_change_maintenance_dates_to_datetime.php
@@ -0,0 +1,24 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ public function up(): void
+ {
+ Schema::table('maintenances', function (Blueprint $table) {
+ $table->dateTime('start_date')->change();
+ $table->dateTime('completion_date')->nullable()->change();
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('maintenances', function (Blueprint $table) {
+ $table->date('start_date')->change();
+ $table->date('completion_date')->nullable()->change();
+ });
+ }
+};
diff --git a/database/migrations/2026_07_17_000002_change_expected_checkin_to_datetime.php b/database/migrations/2026_07_17_000002_change_expected_checkin_to_datetime.php
new file mode 100644
index 0000000000..91e45b945e
--- /dev/null
+++ b/database/migrations/2026_07_17_000002_change_expected_checkin_to_datetime.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ public function up(): void
+ {
+ Schema::table('assets', function (Blueprint $table) {
+ $table->dateTime('expected_checkin')->nullable()->change();
+ });
+
+ Schema::table('action_logs', function (Blueprint $table) {
+ $table->dateTime('expected_checkin')->nullable()->change();
+ });
+
+ // asset_logs is a legacy table (superseded by action_logs since 2016)
+ // and is not referenced by any app code, so we leave it alone.
+ }
+
+ public function down(): void
+ {
+ Schema::table('assets', function (Blueprint $table) {
+ $table->date('expected_checkin')->nullable()->change();
+ });
+
+ Schema::table('action_logs', function (Blueprint $table) {
+ $table->date('expected_checkin')->nullable()->change();
+ });
+ }
+};