php artisan migrate: Class Schema not found
up vote
4
down vote
favorite
When doing a migration, in the Windows console I execute the command:
php artisan migrate
When I run the command, it shows me the following error:
[SymfonyComponentDebugExceptionFatalErrorException]
Class 'MarketProvidersSchema' not found
I would be very grateful if anyone can help me.
php database laravel web-applications artisan-migrate
add a comment |
up vote
4
down vote
favorite
When doing a migration, in the Windows console I execute the command:
php artisan migrate
When I run the command, it shows me the following error:
[SymfonyComponentDebugExceptionFatalErrorException]
Class 'MarketProvidersSchema' not found
I would be very grateful if anyone can help me.
php database laravel web-applications artisan-migrate
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
When doing a migration, in the Windows console I execute the command:
php artisan migrate
When I run the command, it shows me the following error:
[SymfonyComponentDebugExceptionFatalErrorException]
Class 'MarketProvidersSchema' not found
I would be very grateful if anyone can help me.
php database laravel web-applications artisan-migrate
When doing a migration, in the Windows console I execute the command:
php artisan migrate
When I run the command, it shows me the following error:
[SymfonyComponentDebugExceptionFatalErrorException]
Class 'MarketProvidersSchema' not found
I would be very grateful if anyone can help me.
php database laravel web-applications artisan-migrate
php database laravel web-applications artisan-migrate
edited May 5 '17 at 13:51
jedrzej.kurylo
25.1k54664
25.1k54664
asked May 5 '17 at 13:34
FranMoronR
2112
2112
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
10
down vote
add following line on the top of that page (AppServiceProvider.php under providers directory)
use IlluminateSupportFacadesSchema;
add a comment |
up vote
4
down vote
It looks like you have fixed another problems with the message "Laravel 5.4: Specified key was too long error" using this article where you were recommended to add following code
use IlluminateSupportFacadesSchema;
public function boot()
{
Schema::defaultStringLength(191);
}
to the file named
AppServiceProvider.php
and you actually only chaned the boot method and forget to update the use section. Am I right?
The Article says:
Laravel 5.4 made a change to the default database character set, and
it’s now utf8mb4 which includes support for storing emojis. This only
affects new applications and as long as you are running MySQL v5.7.7
and higher you do not need to do anything.
For those running MariaDB or older versions of MySQL you may hit this
error when trying to run migrations:
[IlluminateDatabaseQueryException] SQLSTATE[42000]: Syntax error or
access violation: 1071 Specified key was too long; max key length is
767 bytes (SQL: alter table users add unique
users_email_unique(email))
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071
Specified key was too long; max key length is 767 bytes
add a comment |
up vote
2
down vote
It seems your migration code is in a namespace and that's where PHP is looking for Schema class. Add the following at the top of your file:
use Schema;
or refer to the Schema class using fully qualified namespace:
Schema::table(...);
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
add following line on the top of that page (AppServiceProvider.php under providers directory)
use IlluminateSupportFacadesSchema;
add a comment |
up vote
10
down vote
add following line on the top of that page (AppServiceProvider.php under providers directory)
use IlluminateSupportFacadesSchema;
add a comment |
up vote
10
down vote
up vote
10
down vote
add following line on the top of that page (AppServiceProvider.php under providers directory)
use IlluminateSupportFacadesSchema;
add following line on the top of that page (AppServiceProvider.php under providers directory)
use IlluminateSupportFacadesSchema;
answered Sep 17 '17 at 13:43
Sabyasachi Ghosh
458313
458313
add a comment |
add a comment |
up vote
4
down vote
It looks like you have fixed another problems with the message "Laravel 5.4: Specified key was too long error" using this article where you were recommended to add following code
use IlluminateSupportFacadesSchema;
public function boot()
{
Schema::defaultStringLength(191);
}
to the file named
AppServiceProvider.php
and you actually only chaned the boot method and forget to update the use section. Am I right?
The Article says:
Laravel 5.4 made a change to the default database character set, and
it’s now utf8mb4 which includes support for storing emojis. This only
affects new applications and as long as you are running MySQL v5.7.7
and higher you do not need to do anything.
For those running MariaDB or older versions of MySQL you may hit this
error when trying to run migrations:
[IlluminateDatabaseQueryException] SQLSTATE[42000]: Syntax error or
access violation: 1071 Specified key was too long; max key length is
767 bytes (SQL: alter table users add unique
users_email_unique(email))
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071
Specified key was too long; max key length is 767 bytes
add a comment |
up vote
4
down vote
It looks like you have fixed another problems with the message "Laravel 5.4: Specified key was too long error" using this article where you were recommended to add following code
use IlluminateSupportFacadesSchema;
public function boot()
{
Schema::defaultStringLength(191);
}
to the file named
AppServiceProvider.php
and you actually only chaned the boot method and forget to update the use section. Am I right?
The Article says:
Laravel 5.4 made a change to the default database character set, and
it’s now utf8mb4 which includes support for storing emojis. This only
affects new applications and as long as you are running MySQL v5.7.7
and higher you do not need to do anything.
For those running MariaDB or older versions of MySQL you may hit this
error when trying to run migrations:
[IlluminateDatabaseQueryException] SQLSTATE[42000]: Syntax error or
access violation: 1071 Specified key was too long; max key length is
767 bytes (SQL: alter table users add unique
users_email_unique(email))
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071
Specified key was too long; max key length is 767 bytes
add a comment |
up vote
4
down vote
up vote
4
down vote
It looks like you have fixed another problems with the message "Laravel 5.4: Specified key was too long error" using this article where you were recommended to add following code
use IlluminateSupportFacadesSchema;
public function boot()
{
Schema::defaultStringLength(191);
}
to the file named
AppServiceProvider.php
and you actually only chaned the boot method and forget to update the use section. Am I right?
The Article says:
Laravel 5.4 made a change to the default database character set, and
it’s now utf8mb4 which includes support for storing emojis. This only
affects new applications and as long as you are running MySQL v5.7.7
and higher you do not need to do anything.
For those running MariaDB or older versions of MySQL you may hit this
error when trying to run migrations:
[IlluminateDatabaseQueryException] SQLSTATE[42000]: Syntax error or
access violation: 1071 Specified key was too long; max key length is
767 bytes (SQL: alter table users add unique
users_email_unique(email))
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071
Specified key was too long; max key length is 767 bytes
It looks like you have fixed another problems with the message "Laravel 5.4: Specified key was too long error" using this article where you were recommended to add following code
use IlluminateSupportFacadesSchema;
public function boot()
{
Schema::defaultStringLength(191);
}
to the file named
AppServiceProvider.php
and you actually only chaned the boot method and forget to update the use section. Am I right?
The Article says:
Laravel 5.4 made a change to the default database character set, and
it’s now utf8mb4 which includes support for storing emojis. This only
affects new applications and as long as you are running MySQL v5.7.7
and higher you do not need to do anything.
For those running MariaDB or older versions of MySQL you may hit this
error when trying to run migrations:
[IlluminateDatabaseQueryException] SQLSTATE[42000]: Syntax error or
access violation: 1071 Specified key was too long; max key length is
767 bytes (SQL: alter table users add unique
users_email_unique(email))
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071
Specified key was too long; max key length is 767 bytes
edited Nov 8 at 6:15
answered Aug 27 '17 at 8:38
Yevgeniy Afanasyev
7,59344264
7,59344264
add a comment |
add a comment |
up vote
2
down vote
It seems your migration code is in a namespace and that's where PHP is looking for Schema class. Add the following at the top of your file:
use Schema;
or refer to the Schema class using fully qualified namespace:
Schema::table(...);
add a comment |
up vote
2
down vote
It seems your migration code is in a namespace and that's where PHP is looking for Schema class. Add the following at the top of your file:
use Schema;
or refer to the Schema class using fully qualified namespace:
Schema::table(...);
add a comment |
up vote
2
down vote
up vote
2
down vote
It seems your migration code is in a namespace and that's where PHP is looking for Schema class. Add the following at the top of your file:
use Schema;
or refer to the Schema class using fully qualified namespace:
Schema::table(...);
It seems your migration code is in a namespace and that's where PHP is looking for Schema class. Add the following at the top of your file:
use Schema;
or refer to the Schema class using fully qualified namespace:
Schema::table(...);
answered May 5 '17 at 13:51
jedrzej.kurylo
25.1k54664
25.1k54664
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43806387%2fphp-artisan-migrate-class-schema-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown