Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    •  
      CommentAuthorOliver
     

    Hi all

    In my main installer, projectname_installer.php, I defined a "projects"-table just as follows:

    function up_1(){        
        $this->createTable('projects',
            'id,'.              // the key
            'title,'.           // the title of the project
            'description,'.     // a description of the project
            'author_id,'.       // the author id. This is how Akelos will know how to link
            'added_on'          // the date the project was added
        );
    }
    

    Installing this worked without any problems. Next I scaffolded the application, which created models, views, etc. - of course also a new installer, named project_installer.php.

    In this installer file, I noticed the initial setup to differ from what I specified in the main projectname_installer.php:

    function up_1()
    {
        $this->createTable('projects', "
          id,
          name
        ");  
    }
    

    Why is this? And: does it influence my applications when downgrading/installing later on for example a new system?

    • CommentAuthorKaste
     

    personally I never understood why we have different installer-files. a project-installer and then one for every model.

    of course they 'influence' each other. so it's best to stick with one approach. either user one installer for all migration-work. or use seperate installer. but don't use both.

    (seperate installers are handy for unit tests. but you never know where to create those join tables. and you have to run them all when deploying.)