๐Ÿงช Testing Ticket Scan API ========================== Setup: Creating test scanner device... โœ… Scanner created: โœ… JWT token generated Setup: Finding test event and ticket... โœ… Using event: (ID: 1) โœ… Using ticket: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'verification_code' in 'WHERE' (SQL: delete from `ticket_validations` where `verification_code` is null) (500 Internal Server Error)

Symfony Exception

PDOException QueryException

HTTP 500 Internal Server Error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'verification_code' in 'WHERE' (SQL: delete from `ticket_validations` where `verification_code` is null)

Exceptions 2

Illuminate\Database\ QueryException

Show exception properties
Illuminate\Database\QueryException {#2019
  +errorInfo: array:3 [
    0 => "42S22"
    1 => 1054
    2 => "Unknown column 'verification_code' in 'WHERE'"
  ]
  #sql: "delete from `ticket_validations` where `verification_code` is null"
  #bindings: []
}
  1.         // If an exception occurs when attempting to run a query, we'll format the error
  2.         // message to include the bindings with SQL, which will make this exception a
  3.         // lot more helpful to the developer instead of just the database's errors.
  4.         catch (Exception $e) {
  5.             throw new QueryException(
  6.                 $query$this->prepareBindings($bindings), $e
  7.             );
  8.         }
  9.     }
  1.         // Here we will run this query. If an exception occurs we'll determine if it was
  2.         // caused by a connection that has been lost. If that is the cause, we'll try
  3.         // to re-establish connection and re-run the query with a fresh connection.
  4.         try {
  5.             $result $this->runQueryCallback($query$bindings$callback);
  6.         } catch (QueryException $e) {
  7.             $result $this->handleQueryException(
  8.                 $e$query$bindings$callback
  9.             );
  10.         }
  1.      * @param  array  $bindings
  2.      * @return int
  3.      */
  4.     public function affectingStatement($query$bindings = [])
  5.     {
  6.         return $this->run($query$bindings, function ($query$bindings) {
  7.             if ($this->pretending()) {
  8.                 return 0;
  9.             }
  10.             // For update or delete statements, we want to get the number of rows affected
  1.      * @param  array  $bindings
  2.      * @return int
  3.      */
  4.     public function delete($query$bindings = [])
  5.     {
  6.         return $this->affectingStatement($query$bindings);
  7.     }
  8.     /**
  9.      * Execute an SQL statement and return the boolean result.
  10.      *
  1.             $this->where($this->from.'.id''='$id);
  2.         }
  3.         $this->applyBeforeQueryCallbacks();
  4.         return $this->connection->delete(
  5.             $this->grammar->compileDelete($this), $this->cleanBindings(
  6.                 $this->grammar->prepareBindingsForDelete($this->bindings)
  7.             )
  8.         );
  9.     }
  1.     {
  2.         if (isset($this->onDelete)) {
  3.             return call_user_func($this->onDelete$this);
  4.         }
  5.         return $this->toBase()->delete();
  6.     }
  7.     /**
  8.      * Run the default delete function on the builder.
  9.      *
  1.     die("โŒ No tickets found for this event. Please create tickets first.\n");
  2. }
  3. echo "โœ… Using ticket: {$ticket->verification_code}\n\n";
  4. // Clear previous test scans
  5. TicketValidation::where('verification_code'$ticket->verification_code)->delete();
  6. echo "โœ… Cleared previous test scans\n\n";
  7. /**
  8.  * Helper function to make API requests
  9.  */

PDOException

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'verification_code' in 'WHERE'

  1.             }
  2.             // For update or delete statements, we want to get the number of rows affected
  3.             // by the statement and return that back to the developer. We'll first need
  4.             // to execute the statement and then we'll use PDO to fetch the affected.
  5.             $statement $this->getPdo()->prepare($query);
  6.             $this->bindValues($statement$this->prepareBindings($bindings));
  7.             $statement->execute();
  1.             }
  2.             // For update or delete statements, we want to get the number of rows affected
  3.             // by the statement and return that back to the developer. We'll first need
  4.             // to execute the statement and then we'll use PDO to fetch the affected.
  5.             $statement $this->getPdo()->prepare($query);
  6.             $this->bindValues($statement$this->prepareBindings($bindings));
  7.             $statement->execute();
  1.     {
  2.         // To execute the statement, we'll simply call the callback, which will actually
  3.         // run the SQL against the PDO connection. Then we can calculate the time it
  4.         // took to execute and log the query SQL, bindings and time in our memory.
  5.         try {
  6.             return $callback($query$bindings);
  7.         }
  8.         // If an exception occurs when attempting to run a query, we'll format the error
  9.         // message to include the bindings with SQL, which will make this exception a
  10.         // lot more helpful to the developer instead of just the database's errors.
  1.         // Here we will run this query. If an exception occurs we'll determine if it was
  2.         // caused by a connection that has been lost. If that is the cause, we'll try
  3.         // to re-establish connection and re-run the query with a fresh connection.
  4.         try {
  5.             $result $this->runQueryCallback($query$bindings$callback);
  6.         } catch (QueryException $e) {
  7.             $result $this->handleQueryException(
  8.                 $e$query$bindings$callback
  9.             );
  10.         }
  1.      * @param  array  $bindings
  2.      * @return int
  3.      */
  4.     public function affectingStatement($query$bindings = [])
  5.     {
  6.         return $this->run($query$bindings, function ($query$bindings) {
  7.             if ($this->pretending()) {
  8.                 return 0;
  9.             }
  10.             // For update or delete statements, we want to get the number of rows affected
  1.      * @param  array  $bindings
  2.      * @return int
  3.      */
  4.     public function delete($query$bindings = [])
  5.     {
  6.         return $this->affectingStatement($query$bindings);
  7.     }
  8.     /**
  9.      * Execute an SQL statement and return the boolean result.
  10.      *
  1.             $this->where($this->from.'.id''='$id);
  2.         }
  3.         $this->applyBeforeQueryCallbacks();
  4.         return $this->connection->delete(
  5.             $this->grammar->compileDelete($this), $this->cleanBindings(
  6.                 $this->grammar->prepareBindingsForDelete($this->bindings)
  7.             )
  8.         );
  9.     }
  1.     {
  2.         if (isset($this->onDelete)) {
  3.             return call_user_func($this->onDelete$this);
  4.         }
  5.         return $this->toBase()->delete();
  6.     }
  7.     /**
  8.      * Run the default delete function on the builder.
  9.      *
  1.     die("โŒ No tickets found for this event. Please create tickets first.\n");
  2. }
  3. echo "โœ… Using ticket: {$ticket->verification_code}\n\n";
  4. // Clear previous test scans
  5. TicketValidation::where('verification_code'$ticket->verification_code)->delete();
  6. echo "โœ… Cleared previous test scans\n\n";
  7. /**
  8.  * Helper function to make API requests
  9.  */

Stack Traces 2

[2/2] QueryException
Illuminate\Database\QueryException:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'verification_code' in 'WHERE' (SQL: delete from `ticket_validations` where `verification_code` is null)

  at /home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
  at Illuminate\Database\Connection->runQueryCallback('delete from `ticket_validations` where `verification_code` is null', array(), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:720)
  at Illuminate\Database\Connection->run('delete from `ticket_validations` where `verification_code` is null', array(), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:558)
  at Illuminate\Database\Connection->affectingStatement('delete from `ticket_validations` where `verification_code` is null', array())
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:522)
  at Illuminate\Database\Connection->delete('delete from `ticket_validations` where `verification_code` is null', array())
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3550)
  at Illuminate\Database\Query\Builder->delete()
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1189)
  at Illuminate\Database\Eloquent\Builder->delete()
     (/home/globalgala/public_html/2026_backend_dev/tests/manual/test-ticket-scan-api.php:63)                
[1/2] PDOException
PDOException:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'verification_code' in 'WHERE'

  at /home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:566
  at PDO->prepare('delete from `ticket_validations` where `verification_code` is null')
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:566)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}('delete from `ticket_validations` where `verification_code` is null', array())
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:753)
  at Illuminate\Database\Connection->runQueryCallback('delete from `ticket_validations` where `verification_code` is null', array(), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:720)
  at Illuminate\Database\Connection->run('delete from `ticket_validations` where `verification_code` is null', array(), object(Closure))
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:558)
  at Illuminate\Database\Connection->affectingStatement('delete from `ticket_validations` where `verification_code` is null', array())
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Connection.php:522)
  at Illuminate\Database\Connection->delete('delete from `ticket_validations` where `verification_code` is null', array())
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3550)
  at Illuminate\Database\Query\Builder->delete()
     (/home/globalgala/public_html/2026_backend_dev/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1189)
  at Illuminate\Database\Eloquent\Builder->delete()
     (/home/globalgala/public_html/2026_backend_dev/tests/manual/test-ticket-scan-api.php:63)