LavaLite / cms

Multilingual PHP CMS built with Laravel and bootstrap

Home Page:https://lavalite.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run 'php artisan lavalite:install' but missing some migration table

jensen0915 opened this issue · comments

Hi

I have tried to install this project with instructions for documents.

  1. composer create-project LavaLite/cms --prefer-dist website
  2. php artisan lavalite:install

The log is shown below. Please give me some advice. Thanks!

INFO Running migrations.

2014_10_12_100000_create_password_reset_tokens_table ................................................................................... 45ms DONE
2019_08_19_000000_create_failed_jobs_table ............................................................................................. 37ms DONE
2019_12_14_000001_create_personal_access_tokens_table .................................................................................. 46ms DONE
2022_10_24_100001_create_litecms_page_pages_table ...................................................................................... 28ms DONE
2023_06_19_100001_create_litecms_block_blocks_table .................................................................................... 19ms DONE
2023_06_19_100001_create_litecms_block_categories_table ................................................................................ 20ms DONE
2023_06_19_100001_create_litecms_contact_contacts_table ................................................................................ 22ms DONE
2023_06_21_053811_create_jobs_table .................................................................................................... 30ms DONE

INFO Seeding database.

Litepie\Menu\Database\Seeders\MenuTableSeeder ............................................................................................ RUNNING
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lavalite.menus' doesn't exist (Connection: mysql, SQL: insert into menus (description, icon, id, key, name, order, parent_id, role, status, target, url) values (?, ?, 1, admin, Admin, 1, 0, ?, Show, ?, /admin), (?, ?, 2, user, User, 1, 0, ?, Show, ?, /user), (?, ?, 3, client, Client, 1, 0, ?, Show, ?, /client), (Website main menu, ?, 4, main, Main, 2, 0, ?, Show, ?, ), (Footer menu, ?, 5, footer, Footer, 3, 0, ?, Show, ?, ), (Social media menu, ?, 6, social, Social, 3, 0, ?, Show, ?, ), (?, fab fa-twitter, ?, ?, Twitter, 11, 6, ?, Show, _blank, https://twitter.com/lavalitecms), (?, fab fa-github, ?, ?, GitHub, 12, 6, ?, Show, _blank, https://github.com/LavaLite/cms), (?, fab fa-facebook-square, ?, ?, Facebook, 13, 6, ?, Show, _blank, https://www.facebook.com/lavalite/))

`Creating a "Lavalite/cms" project at "./lavalitecms"
Info from https://repo.packagist.org: #StandWithUkraine
Installing lavalite/cms (v10.1.2)

  • Installing lavalite/cms (v10.1.2): Extracting archive
    (...)Do you want to publish public files? [Yes]:
    [0] No
    [1] Yes
    [2] Overwrite
    [3] Ask

WARN Migration table not found.

INFO Preparing database.

Creating migration table ................................................................................. 3ms DONE

INFO Running migrations.

2014_10_12_100000_create_password_reset_tokens_table ..................................................... 5ms DONE
2019_08_19_000000_create_failed_jobs_table ............................................................... 4ms DONE
2019_12_14_000001_create_personal_access_tokens_table .................................................... 6ms DONE
2022_10_24_100001_create_litecms_page_pages_table ........................................................ 3ms DONE
2023_06_19_100001_create_litecms_block_blocks_table ...................................................... 3ms DONE
2023_06_19_100001_create_litecms_block_categories_table .................................................. 3ms DONE
2023_06_19_100001_create_litecms_contact_contacts_table .................................................. 3ms DONE
2023_06_21_053811_create_jobs_table ...................................................................... 5ms DONE

INFO Seeding database.

Litepie\Menu\Database\Seeders\MenuTableSeeder ............................................................. RUNNING
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lavalitecms.menus' doesn't exist (Connection: mysql, SQL: insert into menus (description, icon, id, key, name, order, parent_id, role, status, target, url) values (?, ?, 1, admin, Admin, 1, 0, ?, Show, ?, /admin), (?, ?, 2, user, User, 1, 0, ?, Show, ?, /user), (?, ?, 3, client, Client, 1, 0, ?, Show, ?, /client), (Website main menu, ?, 4, main, Main, 2, 0, ?, Show, ?, ), (Footer menu, ?, 5, footer, Footer, 3, 0, ?, Show, ?, ), (Social media menu, ?, 6, social, Social, 3, 0, ?, Show, ?, ), (?, fab fa-twitter, ?, ?, Twitter, 11, 6, ?, Show, _blank, https://twitter.com/lavalitecms), (?, fab fa-github, ?, ?, GitHub, 12, 6, ?, Show, _blank, https://github.com/LavaLite/cms), (?, fab fa-facebook-square, ?, ?, Facebook, 13, 6, ?, Show, _blank, https://www.facebook.com/lavalite/))
`

I added Menu table migration from Vendor, but then Users table is missing...

same issue here

It seems there are database migrations missing in the 10.x branch, that are present in the 9.x branch. You can get past the error by copying the below-mentioned migration to database/migrations directory in your installation and re-run the install. However, there are other parts missing, so perhaps its best to wait until the maintainer(s) checks-in the missing files.

https://github.com/LavaLite/cms/blob/9.x/database/migrations/2017_05_05_100001_create_menus_table.php

Edit: I tried to patch the 9.0 files (see migrations.zip below) I can now get past the installation process, and login to the system
migrations.zip

@sjustesen After copy migration from 9.x I must edit 2019_07_10_100001_create_teams_table.php because following errors occurred:

  Litepie\Team\Database\Seeders\TeamTableSeeder ............................................................................................ RUNNING  
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'type' in 'field list' (Connection: mysql, SQL: insert into `teams` (`description`, `key`, `level`, `name`, `status`, `type`) values (Default Team, default, 1, Default, Active, Default))

Missing part in migration:

            $table->text('description')->nullable();
            $table->integer('level')->nullable();
            $table->text('type')->nullable();
            $table->text('key')->nullable();

@kulavvy Excellent, thanks for testing/fixing 👍