feat(migrations): add migration for grouping Pyme Rural tenants and updating client associations
This commit is contained in:
@@ -12,9 +12,9 @@ use App\Domains\Commerce\Catalog\Models\CatalogItem;
|
||||
use App\Domains\Commerce\Catalog\Models\FeaturedGroup;
|
||||
use App\Domains\Commerce\Catalog\Services\CatalogService;
|
||||
use App\Domains\Core\Client\Models\Client;
|
||||
use App\Domains\Ticketing\Desfile\Services\InvitationPurchaseProvisioner;
|
||||
use App\Domains\Core\Tenant\Models\Tenant;
|
||||
use App\Domains\Core\Tenant\Services\TenantService;
|
||||
use App\Domains\Ticketing\Desfile\Services\InvitationPurchaseProvisioner;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -22,7 +22,7 @@ use RuntimeException;
|
||||
|
||||
class DesfilePuraTendenciaSeeder extends Seeder
|
||||
{
|
||||
private const ONTICKET_CLIENT_CODE = 'onticket';
|
||||
private const PYME_RURAL_CLIENT_CODE = 'pyme_rural';
|
||||
|
||||
private const TENANT_CODE = 'desfile_pura_tendencia';
|
||||
|
||||
@@ -34,9 +34,9 @@ class DesfilePuraTendenciaSeeder extends Seeder
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$client = Client::query()->firstOrCreate(
|
||||
['code' => self::ONTICKET_CLIENT_CODE],
|
||||
['name' => 'OnTicket'],
|
||||
$client = Client::query()->updateOrCreate(
|
||||
['code' => self::PYME_RURAL_CLIENT_CODE],
|
||||
['name' => 'Pyme Rural'],
|
||||
);
|
||||
|
||||
$tenant = Tenant::query()->where('codigo', self::TENANT_CODE)->first();
|
||||
|
||||
Reference in New Issue
Block a user