swh:1:snp:eb70f1f85391e4b077c211bec36af0061c4bf937
Raw File
Tip revision: 312127af7ce3a21287bae9cd5d3e2d124d577c6b authored by Antoine R. Dumont (@ardumont) on 30 June 2020, 13:22:59 UTC
storage*: Drop intermediary conversion step into OriginVisit
Tip revision: 312127a
016.sql
-- SWH DB schema upgrade
-- from_version: 15
-- to_version: 16
-- description: change unix_path to bytea

insert into dbversion(version, release, description)
      values(16, now(), 'Work In Progress');

alter domain unix_path rename to unix_path_text;
create domain unix_path as bytea;

-- pygit2 assumes utf-8 encoding on paths anyway
alter table directory_entry_dir alter column name type unix_path using convert_to(name, 'UTF-8');
alter table directory_entry_file alter column name type unix_path using convert_to(name, 'UTF-8');
alter table directory_entry_rev alter column name type unix_path using convert_to(name, 'UTF-8');

alter type directory_entry alter attribute name type unix_path;
alter type content_dir alter attribute path type unix_path;
alter type content_occurrence alter attribute path type unix_path;

drop domain unix_path_text;
back to top