misc/migration/3.8.3_Any.py
author |
Yann Voté <yann.vote@logilab.fr> |
|
Wed, 24 Jun 2015 23:23:57 +0200 |
changeset 10457 |
1f5026e7d848 |
parent 5589 |
25bf54dab82b
|
permissions |
-rw-r--r-- |
[dataimport] Move stores to new API.
Here is the final store API:
* ``prepare_insert_entity(<entity type>, **kwargs) -> eid``: given an entity
type, attributes and inlined relations, return the eid of the entity to be
inserted, *with no guarantee that anything has been inserted in database*,
* ``prepare_update_entity(<entity type>, eid, **kwargs) -> None``: given an
entity type and eid, promise for update given attributes and inlined
relations *with no guarantee that anything has been inserted in database*,
* ``prepare_insert_relation(eid_from, rtype, eid_to) -> None``: indicate that a
relation ``rtype`` should be added between entities with eids ``eid_from``
and ``eid_to``. Similarly to ``prepare_insert_entity()``, *there is no
guarantee that the relation will be inserted in database*,
* ``flush() -> None``: flush any temporary data to database. May be called
several times during an import,
* ``finish() -> None``: additional stuff to do after import is terminated.
**Warning:** ``prepare_update_entity()`` still needs to be implemented for
NoHookRQLObjectStore.
Related to #5040344
5589
25bf54dab82b
[migration] force 3.8.3 migration, and fix it (same_as not necessarily there, missing group change for max-post-length)
Sylvain Thénault <sylvain.thenault@logilab.fr>
diff
changeset
|
1 |
if 'same_as' in schema: |
25bf54dab82b
[migration] force 3.8.3 migration, and fix it (same_as not necessarily there, missing group change for max-post-length)
Sylvain Thénault <sylvain.thenault@logilab.fr>
diff
changeset
|
2 |
sync_schema_props_perms('same_as', syncperms=False) |
5577
4e3ca117c275
[schema] fix same_as cardinality and bump Bookmark.path max length to approximative max url size
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
3 |
sync_schema_props_perms('Bookmark', syncperms=False) |