-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Custom schema #1 #38
base: master
Are you sure you want to change the base?
Custom schema #1 #38
Conversation
Thanks, will look over this as soon as I get a chance |
I think it makes sense to get the description PR done before getting into this one. |
I'd love to set a custom schema. Any status on this pull? |
busy year... I haven't had a chance and I'm not sure when I'll get the time. I'd be interested to know if you manage to build and run the fork and if it works for you. I will come back to this but can't promise when. I'm a contractor so my time comes and goes somewhat randomly. I do intend to come back and make further improvements and this is still one I'd like to do. I'm not sure how the impending EF7 will affect this project and haven't had time to look into that yet. Still want to do PR #33 first. |
hey @timabell great little tool. Just wondering if you're planning to merge this PR in, or would I be better of just forking it and building it myself. Cheers. hey @sveinhelge don't suppose you've already published this elsewhere ? |
return sql.ToString(); | ||
} | ||
|
||
private string AddForeignKeys(IEnumerable<EnumReference> refs) | ||
private string AddForeignKeys(LookupDbModel model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm uneasy about expanding the params to be the whole model, makes it harder to see what this method actually depends on. I need to give it some more thought.
DELETE | ||
;" | ||
, TableName(lookup.Name))); | ||
MERGE INTO [{1}].[{0}] dst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was intentionally not indented to avoid unnecessary whitespace in the generated output
using NUnit.Framework; | ||
|
||
[TestFixture] | ||
public class ModelCustomSchemaParsingTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm uneasy about this test being a copy-paste of the original, smells of DRY
@@ -23,6 +23,7 @@ public class EnumExample | |||
public void Setup() | |||
{ | |||
Database.SetInitializer(new DropCreateDatabaseAlways<MyDbContext>()); | |||
Database.SetInitializer(new DropCreateDatabaseAlways<MyCustomSchemaDbContext>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't add the custom schema to the example usage as that's a more advanced feature, and less commonly used so might confuse people new to it. The example usage is intended to be a kind of quickstart.
@eoincgreenfinch I certainly would like to get this enhancement tidied up tested and merged, I'd need to find some time to set up my dev environment and work on it for a bit. On the off-chance are you using it for a commercial project? Would you be interested in funding some development time to get it in? I'm starting to think about offering to work on open source projects for money where they are useful as I'd like to do more on them, and that would allow me to justify spending my time on it. (I'm a contract dev so I have to balance this stuff with paid work and home-life). |
Maybe crowd-funding would work if several people/organisations would like to see this implemented? Thoughts? |
Support for custom schema. Uses schema from context.
Example:
public class MyCustomSchemaDbContext : DbContext
{
public DbSet Foos { get; set; }
}
Will create Enum tables under schema myschema.