Create A User Model

run script/generate model User

edit /app/installers/user_installer.php

<?php
class UserInstaller extends AkInstaller
{
    function up_1()
    {
        $this->createTable('users', "
                  id,
                  name string(30) UNIQUE,
                  password string(10) index idx_password,
                  e_mail UNIQUE
                 ");
    }
 
 
 
    function down_1()
    {
        $this->dropTable('users');
    }
}
 
 
?>

run

script/migrate User install

Ready :-)

 
create-a-user-model.txt · Last modified: 2008/08/31 14:13 by 217.7.247.2
 

The Akelos Framework was created by Bermi Ferrer and other contributors.
Potions of the code and documentation have been ported from Ruby on Rails.

The Akelos Framework is released under the LGPL license.

"Akelos", "Akelos Framework", and the Akelos logo are trademarks of Bermi Labs All rights reserved.

Wiki driven by DokuWiki