Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorpweil
     
    What is the convention for naming migration files and classes? Does the file name use the enumerated prefixes as in Rails? Does the class need to mirror the file name in some fashion? I created a migration file to alter a couple of tables, but when I ran it, I received this response:

    pweil$ ./script/migrate 002_fixzip install

    Could not find load the installer. Class doesn't exists

    Thanks, pw
    •  
      CommentAuthorbermi
     

    Migrations are located at app/installers/fixzip_installer.php

    And your installer should look something like this.

    <?php
    
    class FixzipInstaller extends AkInstaller{
    
        function up_1(){
            $this->createTable('posts', 'id,title,body text,created_at');
        }
        function down_1(){
            $this->dropTable('posts');
        }
    }
    
    ?>
    

    Then you can run it using

    ./script/migrate fixzip install
    

    or

    ./script/migrate fixzip up 1
    

    Migrations are not implemented in the same way in Akelos and Rails, we use method based versioning instead of file name based versions.

    Regards,

    Bermi