Top "Laravel-migrations" questions

Database Migrations in Laravel are the way to create and alter database schema.

Add a new column to existing table in a migration

I can't figure out how to add a new column to my existing database table using the Laravel framework. I …

php laravel laravel-4 laravel-migrations
Laravel Migration Change to Make a Column Nullable

I created a migration with unsigned user_id. How can I edit user_id in a new migration to also …

laravel laravel-5 eloquent nullable laravel-migrations
Artisan, creating tables in database

I am trying to create mysql tables in Laravel 5. I created a file in /project/database/migrations called users.php: [...] …

php laravel laravel-5 laravel-artisan laravel-migrations
Laravel Unknown Column 'updated_at'

I've just started with Laravel and I get the following error: Unknown column 'updated_at' insert into gebruikers (naam, wachtwoord, …

php mysql laravel laravel-migrations
Laravel Schema onDelete set null

Can't figure out how to set proper onDelete constraint on a table in Laravel. (I'm working with SqLite) $table->...…

php laravel laravel-migrations
Laravel migrations change a column type from varchar to longText

I need to change with migration column type of $table->string('text'); to a text type, I have tried …

laravel laravel-migrations
PDOException (1044) SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge'

I am using Laravel 5 and getting the following exception: PDOException (1044) SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database …

laravel laravel-5 database-migration laravel-migrations
Laravel timestamps() doesn't create CURRENT_TIMESTAMP

I have a migration that has the timestamps() method, and then I have a seed to seed this table. Schema::…

php laravel eloquent laravel-migrations laravel-seeding
Drop Unique Index Laravel 5

I kept getting this while run php artisan migrate SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'email'; check that …

php laravel laravel-5 laravel-migrations
Laravel: migrations change default value(boolean) of column

This is my current code. public function up() { Schema::table('render', function (Blueprint $table) { $table->boolean('displayed')->…

laravel laravel-migrations