misc/migration/3.19.0_Any.py
author |
Yann Voté <yann.vote@logilab.fr> |
|
Wed, 24 Jun 2015 23:23:57 +0200 |
changeset 10457 |
1f5026e7d848 |
parent 9708 |
b36bc18f6ef7
|
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
9450
af4b93bc38a5
[multi-sources-removal] Drop deleted_entities system table and entities.mtime column
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
1 |
sql('DROP TABLE "deleted_entities"') |
9469
032825bbacab
[multi-sources-removal] Drop entities.source column
Sylvain Thénault <sylvain.thenault@logilab.fr>
diff
changeset
|
2 |
|
9708
b36bc18f6ef7
[migration] move 'entities' table changes from 3.19.0 to bootstrap script
Julien Cristau <julien.cristau@logilab.fr>
diff
changeset
|
3 |
commit() |