feat: update product tenant relations, implement attachments, refactor product attributes, and configure SQLite for testing
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user