feat: update product tenant relations, implement attachments, refactor product attributes, and configure SQLite for testing
This commit is contained in:
parent
a79f58d520
commit
52b422c1ca
|
|
@ -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');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||
<env name="BROADCAST_CONNECTION" value="null"/>
|
||||
<env name="CACHE_STORE" value="array"/>
|
||||
<env name="DB_CONNECTION" value="mysql"/>
|
||||
<env name="DB_DATABASE" value="shopit_test"/>
|
||||
<env name="DB_CONNECTION" value="sqlite"/>
|
||||
<env name="DB_DATABASE" value=":memory:"/>
|
||||
<env name="DB_URL" value=""/>
|
||||
<env name="MAIL_MAILER" value="array"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue