Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  
    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
    • CommentTimeAug 17th 2007
     

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

  2.  
    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
    • CommentTimeAug 17th 2007
     

    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.

  3.  
    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
Add your comments
    Username Password
  • Format comments as