Cdbexception: Moved From Localhost (Mac, Sqlite) To Shared Host (Linux, Postgres)

I’ve just moved my site from developing on my mac with sqlite to putting it on a shared host running linux with postgres.

The static pages display fine, but as soon as I display anything dynamic, I get a CDbException:

[indent][font="Courier New"]CDbCommand failed to execute the SQL statement: SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "assetchanges"[/font]


I seems to be either due to case sensitivity or quotes around the table/column aliases.

How can I start to fix these issues? Where do I look?

Why would the alias be [font=“Courier New”]“assetchanges”[/font] when in the model it’s set to [font=“Courier New”]“assetChanges”[/font], etc?

In this example, I’m trying to display [font=“Courier New”]actionHome[/font] within the [font=“Courier New”]Portfolio[/font] controller, which looks like this:

public function actionHome($id)


  Yii::app()->params['portfolio_id'] = $id;

  # Get data for this view

  # =======================

  $criteria = array(





  $portfolio = Portfolio::model()->thisUsers()->with($criteria)->findByPk($id);

  $this->render('home', array('portfolio' => $portfolio));