dradovic / MigSharp

Mig# (MigSharp) is a .NET framework for database migrations and versioning
Other
106 stars 33 forks source link

Distribute console app over NuGet #47

Closed apodavalov closed 10 years ago

apodavalov commented 11 years ago

Hello! Instead of making Migrate.exe we can move all migrate code into the library (or another library such as Mig#.App or something you want). So, we can create console application instead of class library and write the following code: class Program { static void Main(string[] args) { Migration.RunConsoleApplication(args); } } Providing command line parameters and executing leads to apply mirgation (as example). Also we can run this console application outside Visual Studio.

Let me know if you have any questions to me.

Thanks a lot for your project!

dradovic commented 11 years ago

Hello,

I don't understand exactly the problem you are trying to solve. Can you please be more specific? The console application is just provided for your convenience. All relevant logic is in the MigSharp class itself. If you want to program your own console application do so, and call the Migrator class from your app. You can use Migrate.exe as an example of how to do so.

Cheers

apodavalov commented 11 years ago

Sure. Yes, I understand that MigSharp can do everything I want.I can make my own console application. But, I don't want to write it, I just want to use migrate.exe. As you notice in docs there is no nuget package for migrate.exe. So, instead of writing application from scratch I just want to write just one operator in my Program class (mentioned in previous message). This operator should give (prepend) all functionality of migrate.exe, I think it would be better if you make library migrate.dll instead of migrate.exe (or both). So, in that way we can get flexible console application for database migrationas as quick as we can.

Explanation against code: instead of migrate.exe make class library application. Rename MigSharp.Migrate.Program to MigSharp.Migrate.EntryPoint, rename also Main method to Run. Create migrate.exe project again and in the Program class just write MigSharp.Migrate.EntryPoint.Run(args). That's is all. If you like my idea I can do self and send pull request to you.

P.S. Sorry for my english =)

dradovic commented 11 years ago

So you would like to use the Migrate.exe as it stands, but your problem is that it's not distributed over NuGet?

apodavalov commented 11 years ago

Correct. Also I think it would be very simple if my database migrator project can run as is and contains migration information in itself.

dradovic commented 11 years ago

I will consider distributing the console exe over NuGet as well.

I don't understand what you mean by "if my database migrator project can run as is and contains migration information in itself". What do you mean by your migrator project? The actual migrations will always be in a project of yours that simply references MigSharp.

apodavalov commented 11 years ago

I am discouraged with project type, which contains migration. I use the https://github.com/dradovic/MigSharp/wiki/Quickstart for it. About my phrase you mentioned above. The word "migrator" means a project contains migrations. It is what I mean =)

ghost commented 11 years ago

Can you guys remove me please

On Jun 17, 2013, at 8:19 AM, Anton Podavalov notifications@github.com wrote:

I am discouraged with project type, which contains migration. I use the https://github.com/dradovic/MigSharp/wiki/Quickstart for it. About my phrase you mentioned above. The word "migrator" means a project contains migrations. It is what I mean =)

— Reply to this email directly or view it on GitHubhttps://github.com/dradovic/MigSharp/issues/47#issuecomment-19541335 .

dradovic commented 11 years ago

I'll consider distributing the console app with NuGet from the next release on. Until then, please download the current exe from the wiki page, or write a console app that fits your needs (the amount of logic contained in the console app is minimal).

dradovic commented 10 years ago

This is resolved in 2.2.0.