Database Migrations

53 views
Skip to first unread message

Dustin Venegas

unread,
May 18, 2010, 2:34:40 PM5/18/10
to psake-users
I'm looking to build some database migration tools for a project I'm
working on. Has anyone had any luck getting tarantino or anything else
working in their projects with psake/powershell?

--
You received this message because you are subscribed to the Google Groups "psake-users" group.
To post to this group, send email to psake...@googlegroups.com.
To unsubscribe from this group, send email to psake-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psake-users?hl=en.

Eric Hexter

unread,
May 18, 2010, 3:14:30 PM5/18/10
to psake...@googlegroups.com

Tarantino has a exe command line tool, it works well. See the code camp server project

sent from my mobile phone

James Kovacs

unread,
May 18, 2010, 9:55:38 PM5/18/10
to psake...@googlegroups.com
As Eric mentiond, Tarantino has a command line tool. My intent when designing psake was to be able to take whatever you run at a PowerShell prompt and copy/paste it into your build script. The only hitch is that most EXEs return 0 for success and non-zero for failure and PowerShell doesn't automatically convert these exit codes into exceptions. We include a helper function, Exec, that does exactly this. Using msbuild as an example since I don't have Tarantino's calling conventions handy...

msbuild Foo.sln /maxcpucount

becomes:

task RunFoo -depends RunBar {
  exec { msbuild Foo.sln /maxcpucount }
}

HTH,
James
--
James Kovacs, B.Sc., M.Sc., MCSD, MCT
Microsoft MVP, ASP/ASP.NET
http://www.jameskovacs.com
jko...@post.harvard.edu | @jameskovacs
403-397-3177 (mobile)

Jonathan Matheus

unread,
May 18, 2010, 10:55:25 PM5/18/10
to psake...@googlegroups.com
I've created a PowerShell module that uses Tarantino with Sql Compare to do my migrations. I've attached a simplified example in using it with psake. Feel free to email me if you have any questions.

Jonathan
TarantinoSample.z0p

Joshua Poehls

unread,
May 20, 2010, 10:18:38 AM5/20/10
to psake...@googlegroups.com
DotNetMigrations (http://dotnetmigrations.codeplex.com/) is another migrations tool that has a command line interface and so would work well from a psake script.

DNM also uses SQL scripts for the migrations if that is something you prefer.

- Joshua Poehls

Dustin Venegas

unread,
May 20, 2010, 11:57:41 AM5/20/10
to psake...@googlegroups.com
Jonathan,

That zip file is full of goodies. I appreciate you taking the time to get that together and send it over. I'm pretty ecstatic that someone has already taken the time to build wrappers for all of that.

Have you thought about adding any of those modules to PSake-Contrib?

Joshua,

I think I'll take a look at DNM as well and see which approach the team enjoys more. We (regretfully) don't have access to SQL Compare which Tarantino seems to rely on pretty heavily.
--
Dustin Eric Venegas
Dustin....@gmail.com

Joshua Poehls

unread,
May 20, 2010, 12:05:38 PM5/20/10
to psake...@googlegroups.com
Dustin;

Definitely let me know if you have any questions about DNM during your eval.

- Joshua Poehls

jmatheus

unread,
May 20, 2010, 7:23:23 PM5/20/10
to psake-users
I've thought about making some sort of project for these modules. I'm
not sure if these should be part of a psake contrib project, since
these modules aren't tied to psake in any way. On the flip side, I do
think that relating the 2 would help out psake newbies who are used to
all the convenient nant tasks. I know it took me a while to do things
that are simple in nant like compile with msbuild or zip up a file in
psake.

Anyone else have an opinion?

Jonathan

On May 20, 10:57 am, Dustin Venegas <dustin.vene...@gmail.com> wrote:
> Jonathan,
>
> That zip file is full of goodies. I appreciate you taking the time to get
> that together and send it over. I'm pretty ecstatic that someone has already
> taken the time to build wrappers for all of that.
>
> Have you thought about adding any of those modules to PSake-Contrib?
>
> Joshua,
>
> I think I'll take a look at DNM as well and see which approach the team
> enjoys more. We (regretfully) don't have access to SQL Compare which
> Tarantino seems to rely on pretty heavily.
>
>
>
> On Thu, May 20, 2010 at 9:18 AM, Joshua Poehls <jos...@zduck.com> wrote:
> > DotNetMigrations (http://dotnetmigrations.codeplex.com/) is another
> > migrations tool that has a command line interface and so would work well
> > from a psake script.
>
> > DNM also uses SQL scripts for the migrations if that is something you
> > prefer.
>
> > - Joshua Poehls
>
> > On Tue, May 18, 2010 at 9:55 PM, Jonathan Matheus <jmath...@gmail.com>wrote:
>
> >> I've created a PowerShell module that uses Tarantino with Sql Compare to
> >> do my migrations. I've attached a simplified example in using it with psake.
> >> Feel free to email me if you have any questions.
>
> >> Jonathan
>
> >> On Tue, May 18, 2010 at 1:34 PM, Dustin Venegas <dustin.vene...@gmail.com
> >> > wrote:
>
> >>> I'm looking to build some database migration tools for a project I'm
> >>> working on. Has anyone had any luck getting tarantino or anything else
> >>> working in their projects with psake/powershell?
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "psake-users" group.
> >>> To post to this group, send email to psake...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> psake-users...@googlegroups.com<psake-users%2Bunsu...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/psake-users?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "psake-users" group.
> >> To post to this group, send email to psake...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> psake-users...@googlegroups.com<psake-users%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/psake-users?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "psake-users" group.
> > To post to this group, send email to psake...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > psake-users...@googlegroups.com<psake-users%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/psake-users?hl=en.
>
> --
> Dustin Eric Venegas
> Dustin.Vene...@gmail.com
>
> --
> You received this message because you are subscribed to the Google Groups "psake-users" group.
> To post to this group, send email to psake...@googlegroups.com.
> To unsubscribe from this group, send email to psake-users...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/psake-users?hl=en.

Dustin Venegas

unread,
May 20, 2010, 7:41:07 PM5/20/10
to psake...@googlegroups.com
Well, now that you've finally forced me to get up to speed with Powershell 2.0 modules...

On a serious note, I'm working on an NUnit module now and shamelessly borrowed your DOS.psm1. Have we decided how the PSake-Contrib is going to be laid out?
--
Dustin Eric Venegas
Dustin....@gmail.com

Reply all
Reply to author
Forward
0 new messages