setTableName('sf_guard_user_profile'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('user_id', 'integer', 4, array( 'type' => 'integer', 'notnull' => true, 'length' => '4', )); $this->hasColumn('first_name', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('last_name', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('email', 'string', 255, array( 'type' => 'string', 'email' => true, 'length' => '255', )); $this->hasColumn('pass_plain', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('salary_percent', 'integer', 3, array( 'type' => 'integer', 'default' => '50', 'length' => '3', )); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { $this->hasOne('sfGuardUser', array( 'local' => 'user_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Card as Cards', array( 'local' => 'id', 'foreign' => 'user_id')); } }