.net core - EF6: creating schema before InitialCreate - Stack Overflow

admin2025-04-15  1

I need to create a schema before the first table is created because it relies on it to exist.

I have tried Add-Migration CreateSchema with and without the flag -IgnoreChanges and then replaced Up and Down methods with my SQL script. The issue is that then, after the command Add-Migration InitialCreate -Verbose creates an empty migration in both cases.

I need to create the schema first because my table attribute [Table("schema.TableName")] in the C# class is in lowercase, but the schema should be in uppercase (SCHEMA).

转载请注明原文地址:http://www.anycun.com/QandA/1744721638a86705.html