simpleidserver / EFCore.Cassandra

Entity Framework Core provider for Cassandra
Apache License 2.0
35 stars 16 forks source link

Is it possible to create a keyspace while applying migrations? #10

Closed pluskal closed 3 years ago

pluskal commented 3 years ago

When I try to apply migration or create a database using


using (var dbContext = new FakeDbContext())
        {
          dbContext.Database.Migrate();
// OR
          dbContext.Database.EnsureCreated();
        }

when a keyspace does not exist, I am getting an exception.

Would it make sense to extend the implementation of DatabaseFacade methods EnsureCreated, Migrate and async variants to create keyspace when it does not exist?

simpleidserver commented 3 years ago

The issue is fixed in the branch "release/2.0.3".