@@ -243,7 +243,10 @@ public function setup(): void
243
243
$ this ->driverConnection ->getConfiguration ()->setFilterSchemaAssetsExpression (null );
244
244
}
245
245
246
- $ this ->schemaSynchronizer ->updateSchema ($ this ->getSchema (), true );
246
+ $ schema = new Schema ([], [], $ this ->driverConnection ->getSchemaManager ()->createSchemaConfig ());
247
+ Migration::create ($ schema , $ this ->configuration ['table_name ' ]);
248
+
249
+ $ this ->schemaSynchronizer ->updateSchema ($ schema , true );
247
250
248
251
if ($ hasFilterCallback ) {
249
252
$ this ->driverConnection ->getConfiguration ()->setSchemaAssetsFilter ($ assetFilter );
@@ -337,33 +340,6 @@ private function executeQuery(string $sql, array $parameters = [], array $types
337
340
return $ stmt ;
338
341
}
339
342
340
- private function getSchema (): Schema
341
- {
342
- $ schema = new Schema ([], [], $ this ->driverConnection ->getSchemaManager ()->createSchemaConfig ());
343
- $ table = $ schema ->createTable ($ this ->configuration ['table_name ' ]);
344
- $ table ->addColumn ('id ' , self ::$ useDeprecatedConstants ? Type::BIGINT : Types::BIGINT )
345
- ->setAutoincrement (true )
346
- ->setNotnull (true );
347
- $ table ->addColumn ('body ' , self ::$ useDeprecatedConstants ? Type::TEXT : Types::TEXT )
348
- ->setNotnull (true );
349
- $ table ->addColumn ('headers ' , self ::$ useDeprecatedConstants ? Type::TEXT : Types::TEXT )
350
- ->setNotnull (true );
351
- $ table ->addColumn ('queue_name ' , self ::$ useDeprecatedConstants ? Type::STRING : Types::STRING )
352
- ->setNotnull (true );
353
- $ table ->addColumn ('created_at ' , self ::$ useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE )
354
- ->setNotnull (true );
355
- $ table ->addColumn ('available_at ' , self ::$ useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE )
356
- ->setNotnull (true );
357
- $ table ->addColumn ('delivered_at ' , self ::$ useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE )
358
- ->setNotnull (false );
359
- $ table ->setPrimaryKey (['id ' ]);
360
- $ table ->addIndex (['queue_name ' ]);
361
- $ table ->addIndex (['available_at ' ]);
362
- $ table ->addIndex (['delivered_at ' ]);
363
-
364
- return $ schema ;
365
- }
366
-
367
343
private function decodeEnvelopeHeaders (array $ doctrineEnvelope ): array
368
344
{
369
345
$ doctrineEnvelope ['headers ' ] = json_decode ($ doctrineEnvelope ['headers ' ], true );
0 commit comments