NetCoreSaaS icon indicating copy to clipboard operation
NetCoreSaaS copied to clipboard

InitialTenantDbMigration

Open PiotrFerenc opened this issue 6 years ago • 2 comments

Where can i find migration for tenant? or How to create own migration for tenant?

obraz

OK! Found!

dotnet ef migrations add InitialTenantDbMigration -c TenantDbContext -o Data/Migrations/NetCoreSaaS/TenantDb

PiotrFerenc avatar May 16 '19 14:05 PiotrFerenc

but my tenant doesn't have all columns obraz

PiotrFerenc avatar May 16 '19 15:05 PiotrFerenc

@PiotrFerenc For Tenant migration Database.EnsureCreated(); will automatically create database + migration on that database. Regarding not all columns I need to check about the migration setup. Do you have project setup in GH?

Database.EnsureCreated(); is good for test environment but for production env, I would suggest you to use library/tool like DbUp to manage the scripts and migrations.

janaks09 avatar May 17 '19 17:05 janaks09