Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorpixel-boutique.de
     
    hi together,

    i am trying to do that screencast tutorial (20min blog). I get it running on my linux box.
    I can do that
    ./script/generate controller Post
    ./script/generate model Post

    Play with the views also works.

    But my probs start with the migration. When I edit app/installers/post_installer.php and run the
    ./script/migrate post install

    I will get this:
    ---------------------------------------------------------------------------------------

    259:/var/www/web0/html/booklink# ./script/migrate post install
    Upgrading-----
    (mysqlt): SET AUTOCOMMIT=0
    -----
    -----
    (mysqlt): BEGIN
    -----
    -----
    (mysqlt): COMMIT
    -----
    -----
    (mysqlt): SET AUTOCOMMIT=1
    -----
    Smart Commit occurred

    ---------------------------------------------------------------------------------------

    as you see, there are not any changes made to the database - no post table is installed.

    Does anyone pls. have an idea what's wrong?

    greetings,
    Chris
    •  
      CommentAuthorbermi
     

    Can we have a look to your post_installer.php file?

    • CommentAuthorpixel-boutique.de
     
    Hi Bermi,

    thanks to get your attention. Here is the post_installer.php

    <?php
    class PostInstaller extends AkInstaller
    {
    function up_1()
    {
    /** /
    $this->createTable('posts', "
    id,
    title
    ");
    /**/
    }

    function down_1()
    {
    /** /
    $this->dropTable('posts');
    /**/
    }

    }

    ?>
    •  
      CommentAuthorbermi
     

    Chris,

    The code is commented by default and is added as an example for database creation.

    As you can see you if you run

    ./script/migrate post uninstall
    

    for getting back to version 0, and then uncommon the lines like

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

    and run the migration again by running

    ./script/migrate post install
    

    you'll get the database table created.

    • CommentAuthorpixel-boutique.de
     
    uuuuh, good trick /** / to oversee... stupid me :)

    works fine, now!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Dear bermi, thanks for your quickest help && thanks for that very funky framework, found it today and me weekend is scheduled on akelos ;)

    Cheers,
    Chris