Uploaded image for project: 'Metadata Mapping Module'
  1. Metadata Mapping Module
  2. MAP-41

Correct the sequence name to as created in PostgreSQL db

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • 1.3.5
    • None

    Description

      While testing the emr api module, a service call is made to metadata mapping module while initialization and an error is raised for incorrect sequence mapped here in case of PostgreSQL. After checking with db it is seen that the sequence created is metadatamapping_metadata_term_mapp_metadata_term_mapping_id_seq instead of the expected name metadatamapping_metadata_term_mapping_metadata_term_mapping_id_seq. Correct the sequence name.

      Why this behaviour ?

      There is a limit to maximum length of the name of sequence in PostgreSQL. When trying to rename the sequence with query :

      {{ALTER SEQUENCE }}
      {{ metadatamapping_metadata_term_mapp_metadata_term_mapping_id_seq RENAME }}
      {{ TO metadatamapping_metadata_term_mapping_metadata_term_mapping_id_seq;}}

      We get output as :

       NOTICE: identifier "metadatamapping_metadata_term_mapping_metadata_term_mapping_id_seq" will be truncated to "metadatamapping_metadata_term_mapping_metadata_term_mapping_id_"
      {{ ALTER SEQUENCE}}

      Query returned successfully in 94 msec.

      So postgresql can never store the original sequence name we need.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                aman Aman Mishra
                aman Aman Mishra
                Daniel Kayiwa Daniel Kayiwa
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: