Skip to content

A free open source IT asset/license management system

Added migrations

snipe4975733a7d54
diff --git a/database/migrations/2026_08_20_000000_add_requestable_to_components_table.php b/database/migrations/2026_08_20_000000_add_requestable_to_components_table.php
new file mode 100644
index 0000000000..190bd7a2c7
--- /dev/null
+++ b/database/migrations/2026_08_20_000000_add_requestable_to_components_table.php
@@ -0,0 +1,27 @@
+<?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('components', function (Blueprint $table) {
+ if (! Schema::hasColumn('components', 'requestable')) {
+ $table->tinyInteger('requestable')->default(0);
+ }
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('components', function (Blueprint $table) {
+ if (Schema::hasColumn('components', 'requestable')) {
+ $table->dropColumn('requestable');
+ }
+ });
+ }
+};
diff --git a/database/migrations/2026_08_20_010000_add_reservation_dates_to_checkout_requests.php b/database/migrations/2026_08_20_010000_add_reservation_dates_to_checkout_requests.php
new file mode 100644
index 0000000000..57c63f3b52
--- /dev/null
+++ b/database/migrations/2026_08_20_010000_add_reservation_dates_to_checkout_requests.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('checkout_requests', function (Blueprint $table) {
+ if (! Schema::hasColumn('checkout_requests', 'start_date')) {
+ $table->date('start_date')->nullable()->after('quantity');
+ }
+ if (! Schema::hasColumn('checkout_requests', 'end_date')) {
+ $table->date('end_date')->nullable()->after('start_date');
+ }
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('checkout_requests', function (Blueprint $table) {
+ if (Schema::hasColumn('checkout_requests', 'end_date')) {
+ $table->dropColumn('end_date');
+ }
+ if (Schema::hasColumn('checkout_requests', 'start_date')) {
+ $table->dropColumn('start_date');
+ }
+ });
+ }
+};
diff --git a/database/migrations/2026_08_20_020000_add_requestable_to_licenses_table.php b/database/migrations/2026_08_20_020000_add_requestable_to_licenses_table.php
new file mode 100644
index 0000000000..6d40fa17ee
--- /dev/null
+++ b/database/migrations/2026_08_20_020000_add_requestable_to_licenses_table.php
@@ -0,0 +1,27 @@
+<?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('licenses', function (Blueprint $table) {
+ if (! Schema::hasColumn('licenses', 'requestable')) {
+ $table->tinyInteger('requestable')->default(0);
+ }
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::table('licenses', function (Blueprint $table) {
+ if (Schema::hasColumn('licenses', 'requestable')) {
+ $table->dropColumn('requestable');
+ }
+ });
+ }
+};