In the meanwhile, you can use sql scripts for creating the clean baseline.

one approach to migrations is, that the use of migrations isn't forever, you
develop your database and it evolves with the help of migrations, but once
in a long time (major version?)
you flush everything down into a sql-create script, and create a new blank
migration assembly to start off with, so you might want to use that approach
either way.

As for migrating a customer's live database, what you would might want to
consider is create migration packages for the major versions, each with its
own assembly, and then run them sequentially. But on the contrary, in any
case it is logical to assume, that with a major application version, a v1.0
database, and a v2.0 could not be migrated one to another because the
changes are too vast.

Hope that helps.


On Mon, Feb 9, 2009 at 11:32 PM, Jonathon Rossi <j...@jonorossi.com> wrote:

> The SchemaDumper has always been unfinished. It only does the very basics
> of a table structure. See the code here. Patches are always welcome:
>
>
> http://code.google.com/p/migratordotnet/source/browse/trunk/src/Migrator/Tools/SchemaDumper.cs
>
>
> On Tue, Feb 10, 2009 at 7:25 AM, Roger <em...@rogerguess.net> wrote:
>
>>
>> Ok, one step closer... I got it to generate a file, but it is only
>> doing table names and columns. It is ignoring column data type,
>> lenght, indexes, and keys. Is there an additional setting for the -
>> dump command?
>>
>> Thanks,
>>
>> On Feb 9, 2:57 pm, Roger <em...@rogerguess.net> wrote:
>> > Doh.. ok:
>> >
>> > migrator.console SqlServer "Database=xxx;Data Source=xxx;User
>> > Id=xxx;Password=xxx" migrationAssembly="MigrationTest.dll" -dump
>> > test.cs
>> >
>> > On Feb 9, 2:53 pm, Roger <em...@rogerguess.net> wrote:
>> >
>> > > Ah, excellent! But I am having issues. I am trying a batch file to
>> > > execute via the console, because I was not sure how to add what I
>> > > needed to the MSBuild task. Here is what I tried:
>> >
>> > > migrator.console provider=sqlserver
>> > > connectionstring="Database=xxxx;Data Source=xxxx;User
>> > > Id=xxxx;Password=xxxx" migrationAssembly="MigrationTest.dll" -dump
>> > > test.cs
>> >
>> > > I built the MigrationTest.dll with simple class:
>> > > using System;
>> > > using System.Collections.Generic;
>> > > using System.Linq;
>> > > using System.Text;
>> > > using Migrator.Framework;
>> >
>> > > namespace MigrationTest
>> > > {
>> > >     public class Class1: Migration
>> > >     {
>> > >         public override void Up()
>> > >         {
>> > >             // Create stuff
>> > >         }
>> > >         public override void Down()
>> > >         {
>> > >             // Remove the same stuff
>> > >         }
>> > >     }
>> >
>> > > }
>> >
>> > > Getting this error:
>> >
>> > > C:\Development\MigrationTesting\MigrationTest\MigrationTest
>> > > \Migrator.net>dump
>> >
>> > > C:\Development\MigrationTesting\MigrationTest\MigrationTest
>> > > \Migrator.net>migrato
>> > > r.console provider=sqlserver connectionstring="Database=svrlat;Data
>> > > Source=webte
>> > > sting;User Id=webtester;Password=Loans123"
>> > > migrationAssembly="MigrationTest.dll"
>> > >  -dump test.cs
>> > > System.TypeLoadException: Could not load type
>> > > 'Migrator.Providers.provider=sqlse
>> > > rver.provider=sqlserverTransformationProvider' from assembly
>> > > 'Migrator.Providers
>> > > , Version=0.7.0.21798, Culture=neutral, PublicKeyToken=null'.
>> > >    at System.Reflection.Assembly._GetType(String name, Boolean
>> > > throwOnError, Boo
>> > > lean ignoreCase)
>> > >    at System.Reflection.Assembly.GetType(String name, Boolean
>> > > throwOnError, Bool
>> > > ean ignoreCase)
>> > >    at Migrator.ProviderFactory.Create(String providerName, String
>> > > connectionStri
>> > > ng) in c:\work\other projects\migratordotnet\migratordotnet-trunk\src
>> > > \Migrator\P
>> > > roviderFactory.cs:line 41
>> > >    at Migrator.Tools.SchemaDumper..ctor(String provider, String
>> > > connectionString
>> > > ) in c:\work\other projects\migratordotnet\migratordotnet-trunk\src
>> > > \Migrator\Too
>> > > ls\SchemaDumper.cs:line 23
>> > >    at Migrator.MigratorConsole.MigratorConsole.Dump() in c:\work\other
>> > > projects\
>> > > migratordotnet\migratordotnet-trunk\src\Migrator.Console
>> > > \MigratorConsole.cs:line
>> > >  114
>> > >    at Migrator.MigratorConsole.MigratorConsole.Run() in c:\work\other
>> > > projects\m
>> > > igratordotnet\migratordotnet-trunk\src\Migrator.Console
>> > > \MigratorConsole.cs:line
>> > > 55
>> > > C:\Development\MigrationTesting\MigrationTest\MigrationTest
>> > > \Migrator.net>
>> >
>> > > I have MigrationTest.dll, all the dll's and the console that came with
>> > > migrator.net in the same folder for now, so the error should not be
>> > > due to it not finding the path to Migrator.Providers.dll
>> >
>> > > Any ideas?
>> >
>> > > Thanks!
>> >
>> > > On Feb 9, 10:15 am, "Dotan N." <dip...@gmail.com> wrote:
>> >
>> > > > sure, look at the console tool and try -dump :)
>> >
>> > > > On Mon, Feb 9, 2009 at 6:12 PM, Roger <em...@rogerguess.net> wrote:
>> >
>> > > > > Greetings all,
>> >
>> > > > > I am curious to find out if anyone has a mechanism for reverse
>> > > > > engineering a schema as a starting point. We have an interest in
>> using
>> > > > > this library, but definitely are not interested in hand writing
>> the
>> > > > > first pass of our existing schema:P
>> >
>> > > > > Anything out there I can look at?
>> >
>> > > > > Thanks,
>> > > > > Roger
>>
>>
>
>
> --
> Jono
>
>
> >
>

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

Reply via email to