Lost admin privileges after upgrade

Hi ,
I upgraded using softaculous.com to 2.5.1.3 and lost admin privileges. Now I can’t go to settings at all . my account became regular user account . Please help. I have self-hosting option , white labeled .
thanks

It sounds like the database migrations didn’t complete, you can try running them manually by loading /update in your browser.

I tried that and I get in the browser.

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘fonts’ already exists (SQL: create table fonts (id int unsigned not null auto_increment primary key, name varchar(255) not null, folder varchar(255) not null, css_stack varchar(255) not null, css_weight smallint not null default ‘400’, google_font varchar(255) not null, normal varchar(255) not null, bold varchar(255) not null, italics varchar(255) not null, bolditalics varchar(255) not null, is_early_access tinyint(1) not null, sort_order int unsigned not null default ‘10000’) default character set utf8 collate utf8_unicode_ci)

From the error it looks like the problem was with the following migration.

database/migrations/2016_01_06_153144_add_invoice_font_support.php

Please try commenting out the first and then second parts of the up function and try again.

This is what I have . Which part exactly should I comment out ?

<?php

use Illuminate\Database\Migrations\Migration;

class AddInvoiceFontSupport extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()

{
    Schema::create('fonts', function ($t) {
        $t-&gt;increments('id');

        $t-&gt;string('name');
        $t-&gt;string('folder');
        $t-&gt;string('css_stack');
        $t-&gt;smallInteger('css_weight')-&gt;default(400);
        $t-&gt;string('google_font');
        $t-&gt;string('normal');
        $t-&gt;string('bold');
        $t-&gt;string('italics');
        $t-&gt;string('bolditalics');
        $t-&gt;boolean('is_early_access');
        $t-&gt;unsignedInteger('sort_order')-&gt;default(10000);
    });
    // Create fonts
    //$seeder = new FontsSeeder();
    //$seeder-&gt;run();

    Schema::table('accounts', function ($table) {
        $table-&gt;unsignedInteger('header_font_id')-&gt;default(1);
        $table-&gt;unsignedInteger('body_font_id')-&gt;default(1);
    });

    /*
    Schema::table('accounts', function ($table) {
          $table-&gt;foreign('header_font_id')-&gt;references('id')-&gt;on('fonts');
        $table-&gt;foreign('body_font_id')-&gt;references('id')-&gt;on('fonts');
    });
    */
}

/**
 * Reverse the migrations.
 *
 * @return void
 */


public function down()
{
    if (Schema::hasColumn('accounts', 'header_font_id')) {
        Schema::table('accounts', function ($table) {
            //$table-&gt;dropForeign('accounts_header_font_id_foreign');
            $table-&gt;dropColumn('header_font_id');
        });
    }

    if (Schema::hasColumn('accounts', 'body_font_id')) {
        Schema::table('accounts', function ($table) {
            //$table-&gt;dropForeign('accounts_body_font_id_foreign');
            $table-&gt;dropColumn('body_font_id');
        });
    }

    Schema::dropIfExists('fonts');
}

}

Try removing:

Schema::create(‘fonts’, function ($t) {
$t->increments(‘id’);
$t->string(‘name’);
$t->string(‘folder’);
$t->string(‘css_stack’);
$t->smallInteger(‘css_weight’)->default(400);
$t->string(‘google_font’);
$t->string(‘normal’);
$t->string(‘bold’);
$t->string(‘italics’);
$t->string(‘bolditalics’);
$t->boolean(‘is_early_access’);
$t->unsignedInteger(‘sort_order’)->default(10000);
});

If it still fails then remove:

Schema::table(‘accounts’, function ($table) {
$table->unsignedInteger(‘header_font_id’)->default(1);
$table->unsignedInteger(‘body_font_id’)->default(1);
});

thank you, it worked after removing both. should i put the code back now or just leave it the way it is ?

You can leave it the way it is.