This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2 in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit 4f7430eca151df42d6ddb16bcff60102be305693 Author: Benjamin <poussin@codelutin.com> Date: Wed Jul 31 00:36:21 2019 +0200 migration completement fonctionnel --- src/main/resources/db/migration/V2__migration_data.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/db/migration/V2__migration_data.sql b/src/main/resources/db/migration/V2__migration_data.sql index fe45b8a..f983098 100644 --- a/src/main/resources/db/migration/V2__migration_data.sql +++ b/src/main/resources/db/migration/V2__migration_data.sql @@ -80,10 +80,10 @@ with , nottags_json as (select id, jsonb_build_object('id', id) || jsonb_object_agg(fieldname, value) as __json from w where fieldname not like 'Bookmark.tags[%' and fieldname not like 'WikittyLabel.labels[%' group by id) -- extract field from json to normalize name , all_json as (select n.id, jsonb_build_object('id', n.id, - 'owner', coalesce( __json->>'BowBookmark.bowUser',__json->>'WikittyAuthorisation.owner'), + 'owner', coalesce( __json->>'BowBookmark.bowUser',__json->>'WikittyAuthorisation.owner', bowUser.id::text), 'uri', coalesce(__json->>'Bookmark.link', __json ->>'BowBookmark.link'), 'description', coalesce(__json->>'Bookmark.description', __json->>'BowBookmark.description'), - 'creationdate', coalesce(__json->>'WikittyToken.date', __json->>'BowBookmark.creationDate'), + 'creationdate', coalesce(__json->>'Bookmark.date', __json->>'WikittyToken.date', __json->>'BowBookmark.creationDate'), 'importdate', coalesce(__json->>'Import.date', __json->>'BowImport.importDate' ), 'privatealias', json_build_array(coalesce(__json->>'Bookmark.alias', __json->>'BowBookmark.privateAlias')), 'publicalias', json_build_array(__json->>'BowBookmark.publicAlias'), @@ -91,9 +91,9 @@ with 'screenshot', __json->>'BowBookmark.screenshot', 'visit', coalesce(__json->>'Bookmark.click', __json->>'BowBookmark.click'), 'tags', tags, - 'authenticationinfo', authenticationInfo, + 'authenticationinfo', a.authenticationInfo, 'lang', 'english') as __json - from nottags_json n left join tags t on n.id=t.id left join all_authenticationInfo a on n.id=a.id) + from nottags_json n left join tags t on n.id=t.id left join all_authenticationInfo a on n.id=a.id left join bowUser on __json->>'Bookmark.email'=bowUser.login) -- insert bookmarks in new table insert into bookmark select j.* from all_json, jsonb_populate_record(NULL::bookmark, __json) as j inner join bowUser b on b.id=j.owner ; -- ON CONFLICT (login) DO NOTHING ; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.