cubicweb/hooks/syncschema.py
changeset 11767 432f87a63057
parent 11765 9cb215e833b0
child 11774 51c160677afe
equal deleted inserted replaced
11766:d8de1ac21f36 11767:432f87a63057
    21 - perform physical update on the source when necessary
    21 - perform physical update on the source when necessary
    22 
    22 
    23 checking for schema consistency is done in hooks.py
    23 checking for schema consistency is done in hooks.py
    24 """
    24 """
    25 
    25 
    26 __docformat__ = "restructuredtext en"
       
    27 from cubicweb import _
       
    28 
       
    29 import json
    26 import json
    30 from copy import copy
    27 from copy import copy
    31 
    28 
    32 from yams.schema import BASE_TYPES, BadSchemaDefinition, RelationDefinitionSchema
    29 from yams.schema import BASE_TYPES, BadSchemaDefinition, RelationDefinitionSchema
    33 from yams.constraints import UniqueConstraint
    30 from yams.constraints import UniqueConstraint
    34 from yams import buildobjs as ybo, convert_default_value
    31 from yams import buildobjs as ybo, convert_default_value
    35 
    32 
    36 from logilab.common.decorators import clear_cache
    33 from logilab.common.decorators import clear_cache
    37 
    34 
       
    35 from cubicweb import _
    38 from cubicweb import validation_error
    36 from cubicweb import validation_error
    39 from cubicweb.predicates import is_instance
    37 from cubicweb.predicates import is_instance
    40 from cubicweb.schema import (SCHEMA_TYPES, META_RTYPES, VIRTUAL_RTYPES,
    38 from cubicweb.schema import (SCHEMA_TYPES, META_RTYPES, VIRTUAL_RTYPES,
    41                              CONSTRAINTS, UNIQUE_CONSTRAINTS, ETYPE_NAME_MAP)
    39                              CONSTRAINTS, UNIQUE_CONSTRAINTS, ETYPE_NAME_MAP)
    42 from cubicweb.server import hook, schemaserial as ss, schema2sql as y2sql
    40 from cubicweb.server import hook, schemaserial as ss, schema2sql as y2sql