diff --git a/database/migrations/2026_06_19_000000_update_productos_tenant_reference_to_codigo.php b/database/migrations/2026_06_19_000000_update_productos_tenant_reference_to_codigo.php index 5c1d3b4..500c8ee 100644 --- a/database/migrations/2026_06_19_000000_update_productos_tenant_reference_to_codigo.php +++ b/database/migrations/2026_06_19_000000_update_productos_tenant_reference_to_codigo.php @@ -27,7 +27,9 @@ return new class extends Migration public function down(): void { Schema::table('productos', function (Blueprint $table) { - $table->dropForeign(['tenant_codigo']); + if (Schema::getConnection()->getDriverName() !== 'sqlite') { + $table->dropForeign(['tenant_codigo']); + } $table->dropColumn('tenant_codigo'); }); diff --git a/database/migrations/2026_06_25_000500_create_attachments_table.php b/database/migrations/2026_06_25_000500_create_attachments_table.php index acdc1ad..2a87083 100644 --- a/database/migrations/2026_06_25_000500_create_attachments_table.php +++ b/database/migrations/2026_06_25_000500_create_attachments_table.php @@ -45,8 +45,10 @@ return new class extends Migration public function down(): void { Schema::table('tenants', function (Blueprint $table) { - $table->dropForeign(['header_logo_id']); - $table->dropForeign(['footer_logo_id']); + if (Schema::getConnection()->getDriverName() !== 'sqlite') { + $table->dropForeign(['header_logo_id']); + $table->dropForeign(['footer_logo_id']); + } }); Schema::dropIfExists('attachments'); diff --git a/database/migrations/2026_06_29_102114_refactor_product_attributes_table.php b/database/migrations/2026_06_29_102114_refactor_product_attributes_table.php index 3c449b8..735768e 100644 --- a/database/migrations/2026_06_29_102114_refactor_product_attributes_table.php +++ b/database/migrations/2026_06_29_102114_refactor_product_attributes_table.php @@ -43,7 +43,9 @@ return new class extends Migration }); Schema::table('productos_variantes_values', function (Blueprint $table) { - $table->dropForeign('productos_variantes_definiciones_attribute_id_foreign'); + if (Schema::getConnection()->getDriverName() !== 'sqlite') { + $table->dropForeign('productos_variantes_definiciones_attribute_id_foreign'); + } $table->dropUnique('prod_var_def_variant_attr_unique'); }); @@ -71,7 +73,9 @@ return new class extends Migration public function down(): void { Schema::table('productos_variantes_values', function (Blueprint $table) { - $table->dropForeign(['products_attribute_id']); + if (Schema::getConnection()->getDriverName() !== 'sqlite') { + $table->dropForeign(['products_attribute_id']); + } $table->dropUnique('prod_var_values_variant_product_attr_unique'); }); diff --git a/phpunit.xml b/phpunit.xml index 72d70e8..e7f0a48 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -23,8 +23,8 @@ - - + + diff --git a/test_out.txt b/test_out.txt new file mode 100644 index 0000000..0518912 Binary files /dev/null and b/test_out.txt differ