acrosman / Salesforce2Sql

Electron app to convert a Salesforce org's schema into a similarly shaped database.
MIT License
14 stars 8 forks source link

Too Many String Fields stalls schema creation #113

Closed selfuntitled closed 2 years ago

selfuntitled commented 2 years ago

Describe the bug When a table involves too many string fields, the console correctly reports "Warning: Proposed Lead schema had too many string fields for your database. All strings will be text fields instead." But schema creation stops and the UI stalls/freezes and the table is never created. Eventually the app freezes and grey screens without evidence of retries.

To Reproduce Steps to reproduce the behavior: See me for an example SQL file. Load the file, and click Generate SQL. Creating Database spinner spins, show console log shows the above error.

Expected behavior App will replace varchar with text and the table will be created. Note - as a work-around confirmed this strategy works. Often all it takes is replacing only varchar where size is > 255 Characters. In one cases where that strategy didn't work, reduced all Varchar 255 to 250 and the table inserted.

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

acrosman commented 2 years ago

It should be replacing all those Varchar fields with Text fields to avoid that limit. I'll have to investigate why that's the case.

acrosman commented 2 years ago

I think this is actually related #110. Also the interface could stand to be improved to give me feedback during the process of creating tables which can take a few minutes to complete.

acrosman commented 2 years ago

@selfuntitled if you want to re-test this, you can clone the repo and run from the current main branch to see if the problem persists.

acrosman commented 2 years ago

There are some cases where this still persists. Working on additional adjustments.