Project

General

Profile

Actions

Idea #15849

closed

Migrate collection & project properties to new vocabulary format

Added by Tom Morris almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
11/26/2019
Due date:
Story points:
-
Release relationship:
Auto

Description

Customer databases which use literal text labels for property/value pairs need to be converted to the new ID format in the database.

Input to this will be a new format vocabulary file which matches the original vocabulary file used in creating the database.

This will be an example script which accesses the database through the API.


Subtasks 1 (0 open1 closed)

Task #15861: Review 15849-vocab-migration-exampleResolvedPeter Amstutz11/26/2019Actions
Actions #1

Updated by Lucas Di Pentima almost 5 years ago

  • Assigned To set to Lucas Di Pentima
Actions #2

Updated by Tom Morris almost 5 years ago

  • Description updated (diff)
Actions #3

Updated by Lucas Di Pentima almost 5 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Lucas Di Pentima almost 5 years ago

Updates at 8e1ca7677 - branch 15849-vocab-migration-example

Adds vocabulary migration example script to the documentation's admin section with an explanation on how to use it.

Actions #5

Updated by Peter Amstutz almost 5 years ago

You can use required=True instead of default=None and then checking the value later.

opts.add_argument('--vocabulary-file', type=str, metavar='PATH', default=None,

list_all should use a stable ordering, like "created_at"

I know I said to put the script into the docs, but it occurred to me that you could put it in tools/vocabulary_migrate/vocabulary_migrate.py and have a symlink from docs/_include/_vocabulary_migrate_py.liquid to ../../tools/vocabulary_migrate/vocabulary_migrate.py

The {% comment %} makes it not directly executable as Python. A regular '#' comment is fine.

The migration script tag / values label matching is case sensitive. I'm not quite sure what to do about it, thought I'd mention it.

Actions #6

Updated by Lucas Di Pentima almost 5 years ago

Updates at c6b259220

Addressed above comments. Added a note on the documentation about case sensitive matching.

Actions #7

Updated by Peter Amstutz almost 5 years ago

Lucas Di Pentima wrote:

Updates at c6b259220

Addressed above comments. Added a note on the documentation about case sensitive matching.

One more comment, if you do --dry-run and there is nothing to do, it exits silently, whereas an actual run will say "Done, total object migrated: 0"

  • should be "objects"
  • for dry-run it should say something like "nothing to do"

otherwise LGTM.

Actions #8

Updated by Lucas Di Pentima almost 5 years ago

Fixed at b0f2bbde0, thanks!

Actions #9

Updated by Lucas Di Pentima almost 5 years ago

  • Status changed from In Progress to Resolved
Actions #10

Updated by Peter Amstutz over 4 years ago

  • Release set to 22
Actions

Also available in: Atom PDF