tenancy: [MySQL] Queuing database migration gives me "You cannot serialize or unserialize PDO instances"

Reading your comments on #270 I thought I should queue the database migration, but after setting queue_database_creation to true in config/tenancy.php I get this error:

You cannot serialize or unserialize PDO instances. 

Comming from src\Illuminate\Queue\Queue.php:139.

This is my configuration:

		'queue_database_creation' => true,
		'migrate_after_creation' => true, // run migrations after creating a tenant
		'migration_parameters' => [
			 '--force' => true, // force database migrations
		],
		'seed_after_migration' => true, // should the seeder run after automatic migration
		'seeder_parameters' => [
			'--class' => 'DatabaseSeeder', // root seeder class to run after automatic migrations, e.g.: 'DatabaseSeeder'
			 '--force' => true, // force database seeder
		],

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (13 by maintainers)

Most upvoted comments

Alright, I’m merging the PR.

You should now run this to change your version constraint back to the 2.x release, so that you get future updates.

composer require stancl/tenancy:^2.2