Ajax30 / BraveCMS-2.0

Brave CMS is an open-source CMS. Made with Laravel 8. Easy to use, easy to customize.
28 stars 4 forks source link

Migrations fails when run /install #47

Open pebarradasaero opened 1 year ago

pebarradasaero commented 1 year ago

Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table

Illuminate\Database\QueryException

SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'roles' (SQL: alter table users add constraint users_role_id_foreign foreign key (role_id) references roles (id))

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712 708▕ // If an exception occurs when attempting to run a query, we'll format the error 709▕ // message to include the bindings with SQL, which will make this exception a 710▕ // lot more helpful to the developer instead of just the database's errors. 711▕ catch (Exception $e) { ➜ 712▕ throw new QueryException( 713▕ $query, $this->prepareBindings($bindings), $e 714▕ ); 715▕ } 716▕ }

Whoops\Exception\ErrorException

Using ${var} in strings is deprecated, use {$var} instead

at vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php:52 48▕ } 49▕ 50▕ protected function getCurrentBranch(string $directory): string 51▕ { ➜ 52▕ $branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \* | cut -d ' ' -f2"))."'"; 53▕ 54▕ if ($branch === "''") { 55▕ $branch = 'current branch'; 56▕ } PHP Fatal error: Uncaught Whoops\Exception\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php:52

Ajax30 commented 1 year ago

If you are testing the application locally, you need to use a virtual host. The InstallController is made for deployment on live websites.

pebarradasaero commented 1 year ago

Hi! I've install sail, to run app with docker. I tried to make migrations at terminal and the error is the same.

pebarradasaero commented 1 year ago

Excelent, Thank you!

Ajax30 commented 1 year ago

I have added a bare-bones MySQL export to the root of the application. It is called minimal.sql. Let me know if it helped you. :)

pebarradasaero commented 1 year ago

Hi Razvan Zamfir,

Thank you so mutch! It works now!

The site is beautiful!

Ajax30 commented 1 year ago

@pebarradasaero If you see any issues with it, please let me know.