Replace dots with underscores in MS SQL fk names.

That should help fixing #158 where MS SQL uses the following name for
one of its fkey: fk_dbo.track_dbo.artist_artistid. PostgreSQL refuses fk
names with dots in it.
This commit is contained in:
Dimitri Fontaine 2015-01-24 17:23:08 +01:00
parent 13faf3e4f8
commit 95961a42b8

View File

@ -249,7 +249,7 @@ order by SchemaName,
:for (name schema table col fschema ftable fcol)
:in (mssql-query (format nil "
SELECT
KCU1.CONSTRAINT_NAME AS 'CONSTRAINT_NAME'
REPLACE(KCU1.CONSTRAINT_NAME, '.', '_') AS 'CONSTRAINT_NAME'
, KCU1.TABLE_SCHEMA AS 'TABLE_SCHEMA'
, KCU1.TABLE_NAME AS 'TABLE_NAME'
, KCU1.COLUMN_NAME AS 'COLUMN_NAME'