We’re currently experiencing a high volume of inquiries and our response time could be up to 2 days. We apologize for the delay, and thank you for your patience. Our available time: 2 AM - 1 PM (Monday - Friday) (UTC+0 Timezone).

Okay
  Public Ticket #2500097
artisan migration not working properly
Closed

Comments

  • bucgene started the conversation

    New installation, when i try to run php artisan migrate, this error occours:

      SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sapphire.cities' doesn't exist (SQL: alter table `cities` add `slug` varchar(120) null, add `is_featured` tinyint not null default '0', add `image` varchar(255) null)


    Is there anything you can help

  •  2,557
    Support replied

    Hi,

    Please change in platform/themes/flex-home/functions/functions.php line 14

    app()->booted(function () {    
        app('migrator')->path(__DIR__ . '/../database/migrations');
    });

    to

    app()->booted(function () {    
        if (is_plugin_active('location')) {        
            app('migrator')->path(__DIR__ . '/../database/migrations');    
        }
    });


    Screenshot:

    4199956768.png


    Docs for installation: https://docs.botble.com/flex-home/2.x#install-locally-or-in-vps

    Thanks for your feedback!

  • bucgene replied

    but  the location plugin is activated. Its not removed.

  •  2,557
    Support replied

    Does it work after change in platform/themes/flex-home/functions/functions.php?

    It's working fine for me. 

    Plugin's status is saved into database so in the first migration, no plugins activated.