Welcome Guest, Not a member yet? Register   Sign In
Create database on first Migration
#1

Hello, everyone.

Is there a way to create the database by runing a migration in the application startup? In this case I want to create the main application's database, not a secondary one, that is, my first migration will be responsible to create the database.

I'm coming from .NET and I used to use Entity Framework Migration to handle all the database 'actions', like creating and updating it. In the first execution, if the database do not exists, EF Migrations creates it for me.

I tried to create a migration to do it, but to make it work I first need to configure the database connection on config/database.php, seting the database name. But I do not have a database initially! I want the migrations create it for me.

Thank you all. =)
Reply


Messages In This Thread
Create database on first Migration - by joelrlneto - 07-16-2016, 09:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB