I don't use MSSQL enough to know if that is a generally acceptable workaround or if we should still make sure we add support for what you were tryign to do in a future release. Does anyone have an opinion?
Nathan ________________________________ From: Angus Gratton [mailto:[email protected]] Sent: Mon 2/23/2009 8:17 AM To: [email protected] Subject: Re: [Liquibase-user] MSSQL 2005 + Liquibase diff, shortcoming with duplicate table names Hi Oleg, Thanks for the explanation, that makes a lot of sense. I actually found a workaround which seems to work perfectly with Liquibase, without too many other edits. We were only ever using Schema as a namespacing technique, so I moved all of my tables into the "dbo" schema, ie dbo.Systems.Roles dbo.Marketing.Roles ... so now the tablename is Systems.Roles instead of just Roles. Hibernate annotations and other SQL references remain the same, as long as 'dbo' is the user's default schema. Seems to work like a charm. No more need for that other patch I contributed. - Angus Oleg Taranenko wrote: > Hi, > > I'd like to write this early but lack of the time to approve it for me > self prevent to do this. I ran into the problem when i've tried to > launch Liquibase under Eclipse/ms sql some days ago. > Main issue as I can consider, Liquibase operate with two-part name. > databaseSchema.databaseObjectName. This is valid for Oracle, MySql, > for others. But tsql operates with three part > database.databaseUser.object. Database user is a login name, with > given some role to access database. > > In your case [Systems].[Roles] and [Marketing].[Roles] are quite > different tables, but in one database. Sad, this time liqubase can not > access there in one session. Liquibase's attribute databaseScheme > assume that it differ on the database level, but not at user level. > You want to set to different databases, but liquibase translate it to > two different users of same database. :'( > > Short, to correct situation is need to add third dimention - > databaseUser. To access the full qualified object, i.e. table should > use notation liquibasedb.luqiubase.tableName. btw, tranansact sql > allow to skip the databaseUser liqubase*..*table. In this case > sqlserver denote to the user name running the query. If user is sa > then it substituted to dbo. databaseUser dbo is therefore a default > user. If given no database user 'dbo' should be used. All users having > role db_owner on the database get acccess to dbo's table.This is also > important for creating of the DATABASECHANGELOG and > DATABASECHANGELOGLOCK tables too. These tables have to be created at > name dbo. > > Natan, if you will refactoring this stuff, you could add the implemen > and this too. I'm ready to test it on sqlserver 2000 and sybase asa 9.0. > > Cheers, Oleg > > On Fri, Feb 20, 2009 at 10:46 PM, Angus Gratton <[email protected] > <mailto:[email protected]>> wrote: > > I just realise this only actually applies if you are using the patch I > posted yesterday, because otherwise you can't see local schemas at > all. > So I'm breaking new and unsupported ground here, please ignore me > if you > want. :-). > > Angus Gratton wrote: > > Hi Nathan & others, > > > > I wanted to report a bug/shortcoming I've found in Liquibase > diff & SQL > > Server 2005. If you have two identically named tables in different > > schema, ie > > > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Liquibase-user mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/liquibase-user > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > ------------------------------------------------------------------------ > > _______________________________________________ > Liquibase-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/liquibase-user > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Liquibase-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/liquibase-user
<<winmail.dat>>
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
_______________________________________________ Liquibase-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/liquibase-user
