0

While executing command through command line I'm getting this error "column not found"

    [Doctrine\DBAL\DBALException]                                                                                                                
  An exception occurred while executing 'SELECT t0.id AS id1, t0.first_name AS first_name2, t0.last_name AS last_name3, t0.email AS email4, t  
  0.gender AS gender5, t0.is_active AS is_active6, t0.vote_count AS vote_count7, t0.created_at AS created_at8, t0.updated_at AS updated_at9,   
  t0.fbUserId AS fbUserId10, t0.username AS username11, t0.password AS password12, t0.salt AS salt13 FROM users t0 WHERE t0.is_active = ?' wi  
  th params [0]:                                                                                                                               
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.fbUserId' in 'field list'                                                         

  [PDOException]                                                                        
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.fbUserId' in 'field list' 

Any idea why only through command line I'm getting this error.

3 Answers 3

3

Probably You have forgotten to update your schema , If it is please update your schema ..

Sign up to request clarification or add additional context in comments.

Comments

1

For version Symfony > 2.7 use:

php bin/console doctrine:schema:update --force

For version Symfony < 2.7 use:

php app/console doctrine:schema:update --force

1 Comment

In your answer please include some explanation as to why this might help the op
0

The error is occurred since you have not updated your database schema according to your model. Use following command to update the schema:

         php app/console doctrine:schema:update --force

or use following command for upper versions (> 2.8)

         php bin/console doctrine:schema:update --force

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.