From c439a295ca6e9486b90d85d61a97193c600dfb85 Mon Sep 17 00:00:00 2001 From: Shwetabh Kumar Date: Fri, 31 Mar 2023 12:47:36 +0530 Subject: [PATCH] Updating platform connector version (#404) * Updating platform connector version * Updating accounting mappings * Fixing versions and fixture --- requirements.txt | 4 +- .../reset_db_fixtures/reset_db.sql | 158 +++++++++++++++--- 2 files changed, 139 insertions(+), 23 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3c8ed937..566e7a1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,8 +20,8 @@ django-sendgrid-v5==1.2.0 enum34==1.1.10 future==0.18.2 fyle==0.30.0 -fyle-accounting-mappings==1.24.1 -fyle-integrations-platform-connector==1.23.2 +fyle-accounting-mappings==1.25.2 +fyle-integrations-platform-connector==1.27.0 fyle-rest-auth==1.5.0 gevent==22.10.2 gunicorn==20.1.0 diff --git a/tests/sql_fixtures/reset_db_fixtures/reset_db.sql b/tests/sql_fixtures/reset_db_fixtures/reset_db.sql index 2743de59..1a376160 100644 --- a/tests/sql_fixtures/reset_db_fixtures/reset_db.sql +++ b/tests/sql_fixtures/reset_db_fixtures/reset_db.sql @@ -745,6 +745,45 @@ CREATE TABLE public.expense_attributes ( ALTER TABLE public.expense_attributes OWNER TO postgres; +-- +-- Name: expense_fields; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.expense_fields ( + id integer NOT NULL, + attribute_type character varying(255) NOT NULL, + source_field_id integer NOT NULL, + is_enabled boolean NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + workspace_id integer NOT NULL +); + + +ALTER TABLE public.expense_fields OWNER TO postgres; + +-- +-- Name: expense_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +CREATE SEQUENCE public.expense_fields_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public.expense_fields_id_seq OWNER TO postgres; + +-- +-- Name: expense_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- + +ALTER SEQUENCE public.expense_fields_id_seq OWNED BY public.expense_fields.id; + + -- -- Name: expense_filters; Type: TABLE; Schema: public; Owner: postgres -- @@ -988,7 +1027,8 @@ CREATE TABLE public.mapping_settings ( workspace_id integer NOT NULL, import_to_fyle boolean NOT NULL, is_custom boolean NOT NULL, - source_placeholder text + source_placeholder text, + expense_field_id integer ); @@ -2066,6 +2106,13 @@ ALTER TABLE ONLY public.errors ALTER COLUMN id SET DEFAULT nextval('public.error ALTER TABLE ONLY public.expense_attributes ALTER COLUMN id SET DEFAULT nextval('public.fyle_accounting_mappings_expenseattribute_id_seq'::regclass); +-- +-- Name: expense_fields id; Type: DEFAULT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.expense_fields ALTER COLUMN id SET DEFAULT nextval('public.expense_fields_id_seq'::regclass); + + -- -- Name: expense_filters id; Type: DEFAULT; Schema: public; Owner: postgres -- @@ -2417,6 +2464,10 @@ COPY public.auth_permission (id, name, content_type_id, codename) FROM stdin; 174 Can change expense filter 44 change_expensefilter 175 Can delete expense filter 44 delete_expensefilter 176 Can view expense filter 44 view_expensefilter +177 Can add expense field 45 add_expensefield +178 Can change expense field 45 change_expensefield +179 Can delete expense field 45 delete_expensefield +180 Can view expense field 45 view_expensefield \. @@ -3664,6 +3715,7 @@ COPY public.django_content_type (id, app_label, model) FROM stdin; 42 tasks error 43 workspaces lastexportdetail 44 fyle expensefilter +45 fyle_accounting_mappings expensefield \. @@ -3828,6 +3880,9 @@ COPY public.django_migrations (id, app, name, applied) FROM stdin; 154 fyle 0028_auto_20230112_1050 2023-02-17 12:20:16.418625+00 155 fyle 0029_auto_20230215_0539 2023-02-17 12:20:16.570982+00 156 fyle_accounting_mappings 0019_auto_20230105_1104 2023-02-17 14:18:47.347852+00 +157 fyle_accounting_mappings 0020_auto_20230302_0519 2023-03-31 07:13:21.695785+00 +158 fyle_accounting_mappings 0021_auto_20230323_0557 2023-03-31 07:13:21.711317+00 +159 workspaces 0038_auto_20230321_0732 2023-03-31 07:13:21.72162+00 \. @@ -32969,6 +33024,14 @@ COPY public.expense_attributes (id, attribute_type, display_name, value, source_ \. +-- +-- Data for Name: expense_fields; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.expense_fields (id, attribute_type, source_field_id, is_enabled, created_at, updated_at, workspace_id) FROM stdin; +\. + + -- -- Data for Name: expense_filters; Type: TABLE DATA; Schema: public; Owner: postgres -- @@ -33244,23 +33307,23 @@ COPY public.last_export_details (id, last_exported_at, export_mode, total_expens -- Data for Name: mapping_settings; Type: TABLE DATA; Schema: public; Owner: postgres -- -COPY public.mapping_settings (id, source_field, destination_field, created_at, updated_at, workspace_id, import_to_fyle, is_custom, source_placeholder) FROM stdin; -5 COST_CENTER CLASS 2022-05-23 04:16:18.306273+00 2022-05-23 04:16:18.306311+00 2 t f \N -6 PROJECT DEPARTMENT 2022-05-23 04:16:18.342552+00 2022-05-23 04:16:18.342635+00 2 t f \N -7 NETSUITE_SAGE_INTACCT_CUSTOMER_QBO_DEPARTMENT_HEY CUSTOMER 2022-05-23 04:16:19.65211+00 2022-05-23 04:16:19.652148+00 2 t t \N -8 CATEGORY ACCOUNT 2022-05-23 04:16:19.674894+00 2022-05-23 04:16:19.674932+00 2 f f \N -9 CORPORATE_CARD CREDIT_CARD_ACCOUNT 2022-05-23 11:10:54.842379+00 2022-05-23 11:10:54.842418+00 3 f f \N -10 COST_CENTER CLASS 2022-05-23 11:11:13.965014+00 2022-05-23 11:11:13.965052+00 3 t f \N -11 PROJECT DEPARTMENT 2022-05-23 11:11:14.008838+00 2022-05-23 11:11:14.008881+00 3 t f \N -12 KLASS CUSTOMER 2022-05-23 11:11:15.025025+00 2022-05-23 11:11:15.025067+00 3 t t \N -13 CATEGORY ACCOUNT 2022-05-23 11:11:15.060901+00 2022-05-23 11:11:15.060975+00 3 f f \N -14 COST_CENTER CLASS 2022-05-23 11:34:58.498423+00 2022-05-23 11:34:58.498466+00 4 t f \N -15 PROJECT DEPARTMENT 2022-05-23 11:34:58.532986+00 2022-05-23 11:34:58.533026+00 4 t f \N -16 TESTING_THIS CUSTOMER 2022-05-23 11:34:59.509529+00 2022-05-23 11:34:59.509567+00 4 t t \N -17 CATEGORY ACCOUNT 2022-05-23 11:34:59.540883+00 2022-05-23 11:34:59.540959+00 4 f f \N -18 CORPORATE_CARD CREDIT_CARD_ACCOUNT 2022-05-25 14:40:39.632972+00 2022-05-25 14:40:39.633082+00 5 f f \N -19 TAX_GROUP TAX_CODE 2022-05-25 14:40:59.508873+00 2022-05-25 14:57:28.861255+00 5 t f \N -20 CATEGORY ACCOUNT 2022-05-25 14:40:59.533893+00 2022-05-25 14:57:28.874778+00 5 f f \N +COPY public.mapping_settings (id, source_field, destination_field, created_at, updated_at, workspace_id, import_to_fyle, is_custom, source_placeholder, expense_field_id) FROM stdin; +5 COST_CENTER CLASS 2022-05-23 04:16:18.306273+00 2022-05-23 04:16:18.306311+00 2 t f \N \N +6 PROJECT DEPARTMENT 2022-05-23 04:16:18.342552+00 2022-05-23 04:16:18.342635+00 2 t f \N \N +7 NETSUITE_SAGE_INTACCT_CUSTOMER_QBO_DEPARTMENT_HEY CUSTOMER 2022-05-23 04:16:19.65211+00 2022-05-23 04:16:19.652148+00 2 t t \N \N +8 CATEGORY ACCOUNT 2022-05-23 04:16:19.674894+00 2022-05-23 04:16:19.674932+00 2 f f \N \N +9 CORPORATE_CARD CREDIT_CARD_ACCOUNT 2022-05-23 11:10:54.842379+00 2022-05-23 11:10:54.842418+00 3 f f \N \N +10 COST_CENTER CLASS 2022-05-23 11:11:13.965014+00 2022-05-23 11:11:13.965052+00 3 t f \N \N +11 PROJECT DEPARTMENT 2022-05-23 11:11:14.008838+00 2022-05-23 11:11:14.008881+00 3 t f \N \N +12 KLASS CUSTOMER 2022-05-23 11:11:15.025025+00 2022-05-23 11:11:15.025067+00 3 t t \N \N +13 CATEGORY ACCOUNT 2022-05-23 11:11:15.060901+00 2022-05-23 11:11:15.060975+00 3 f f \N \N +14 COST_CENTER CLASS 2022-05-23 11:34:58.498423+00 2022-05-23 11:34:58.498466+00 4 t f \N \N +15 PROJECT DEPARTMENT 2022-05-23 11:34:58.532986+00 2022-05-23 11:34:58.533026+00 4 t f \N \N +16 TESTING_THIS CUSTOMER 2022-05-23 11:34:59.509529+00 2022-05-23 11:34:59.509567+00 4 t t \N \N +17 CATEGORY ACCOUNT 2022-05-23 11:34:59.540883+00 2022-05-23 11:34:59.540959+00 4 f f \N \N +18 CORPORATE_CARD CREDIT_CARD_ACCOUNT 2022-05-25 14:40:39.632972+00 2022-05-25 14:40:39.633082+00 5 f f \N \N +19 TAX_GROUP TAX_CODE 2022-05-25 14:40:59.508873+00 2022-05-25 14:57:28.861255+00 5 t f \N \N +20 CATEGORY ACCOUNT 2022-05-25 14:40:59.533893+00 2022-05-25 14:57:28.874778+00 5 f f \N \N \. @@ -33690,7 +33753,7 @@ SELECT pg_catalog.setval('public.auth_group_permissions_id_seq', 1, false); -- Name: auth_permission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.auth_permission_id_seq', 176, true); +SELECT pg_catalog.setval('public.auth_permission_id_seq', 180, true); -- @@ -33725,14 +33788,14 @@ SELECT pg_catalog.setval('public.django_admin_log_id_seq', 1, false); -- Name: django_content_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.django_content_type_id_seq', 44, true); +SELECT pg_catalog.setval('public.django_content_type_id_seq', 45, true); -- -- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.django_migrations_id_seq', 156, true); +SELECT pg_catalog.setval('public.django_migrations_id_seq', 159, true); -- @@ -33763,6 +33826,13 @@ SELECT pg_catalog.setval('public.employee_mappings_id_seq', 14, true); SELECT pg_catalog.setval('public.errors_id_seq', 39, true); +-- +-- Name: expense_fields_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres +-- + +SELECT pg_catalog.setval('public.expense_fields_id_seq', 1, false); + + -- -- Name: expense_filters_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- @@ -34172,6 +34242,22 @@ ALTER TABLE ONLY public.expense_attributes ADD CONSTRAINT expense_attributes_value_attribute_type_wor_a06aa6b3_uniq UNIQUE (value, attribute_type, workspace_id); +-- +-- Name: expense_fields expense_fields_attribute_type_workspace_id_22d6ab60_uniq; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.expense_fields + ADD CONSTRAINT expense_fields_attribute_type_workspace_id_22d6ab60_uniq UNIQUE (attribute_type, workspace_id); + + +-- +-- Name: expense_fields expense_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.expense_fields + ADD CONSTRAINT expense_fields_pkey PRIMARY KEY (id); + + -- -- Name: expense_filters expense_filters_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- @@ -34768,6 +34854,13 @@ CREATE INDEX errors_expense_group_id_86fafc8b ON public.errors USING btree (expe CREATE INDEX errors_workspace_id_a33dd61b ON public.errors USING btree (workspace_id); +-- +-- Name: expense_fields_workspace_id_b60af18c; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX expense_fields_workspace_id_b60af18c ON public.expense_fields USING btree (workspace_id); + + -- -- Name: expense_filters_workspace_id_0ecd4914; Type: INDEX; Schema: public; Owner: postgres -- @@ -34845,6 +34938,13 @@ CREATE INDEX fyle_expensegroup_expenses_expensegroup_id_1af76dce ON public.expen CREATE INDEX fyle_expensegroup_workspace_id_c9b3a8e4 ON public.expense_groups USING btree (workspace_id); +-- +-- Name: mapping_settings_expense_field_id_e9afc6c2; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX mapping_settings_expense_field_id_e9afc6c2 ON public.mapping_settings USING btree (expense_field_id); + + -- -- Name: qbo_expense_lineitems_qbo_expense_id_92c68be0; Type: INDEX; Schema: public; Owner: postgres -- @@ -35123,6 +35223,14 @@ ALTER TABLE ONLY public.errors ADD CONSTRAINT errors_workspace_id_a33dd61b_fk_workspaces_id FOREIGN KEY (workspace_id) REFERENCES public.workspaces(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: expense_fields expense_fields_workspace_id_b60af18c_fk_workspaces_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.expense_fields + ADD CONSTRAINT expense_fields_workspace_id_b60af18c_fk_workspaces_id FOREIGN KEY (workspace_id) REFERENCES public.workspaces(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: expense_filters expense_filters_workspace_id_0ecd4914_fk_workspaces_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- @@ -35219,6 +35327,14 @@ ALTER TABLE ONLY public.last_export_details ADD CONSTRAINT last_export_details_workspace_id_0af72f0e_fk_workspaces_id FOREIGN KEY (workspace_id) REFERENCES public.workspaces(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: mapping_settings mapping_settings_expense_field_id_e9afc6c2_fk_expense_fields_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.mapping_settings + ADD CONSTRAINT mapping_settings_expense_field_id_e9afc6c2_fk_expense_fields_id FOREIGN KEY (expense_field_id) REFERENCES public.expense_fields(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: mapping_settings mapping_settings_workspace_id_590f14f3_fk_workspaces_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres --