We will focus on the scripting section of the code only and not the extraction section. The scripting create method for indexes accepts a parameter [withOptions] true/false. This parameter determines if we script any options for the indexes. Here is the issue that this code was started on: Issue #3611. You can take a look at class ScriptIndex line 546 "if (withOptions) { ... }"
Should the script index logic be based on scripting an index with all its logical parts vs scripting an index with all its logical parts plus its storage information. If this is the case we will need to identify index logical information vs index storage information and modify the scripting so that the [withOptions] flag to a withStorage] flag and consider script index to mean script all index info except the storage information.
Example: Sybase ASE 15: CREATE INDEX <index_name> on <table> (<columns>) WITH ignore_dup_row
This [WITH ignore_dup_row] currently only gets scripted if the withOptions clause is passed but this is part of the logic index. If we compared 2 schemas and this option on an index was different in each schema then the compare would not show difference unless the script full index was created, but the user may not want the storage info. This would show the logical index as equal even though this option is different.
In the schema compare the option that would cause the [withOptions] flag to be passed as true is the [x] Include Storage. In the schema script generator the option is called [x] Include Table Storage. Should we add its own flag for this? Should we change this to say Include Storage as it affects more then just table storage.
There are also 3 other areas that have a script full. Does this work as it should? Should we analyze each of these to make sure they are working correctly. Table -> Script Create Full, User -> Script Create Full, Role -> Script Create Full.