feat(writer): add continue-on-error option for SQL writers
* Introduce ContinueOnError option to WriterOptions * Update writer functions to support continue-on-error behavior * Modify migration and database writing to handle continue-on-error
This commit is contained in:
@@ -31,7 +31,7 @@ BEGIN
|
||||
IF current_pk_name IS NOT NULL
|
||||
AND NOT current_pk_matches
|
||||
AND current_pk_name IN ({{.AutoGenNames}}) THEN
|
||||
EXECUTE 'ALTER TABLE {{qual_table .SchemaName .TableName}} DROP CONSTRAINT ' || quote_ident(current_pk_name);
|
||||
EXECUTE 'ALTER TABLE {{qual_table .SchemaName .TableName}} DROP CONSTRAINT ' || quote_ident(current_pk_name) || ' CASCADE';
|
||||
END IF;
|
||||
|
||||
-- Add the desired primary key only when no matching primary key already exists.
|
||||
|
||||
Reference in New Issue
Block a user