Changeset 8514


Ignore:
Timestamp:
13/08/12 14:16:15 (7 years ago)
Author:
mnagni
Message:

Incomplete - # 22534: Add versiojn number to the gui page
 http://team.ceda.ac.uk/trac/ceda/ticket/22534
Correct party_indexes definition (from now on, ON DELETE = cascade)

Location:
mauRepo/MolesManager/trunk/cedaMoles
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/cedaMoles/MolesManager/db/after_flush.py

    r8486 r8514  
    4747    # deleted an existing one             
    4848    for instance in session.deleted: 
    49         if isinstance(instance, MO_ResponsiblePartyInfo): 
    50             deletePartyIndexes(instance, session) 
     49        pass 
  • mauRepo/MolesManager/trunk/cedaMoles/MolesManager/db/partyIndexes.py

    r8486 r8514  
    6363    ''' 
    6464    party_indexes_table = Table('party_indexes', metadata, \ 
    65                        Column('id', Integer, ForeignKey('mo_responsiblepartyinfo.id'), \ 
     65                       Column('id', Integer, ForeignKey('mo_responsiblepartyinfo.id', \ 
     66                                                        ondelete="CASCADE"), \ 
    6667                              primary_key=True, unique=True), 
    6768                       Column('party_orders', String)) 
     
    132133        the partyID:orderIndex         
    133134    """ 
    134     if partyIndex is None: 
     135    if partyIndex is None or partyIndex.party_orders is None or len(partyIndex.party_orders) == 0: 
    135136        return 
    136137    pi = dict((x.split(':')[0], x.split(':')[1]) for x in partyIndex.party_orders.split(',')) 
  • mauRepo/MolesManager/trunk/cedaMoles/MolesManager/moles3epb.py

    r8513 r8514  
    3232''' 
    3333from cedaMoles.libs.epb import EPB 
    34 from ea_model.moles3_4.observationcollection.mo_observationcollection import MO_ObservationCollection 
     34from ea_model.moles3_4.observationcollection.mo_observationcollection \ 
     35    import MO_ObservationCollection 
    3536from ea_model.moles3_4.observation.mo_observation import MO_Observation 
    3637from sqlalchemy import Table, Column, ForeignKey, Integer, String, event 
     
    3839from cedaMoles.MolesManager.ceda_guid import CedaGUID 
    3940from sqlalchemy.orm.collections import InstrumentedList 
    40 from ea_model.iso_19115_2006_metadata_corrigendum.reference_system_information.md_identifier import MD_Identifier 
    41 from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_citation import CI_Citation 
    42 from ea_model.iso_19115_2006_metadata_corrigendum.extent_information.ex_geographicboundingbox import EX_GeographicBoundingBox 
     41from ea_model.iso_19115_2006_metadata_corrigendum.\ 
     42    reference_system_information.md_identifier import MD_Identifier 
     43from ea_model.iso_19115_2006_metadata_corrigendum.\ 
     44    citation_and_responsible_party_information.ci_citation import CI_Citation 
     45from ea_model.iso_19115_2006_metadata_corrigendum.\ 
     46    extent_information.ex_geographicboundingbox import EX_GeographicBoundingBox 
    4347from cedaMoles.libs.postgisutil import create_st_setSRID, unifyGeometriesAsBBox 
    44 from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    45 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
     48from ea_model.ceda_metadatamodel.ceda_observationcollection.\ 
     49    ceda_observationcollection import CEDA_ObservationCollection 
     50from ea_model.ceda_metadatamodel.ceda_observation.\ 
     51    ceda_observation import CEDA_Observation 
    4652from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project 
    4753from cedaMoles.MolesManager.codelist import MM_RoleValue, getCLValue 
  • mauRepo/MolesManager/trunk/cedaMoles/dropAllTables.sql

    r8424 r8514  
    771771DROP TABLE IF EXISTS vouchers CASCADE; 
    772772DROP TABLE IF EXISTS weight CASCADE; 
     773DROP TABLE IF EXISTS party_indexes CASCADE; 
    773774 
    774775 
     
    995996DROP SEQUENCE IF EXISTS gm_linestring_id_seq CASCADE; 
    996997DROP SEQUENCE IF EXISTS gm_object_id_seq CASCADE; 
    997 DROP SEQUENCE IF EXISTS gm_offsetcurve_id_seq CASCADE; 
     998DROP SEQUENCE IF EXISTS gm_offsetcurve_id_seq CASCADE;     
    998999DROP SEQUENCE IF EXISTS gm_orientablecurve_id_seq CASCADE; 
    9991000DROP SEQUENCE IF EXISTS gm_orientableprimitive_id_seq CASCADE; 
     
    10141015DROP SEQUENCE IF EXISTS gm_surface_id_seq CASCADE; 
    10151016DROP SEQUENCE IF EXISTS gm_surfacepatch_id_seq CASCADE; 
    1016 DROP SEQUENCE IF EXISTS gm_tin_id_seq CASCADE; 
     1017DROP SEQUENCE IF EXISTS gm_tin_id_seq CASCADE;     
    10171018DROP SEQUENCE IF EXISTS gm_triangle_id_seq CASCADE; 
    10181019DROP SEQUENCE IF EXISTS gm_triangulatedsurface_id_seq CASCADE; 
Note: See TracChangeset for help on using the changeset viewer.