cubicweb/misc/migration/bootstrapmigration_repository.py
changeset 12567 26744ad37953
parent 11774 51c160677afe
child 12715 d59570643a49
equal deleted inserted replaced
12566:6b3523f81f42 12567:26744ad37953
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """Always executed before all others in server migration
    18 """Always executed before all others in server migration
    19 
    19 
    20 it should only include low level schema changes
    20 it should only include low level schema changes
    21 """
    21 """
    22 
       
    23 from __future__ import print_function
       
    24 
       
    25 from six import text_type
       
    26 
       
    27 from cubicweb import ConfigurationError
    22 from cubicweb import ConfigurationError
    28 from cubicweb.server.session import hooks_control
    23 from cubicweb.server.session import hooks_control
    29 from cubicweb.server import schemaserial as ss
    24 from cubicweb.server import schemaserial as ss
    30 
    25 
    31 applcubicwebversion, cubicwebversion = versions_map['cubicweb']
    26 applcubicwebversion, cubicwebversion = versions_map['cubicweb']
   118             except KeyError:
   113             except KeyError:
   119                 # otherwise get an actual date or datetime
   114                 # otherwise get an actual date or datetime
   120                 default = yams.DATE_FACTORY_MAP[atype](default)
   115                 default = yams.DATE_FACTORY_MAP[atype](default)
   121         else:
   116         else:
   122             assert atype == 'String', atype
   117             assert atype == 'String', atype
   123             default = text_type(default)
       
   124         return Binary.zpickle(default)
   118         return Binary.zpickle(default)
   125 
   119 
   126     dbh = repo.system_source.dbhelper
   120     dbh = repo.system_source.dbhelper
   127 
   121 
   128 
   122