Skip to content

Commit

Permalink
modify post-release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishabh17 committed Jun 4, 2024
1 parent 0e98a8a commit d23f0cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/002_add_vendor_fyle_card_mapping.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
rollback;
begin;

select COUNT(*) from export_settings where credit_card_expense_export_type = 'PURCHASE_INVOICE';

select COUNT(distinct(workspace_id)) from mapping_settings where workspace_id not in (select distinct(workspace_id) from mapping_settings where source_field = 'CORPORATE_CARD' and destination_field = 'VENDOR');

insert into mapping_settings (source_field, destination_field, import_to_fyle, is_custom, workspace_id, created_at, updated_at)
select 'CORPORATE_CARD', 'VENDOR', 'f', 'f', ws.id, now(), now()
from workspaces ws
Expand All @@ -17,4 +13,8 @@ where not exists (
and ms.destination_field = 'VENDOR'
and ms.workspace_id = ws.id
and es.credit_card_expense_export_type = 'PURCHASE_INVOICE'
);
);

select COUNT(*) from export_settings where credit_card_expense_export_type = 'PURCHASE_INVOICE';

select COUNT(distinct(workspace_id)) from mapping_settings where workspace_id not in (select distinct(workspace_id) from mapping_settings where source_field = 'CORPORATE_CARD' and destination_field = 'VENDOR');

0 comments on commit d23f0cd

Please sign in to comment.