File tree Expand file tree Collapse file tree
backend/src/database/migrations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ CREATE TABLE integration.nango_mapping (
2626 FOREIGN KEY (" repositoryId" ) REFERENCES repositories(id) ON DELETE SET NULL
2727);
2828
29- CREATE INDEX ix_nango_mapping_connectionId ON integration .nango_mapping (" connectionId" );
29+ CREATE UNIQUE INDEX ix_nango_mapping_connectionId ON integration .nango_mapping (" connectionId" );
3030CREATE INDEX ix_nango_mapping_repositoryId ON integration .nango_mapping (" repositoryId" );
3131
3232-- Migrate existing data from settings.nangoMapping
@@ -48,7 +48,8 @@ WHERE i.platform = 'github-nango'
4848 AND i .settings - > ' nangoMapping' IS NOT NULL
4949ON CONFLICT DO NOTHING;
5050
51- -- Remove nangoMapping from settings
51+ -- Remove nangoMapping from settings (only github-nango integrations ever stored this key)
5252UPDATE integrations
5353SET settings = settings - ' nangoMapping'
54- WHERE settings- > ' nangoMapping' IS NOT NULL ;
54+ WHERE platform = ' github-nango'
55+ AND settings- > ' nangoMapping' IS NOT NULL ;
You can’t perform that action at this time.
0 commit comments