Laravel covers most of the migration features like add, delete, indexing etc. but to modify the table like renaming column, change data type column to existing table laravel uses a separate package doctrine/dbal. In laravel migration we can rename colum to existing table using the method renameColumn(). We can install…
Tag: migration
How to delete column in laravel migration ?
Deleting column to existing table are easy as creating a new table and adding columns to it. To delete column in laravel migration to existing table we can use the same method we used in create migrations . Major difference between creating new table and updating new table is Schema::create…
How to Add Column in Existing Table Laravel migration ?
Adding column to existing table are easy as creating a new table and adding columns to it. In laravel migration we can add new colum to existing table using the same method we used in create migrations . Major difference between creating new table and updating new table is Schema::create…
How to Create Migration in Laravel ?
Migrations are used to manage the version control among the developers so that they can sync database schema to each other. Laravel itself provides database migration capabilities to manage database schema updates like create table, alter, modify, drop etc. Main advantage of migrations are to maintain the same schema across…
How to run raw SQL query in migration Laravel ?
Laravel provides its inbuilt feature to take care of migrations, Migrations like to make the version control for our database schema and share it across the developers but in laravel migrations we need to create eloquent query Using the schema class or Facade and then we need to run it…