Understand Before Executing Website Migration in Laravel - Hire Laravel Developers

Page 1

Website Migration


Understand Execution Before Website Migration What Exactly is Migration in Laravel? 1) It is actually a method used for creating a database. 2) The database created could be modified. 3) No need to bother about any special SQL syntax etc.


Method of Generating Migrations in Laravel: 1) Use make command. It is an Artisan command that is used for creating migration. 2) Now you will get a database /migration directory containing the new migration and this is placed in it. All files in migration will have timestamp for Laravel to analyze the order of migration.


Method of Generating Migrations in Laravel:

3) Now the migration in Laravel is generated. If needed, you can also make a custom output path for this migration. We advise you to utilize the path option while exacting the command given below: Make:Migration 4) Remember to relate the base path of application to

the given path.


Laravel’s Migration Structure: Migration structure has two different methods mentioned below: 1) Up 2) Down


Up method is for the addition of the following:

1) Tables 2) Rows 3) Columns 4) Database Indexes


Down method is for the addition of the following:

1) The Down method is used for deleting everything added using the Up Method.

2) It functions very much like “Undo�. 3) Professionals associated with the companies providing Laravel development services use it for modifying and creating tables.


Steps to Execute Migrations in Laravel:

1) Use Migrate Artisan command 2) Run Migration Artisan command in virtual machine to avoid the loss of data. 3) You will need to prevent the execution of command against production database for protecting your data. 4) A confirmation message will appear on your screen prior to the execution of data. (Don’t want prompt message, use force flag.)


THANK YOU Call Us Now: 1-800-600-3507

Source: https://www.softprodigy.com/5-points-to-unde rstand-before-executing-website-migration-in -laravel


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.