artisan-migrate

Safely remove migration In Laravel

牧云@^-^@ 提交于 2019-12-03 00:02:12
问题 In Laravel, there appears to be a command for creating a migration, but not removing. Create migration command: php artisan migrate:make create_users_table If I want to delete the migration, can I just safely delete the corresponding migrations file within the database/migrations folder? Migrations file: 2013_05_31_220658_create_users_table 回答1: I accidentally created a migration with a bad name (command: php artisan migrate:make ). I did not run ( php artisan migrate ) the migration, so I

Safely remove migration In Laravel

半世苍凉 提交于 2019-12-02 13:48:43
In Laravel, there appears to be a command for creating a migration, but not removing. Create migration command: php artisan migrate:make create_users_table If I want to delete the migration, can I just safely delete the corresponding migrations file within the database/migrations folder? Migrations file: 2013_05_31_220658_create_users_table malisokan I accidentally created a migration with a bad name (command: php artisan migrate:make ). I did not run ( php artisan migrate ) the migration, so I decided to remove it. My steps: Manually delete the migration file under app/database/migrations/my

bind-address not present in my.cnf file - Laravel

ε祈祈猫儿з 提交于 2019-11-30 09:40:21
问题 While running this command ' php artisan migrate ', i got this error " couldn't connect to local MYSQL server through socket ". I was going through all stackoverflow answers, i got many suggestions saying 'change bind-address:localhost to 127.0.0.1'. I entered this command ' find / -name my.cnf ' and got two locations of 'my.cnf' file. /opt/lampp/etc/my.cnf /etc/mysql/my.cnf I've confusion.. Which file i've to edit. Which one is correct path ? And, in my "my.cnf" file, no 'bind-address' is

problems with database connection in laravel 5

老子叫甜甜 提交于 2019-11-29 06:39:32
I use the command php artisan migrate to migrate my database connection but I still get the same error and I checked everything, nothing wrong. I used the same connection that I always use in Laravel 4.2 Here is the message I get on my console: exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)' in C:\xampp\htdocs\Projects\blog\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:47 Take a look at your config/database.php and .env file.Maybe your database information is different. You need to

Call to undefined method Illuminate\Database\Schema\MySqlBuilder::defaultStringLength()

本秂侑毒 提交于 2019-11-28 10:34:21
问题 Firstly i was getting an error in php artisan migrate as SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes and Then i found a post on laracasts to fix this as use Illuminate\Support\Facades\Schema; public function boot() { Schema::defaultStringLength(191); } After adding this, when i run php artisan optimize then i am presented with new error as below Call to undefined method Illuminate\Database\Schema\MySqlBuilder:

problems with database connection in laravel 5

久未见 提交于 2019-11-28 00:00:39
问题 I use the command php artisan migrate to migrate my database connection but I still get the same error and I checked everything, nothing wrong. I used the same connection that I always use in Laravel 4.2 Here is the message I get on my console: exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)' in C:\xampp\htdocs\Projects\blog\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:47 回答1: Take