Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,196 members, 7,953,717 topics. Date: Friday, 20 September 2024 at 12:33 AM |
Nairaland Forum / Science/Technology / Webmasters / Help Needed For My Laravel Program (1007 Views)
Help Needed. How Do I Make A Website List Like This On Google / Help Needed Here / Help Needed By Bloggers (2) (3) (4)
Help Needed For My Laravel Program by jwax: 3:15pm On Mar 14, 2019 |
Please webmasters. am working with laravel 5.8 to build a project but am stuck with an error. I tried migrating my migrations but I got an error (seen below). have tried the conventional fix which is to do Schema::defaultStringLength(191); and importing the Facades schema (use Illuminate\Support\Facades\Schema; but the error just won't go away. Please how can I fix this? see error from command prompt below Migrating: 2014_10_12_000000_create_users_table Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table `users` (`id` bigint unsigned not null auto_increment primary key, `name` varchar(191) not null, `email` varchar(191) not null, `email_verified_at` timestamp null, `password` varchar(191) not null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at C:\wamp64\www\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) { > 664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668| Exception trace: 1 PDOException:"SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists" C:\wamp64\www\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458 2 PDOStatement::execute() C:\wamp64\www\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458 Please use the argument -v to see more details. |
Re: Help Needed For My Laravel Program by resosdigital(m): 3:22pm On Mar 14, 2019 |
You tried the schemadefaultstringlength after encountering the first error. Just go to your database using phpmyadim or whatever you use and delete the users table. Laravel created it when you first ran your migrations but ran into the error before it could create the migrations table so when you try running the migration again, it tries to recreate the users table. Just delete the users table and you will be fine 1 Like |
Re: Help Needed For My Laravel Program by jwax: 12:22pm On Mar 16, 2019 |
resosdigital: Wow! It worked just as you advised. Thanks alot |
Re: Help Needed For My Laravel Program by resosdigital(m): 12:45pm On Mar 16, 2019 |
jwax: Glad I could help |
Re: Help Needed For My Laravel Program by jwax: 2:55pm On Mar 16, 2019 |
resosdigital: Thanks a million. |
(1) (Reply)
Google Adsense Announces Crackdown On Invalid Clicks – Search Engine Journal / Whatsapp Festival Name Wishing Script -viral Script / Buy Facebook Account For Sale
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |