Ticket #1594 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

[Patch] Oracle building creates Notice: Undefined Index: scale

Reported by: tchakkapark Owned by: jwage
Priority: minor Milestone: 1.0.4
Component: Import/Export Version: 1.0.3
Severity: Keywords: oracle undefined index scale
Cc: Has Test: no
Status: Pending Core Response Has Patch: yes

Description

Using Symfony 1.1 with sfDoctrinePlugin but with libraries from changeset 5115. This message has existed prior to the latest changeset, but I figured it might be a good time to file it in :)

Running the following command for an Oracle database:

symfony doctrine:build-schema

Yields the following for each column:

Notice: Undefined index:  scale in C:webrootv2pluginssfDoctrinePluginlibdo
ctrineDoctrineImportOracle.php on line 147

Proposed Patch:

libdoctrineDoctrineImportOracle.php line 147, changeset 5115

            $descr[$val['column_name']] = array(
               'name'       => $val['column_name'],
               'notnull'    => (bool) ($val['nullable'] === 'N'),
               'ntype'      => $val['data_type'],
               'type'       => $decl['type'][0],
               'alltypes'   => $decl['type'],
               'fixed'      => $decl['fixed'],
               'unsigned'   => $decl['unsigned'],
               'default'    => $val['data_default'],
               'length'     => $val['data_length'],
               'scale'      => $val['scale'], //remove or update this field
            );
        }

Overall, having it there does not affect my ability to build the model.

Change History

Changed 9 months ago by tchakkapark

Wanted to also note that commenting it out significantly reduces the processing time by a factor of around 10. It took approx 3-4 minutes to do the schema with the scale, while it took 5 seconds to do without.

Changed 9 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [5128]) [1.0, 1.1] fixes #1594

Note: See TracTickets for help on using tickets.