Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pluskal opened this issue Oct 30, 2020 · 1 comment
Closed

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

pluskal opened this issue Oct 30, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Projects

Comments

@pluskal
Copy link
Contributor

pluskal commented Oct 30, 2020

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 simpleidserver added this to TODO in 2.0.3 Oct 30, 2020
@simpleidserver simpleidserver moved this from TODO to In Progress in 2.0.3 Oct 31, 2020
@simpleidserver simpleidserver self-assigned this Oct 31, 2020
@simpleidserver simpleidserver added the bug Something isn't working label Oct 31, 2020
thabart added a commit that referenced this issue Oct 31, 2020
@simpleidserver
Copy link
Owner

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

@simpleidserver simpleidserver moved this from In Progress to Done in 2.0.3 Oct 31, 2020
@pluskal pluskal closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
2.0.3
Done
Development

No branches or pull requests

2 participants