Phinx migration not running on server after commit in SVN repository









up vote
0
down vote

favorite












We have a SVN repository in a remote server and I have a copy of it in my local machine. We are using phinx for database migrations. So locally I create a migration and run it so I am sure the table is created and it does. The migration file is tracked by the repository. So I commit it and then trying to run the migration on the remote server. But the migration seems not to run. All I am getting is this message and then nothing



Phinx by Rob Morgan. version 0.3.4

using config file ./phinx.php
using config parser php
using migration path
/srv/www/subversion/MyProject/trunk/www/src/db-migrations
using environment production
using adapter mysql
using database MyDatase


The project in the remote server is located in /srv/wwww/subversion/MyProject/trunk/www. In the remote server I run the migration inside the www folder like



php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


EDIT: the phinxlog in the database does not show my migration at all. Last one set to 20 days ago










share|improve this question



























    up vote
    0
    down vote

    favorite












    We have a SVN repository in a remote server and I have a copy of it in my local machine. We are using phinx for database migrations. So locally I create a migration and run it so I am sure the table is created and it does. The migration file is tracked by the repository. So I commit it and then trying to run the migration on the remote server. But the migration seems not to run. All I am getting is this message and then nothing



    Phinx by Rob Morgan. version 0.3.4

    using config file ./phinx.php
    using config parser php
    using migration path
    /srv/www/subversion/MyProject/trunk/www/src/db-migrations
    using environment production
    using adapter mysql
    using database MyDatase


    The project in the remote server is located in /srv/wwww/subversion/MyProject/trunk/www. In the remote server I run the migration inside the www folder like



    php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


    EDIT: the phinxlog in the database does not show my migration at all. Last one set to 20 days ago










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      We have a SVN repository in a remote server and I have a copy of it in my local machine. We are using phinx for database migrations. So locally I create a migration and run it so I am sure the table is created and it does. The migration file is tracked by the repository. So I commit it and then trying to run the migration on the remote server. But the migration seems not to run. All I am getting is this message and then nothing



      Phinx by Rob Morgan. version 0.3.4

      using config file ./phinx.php
      using config parser php
      using migration path
      /srv/www/subversion/MyProject/trunk/www/src/db-migrations
      using environment production
      using adapter mysql
      using database MyDatase


      The project in the remote server is located in /srv/wwww/subversion/MyProject/trunk/www. In the remote server I run the migration inside the www folder like



      php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


      EDIT: the phinxlog in the database does not show my migration at all. Last one set to 20 days ago










      share|improve this question















      We have a SVN repository in a remote server and I have a copy of it in my local machine. We are using phinx for database migrations. So locally I create a migration and run it so I am sure the table is created and it does. The migration file is tracked by the repository. So I commit it and then trying to run the migration on the remote server. But the migration seems not to run. All I am getting is this message and then nothing



      Phinx by Rob Morgan. version 0.3.4

      using config file ./phinx.php
      using config parser php
      using migration path
      /srv/www/subversion/MyProject/trunk/www/src/db-migrations
      using environment production
      using adapter mysql
      using database MyDatase


      The project in the remote server is located in /srv/wwww/subversion/MyProject/trunk/www. In the remote server I run the migration inside the www folder like



      php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


      EDIT: the phinxlog in the database does not show my migration at all. Last one set to 20 days ago







      svn phinx






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 10 at 11:18

























      asked Nov 10 at 10:53









      Stefanos

      34




      34






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          It turns out that you need to run the migration as a specific user, the one defined in the project's config.php, and not as root. So in my case it was:



           sudo -u USER php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


          Worked like a charm!






          share|improve this answer




















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238214%2fphinx-migration-not-running-on-server-after-commit-in-svn-repository%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            It turns out that you need to run the migration as a specific user, the one defined in the project's config.php, and not as root. So in my case it was:



             sudo -u USER php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


            Worked like a charm!






            share|improve this answer
























              up vote
              0
              down vote













              It turns out that you need to run the migration as a specific user, the one defined in the project's config.php, and not as root. So in my case it was:



               sudo -u USER php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


              Worked like a charm!






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                It turns out that you need to run the migration as a specific user, the one defined in the project's config.php, and not as root. So in my case it was:



                 sudo -u USER php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


                Worked like a charm!






                share|improve this answer












                It turns out that you need to run the migration as a specific user, the one defined in the project's config.php, and not as root. So in my case it was:



                 sudo -u USER php htdocs/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php -e production


                Worked like a charm!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 10 at 12:05









                Stefanos

                34




                34



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238214%2fphinx-migration-not-running-on-server-after-commit-in-svn-repository%23new-answer', 'question_page');

                    );

                    Post as a guest














































































                    這個網誌中的熱門文章

                    How to read a connectionString WITH PROVIDER in .NET Core?

                    In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

                    Museum of Modern and Contemporary Art of Trento and Rovereto