« Return to Thread: Problem with schema reference not getting picked up in raw sql
Sorry for the slow dely. It got behind on the –devel list and
missed that I needed to reply to a couple emails.
The code is currently not checking for parameters inside strings,
so you’ll have to use the workaround for now. I’ll add it as a feature that
should be implemented after/during a refactoring I a starting on this week., so
it should be an option in 1.10.
Nathan
From: Michael Melvin
[mailto:mike@...]
Sent: Wednesday, April 08, 2009 2:45 PM
To: liquibase-devel@...
Subject: [Liquibase-devel] Problem with schema reference not getting
pickedup in raw sql
Hey
all,
We
are using postgres with the postgis spatial extensions. We have 2 schemas
within a database that we keep in sync (one is a test schema and one is
production). We have specified the defaultSchemaName in our pom.xml for
doing the migrate, however the raw sql does not insert the schema name into the
sql to be executed. As a result, if we are creating a spatial index
(using GIST), it fails on the second pass as it is trying to create it on the
first schema not the second.
Our
changeset looks like this:
<changeSet id="15"
author="MDG">
<comment>Adding index to
upper_tier table</comment>
<sql>create index
upper_tier_boundary_idx on upper_tier using gist (boundary
GIST_GEOMETRY_OPS)</sql>
</changeSet>
We
have noted that we can work around it by doing the following:
<changeSet id="15"
author="MDG">
<comment>Adding index to
upper_tier table</comment>
<createIndex indexName="upper_tier_boundary_idx"
tableName="upper_tier using gist" >
<column name="boundary
GIST_GEOMETRY_OPS"/>
</createIndex>
</changeSet>
My
question is, is there a way to refer to the schema in the xml file for cases
like these? Ie. using a ${defaultSchemaName} within the xml itself?
-mike
“I
don't think that the right time to tell a dog not to pee on the carpet is
semiannually.”
House MD on
performance reviews
« Return to Thread: Problem with schema reference not getting picked up in raw sql
| Free embeddable forum powered by Nabble | Forum Help |