Croeber
Croeber

Reputation: 469

How to generate SQL Script for database changes in Laravel

Professionally I work with SQL Server. So I am used to using the Visual Studio tools that is capable to generating a script for the database changes that I made, so that I can use that script on the server. ( I know there are other more automated ways to do it)

For my freelance projects I use Laravel. I was wondering how I can generated a script for the database changes after a certain point or migration in Laravel without having to point my development environment to the server.

Upvotes: 0

Views: 664

Answers (1)

varya
varya

Reputation: 86

try this. after writing your migration you can run

php artisan migrate --pretend

this will show the sql query that would be run.

Upvotes: 1

Related Questions