Skip to content

Can't migrate triggers  #178

@AntoninPerrot

Description

@AntoninPerrot

Hello,

While using your tool (pretty great btw), problems with triggers occurred :

Warning: Trigger dbo].[OnDelRun ignored
Line <ALTER TABLE [dbo].[Run] ENABLE TRIGGER [OnDelRun]
> (2530) not understood. This is a bug at sqlserver2pgsql.pl line 2551, <$file> line 2530.

Here is a sample of the migration script :

...
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO


CREATE TRIGGER [dbo].[OnDelRun]
    ON [dbo].[Run]
    FOR DELETE
    AS
    BEGIN
		DISABLE TRIGGER [dbo].[OnInsUpdRun] ON [dbo].[Run];
		DISABLE TRIGGER [dbo].[OnInsUpdRunAnalysis] ON [dbo].[RunAnalysis];

		.......

		ENABLE TRIGGER [dbo].[OnInsUpdRun] ON [dbo].[Run];
		ENABLE TRIGGER [dbo].[OnInsUpdRunAnalysis] ON [dbo].[RunAnalysis];
    END
GO
ALTER TABLE [dbo].[Run] ENABLE TRIGGER [OnDelRun] 
GO
/****** Object:  Trigger [dbo].[OnInsUpdRun]    Script Date: 16/06/2023 09:50:58 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
....

Is there something particular to do or an option to activate ?
Thanks,
Antonin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions