Welcome Guest, Not a member yet? Register   Sign In
How to create more than 1 table in Migration?
#3

Yes, migrations can do multiple DB modifications (add tables, drop tables, add indexes, etc).

It is not considered bad form. Migration is a collection of steps necessary to upgrade/downgrade your database to the next/previous format, respectively

Schema::create('users', function($table)
{
$table->increments('id');
});

Schema::create('rights', function($table)
{
$table->increments('id');
});
Reply


Messages In This Thread
RE: How to create more than 1 table in Migration? - by pankaj11 - 01-25-2021, 12:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB