diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,4 +1,4 @@ -swh.core[db,http] >= 0.14.0 +swh.core[db,http] >= 1.2 swh.counters >= v0.8.0 swh.model >= 4.4.0 swh.objstorage >= 0.2.2 diff --git a/swh/storage/__init__.py b/swh/storage/__init__.py --- a/swh/storage/__init__.py +++ b/swh/storage/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2020 The Software Heritage developers +# Copyright (C) 2015-2022 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -84,6 +84,9 @@ return storage +get_datastore = get_storage + + def get_storage_pipeline( steps: List[Dict[str, Any]], check_config=None ) -> "StorageInterface": diff --git a/swh/storage/postgresql/storage.py b/swh/storage/postgresql/storage.py --- a/swh/storage/postgresql/storage.py +++ b/swh/storage/postgresql/storage.py @@ -179,6 +179,11 @@ cur.execute("select has_table_privilege(current_user, 'content', %s)", (check,)) return cur.fetchone()[0] + @db_transaction() + def get_current_version(self, *, db: Db, cur=None): + """Returns the current code (expected) version""" + return db.current_version + def _content_unique_key(self, hash, db): """Given a hash (tuple or dict), return a unique key from the aggregation of keys. diff --git a/swh/storage/pytest_plugin.py b/swh/storage/pytest_plugin.py --- a/swh/storage/pytest_plugin.py +++ b/swh/storage/pytest_plugin.py @@ -3,22 +3,39 @@ # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information -from os import environ, path +from os import environ +import psycopg2 import pytest +from pytest_postgresql import factories +from swh.core.db.db_utils import ( + init_admin_extensions, + populate_database_for_package, + swh_set_db_version, +) from swh.core.db.pytest_plugin import postgresql_fact -import swh.storage from swh.storage import get_storage +from swh.storage.postgresql.db import Db from swh.storage.tests.storage_data import StorageData -SQL_DIR = path.join(path.dirname(swh.storage.__file__), "sql") - environ["LC_ALL"] = "C.UTF-8" +def initialize_database(**kwargs): + conninfo = psycopg2.connect(**kwargs).dsn + init_admin_extensions("storage", conninfo) + populate_database_for_package("storage", conninfo) + swh_set_db_version(conninfo, Db.current_version) + + +swh_storage_postgresql_proc = factories.postgresql_proc( + dbname="storage", load=[initialize_database], +) + + swh_storage_postgresql = postgresql_fact( - "postgresql_proc", dbname="storage", dump_files=path.join(SQL_DIR, "*.sql") + "swh_storage_postgresql_proc", dbname="storage", ) diff --git a/swh/storage/sql/30-schema.sql b/swh/storage/sql/30-schema.sql --- a/swh/storage/sql/30-schema.sql +++ b/swh/storage/sql/30-schema.sql @@ -2,22 +2,7 @@ --- SQL implementation of the Software Heritage data model --- --- schema versions -create table dbversion -( - version int primary key, - release timestamptz, - description text -); - -comment on table dbversion is 'Details of current db version'; -comment on column dbversion.version is 'SQL schema version'; -comment on column dbversion.release is 'Version deployment timestamp'; -comment on column dbversion.description is 'Release description'; - --- latest schema version -insert into dbversion(version, release, description) - values(182, now(), 'Work In Progress'); +-- schema versions table (dbversion) is now created by swh.core.db directly -- a SHA1 checksum create domain sha1 as bytea check (length(value) = 20); diff --git a/sql/upgrades/015.sql b/swh/storage/sql/upgrades/015.sql rename from sql/upgrades/015.sql rename to swh/storage/sql/upgrades/015.sql diff --git a/sql/upgrades/016.sql b/swh/storage/sql/upgrades/016.sql rename from sql/upgrades/016.sql rename to swh/storage/sql/upgrades/016.sql diff --git a/sql/upgrades/017.sql b/swh/storage/sql/upgrades/017.sql rename from sql/upgrades/017.sql rename to swh/storage/sql/upgrades/017.sql diff --git a/sql/upgrades/018.sql b/swh/storage/sql/upgrades/018.sql rename from sql/upgrades/018.sql rename to swh/storage/sql/upgrades/018.sql diff --git a/sql/upgrades/019.sql b/swh/storage/sql/upgrades/019.sql rename from sql/upgrades/019.sql rename to swh/storage/sql/upgrades/019.sql diff --git a/sql/upgrades/020.sql b/swh/storage/sql/upgrades/020.sql rename from sql/upgrades/020.sql rename to swh/storage/sql/upgrades/020.sql diff --git a/sql/upgrades/021.sql b/swh/storage/sql/upgrades/021.sql rename from sql/upgrades/021.sql rename to swh/storage/sql/upgrades/021.sql diff --git a/sql/upgrades/022.sql b/swh/storage/sql/upgrades/022.sql rename from sql/upgrades/022.sql rename to swh/storage/sql/upgrades/022.sql diff --git a/sql/upgrades/023.sql b/swh/storage/sql/upgrades/023.sql rename from sql/upgrades/023.sql rename to swh/storage/sql/upgrades/023.sql diff --git a/sql/upgrades/024.sql b/swh/storage/sql/upgrades/024.sql rename from sql/upgrades/024.sql rename to swh/storage/sql/upgrades/024.sql diff --git a/sql/upgrades/025.sql b/swh/storage/sql/upgrades/025.sql rename from sql/upgrades/025.sql rename to swh/storage/sql/upgrades/025.sql diff --git a/sql/upgrades/026.sql b/swh/storage/sql/upgrades/026.sql rename from sql/upgrades/026.sql rename to swh/storage/sql/upgrades/026.sql diff --git a/sql/upgrades/027.sql b/swh/storage/sql/upgrades/027.sql rename from sql/upgrades/027.sql rename to swh/storage/sql/upgrades/027.sql diff --git a/sql/upgrades/028.sql b/swh/storage/sql/upgrades/028.sql rename from sql/upgrades/028.sql rename to swh/storage/sql/upgrades/028.sql diff --git a/sql/upgrades/029.sql b/swh/storage/sql/upgrades/029.sql rename from sql/upgrades/029.sql rename to swh/storage/sql/upgrades/029.sql diff --git a/sql/upgrades/030.sql b/swh/storage/sql/upgrades/030.sql rename from sql/upgrades/030.sql rename to swh/storage/sql/upgrades/030.sql diff --git a/sql/upgrades/032.sql b/swh/storage/sql/upgrades/032.sql rename from sql/upgrades/032.sql rename to swh/storage/sql/upgrades/032.sql diff --git a/sql/upgrades/033.sql b/swh/storage/sql/upgrades/033.sql rename from sql/upgrades/033.sql rename to swh/storage/sql/upgrades/033.sql diff --git a/sql/upgrades/034.sql b/swh/storage/sql/upgrades/034.sql rename from sql/upgrades/034.sql rename to swh/storage/sql/upgrades/034.sql diff --git a/sql/upgrades/035.sql b/swh/storage/sql/upgrades/035.sql rename from sql/upgrades/035.sql rename to swh/storage/sql/upgrades/035.sql diff --git a/sql/upgrades/036.sql b/swh/storage/sql/upgrades/036.sql rename from sql/upgrades/036.sql rename to swh/storage/sql/upgrades/036.sql diff --git a/sql/upgrades/037.sql b/swh/storage/sql/upgrades/037.sql rename from sql/upgrades/037.sql rename to swh/storage/sql/upgrades/037.sql diff --git a/sql/upgrades/038.sql b/swh/storage/sql/upgrades/038.sql rename from sql/upgrades/038.sql rename to swh/storage/sql/upgrades/038.sql diff --git a/sql/upgrades/039.sql b/swh/storage/sql/upgrades/039.sql rename from sql/upgrades/039.sql rename to swh/storage/sql/upgrades/039.sql diff --git a/sql/upgrades/040.sql b/swh/storage/sql/upgrades/040.sql rename from sql/upgrades/040.sql rename to swh/storage/sql/upgrades/040.sql diff --git a/sql/upgrades/041.sql b/swh/storage/sql/upgrades/041.sql rename from sql/upgrades/041.sql rename to swh/storage/sql/upgrades/041.sql diff --git a/sql/upgrades/042.sql b/swh/storage/sql/upgrades/042.sql rename from sql/upgrades/042.sql rename to swh/storage/sql/upgrades/042.sql diff --git a/sql/upgrades/043.sql b/swh/storage/sql/upgrades/043.sql rename from sql/upgrades/043.sql rename to swh/storage/sql/upgrades/043.sql diff --git a/sql/upgrades/044.sql b/swh/storage/sql/upgrades/044.sql rename from sql/upgrades/044.sql rename to swh/storage/sql/upgrades/044.sql diff --git a/sql/upgrades/045.sql b/swh/storage/sql/upgrades/045.sql rename from sql/upgrades/045.sql rename to swh/storage/sql/upgrades/045.sql diff --git a/sql/upgrades/046.sql b/swh/storage/sql/upgrades/046.sql rename from sql/upgrades/046.sql rename to swh/storage/sql/upgrades/046.sql diff --git a/sql/upgrades/047.sql b/swh/storage/sql/upgrades/047.sql rename from sql/upgrades/047.sql rename to swh/storage/sql/upgrades/047.sql diff --git a/sql/upgrades/048.sql b/swh/storage/sql/upgrades/048.sql rename from sql/upgrades/048.sql rename to swh/storage/sql/upgrades/048.sql diff --git a/sql/upgrades/049.sql b/swh/storage/sql/upgrades/049.sql rename from sql/upgrades/049.sql rename to swh/storage/sql/upgrades/049.sql diff --git a/sql/upgrades/050.sql b/swh/storage/sql/upgrades/050.sql rename from sql/upgrades/050.sql rename to swh/storage/sql/upgrades/050.sql diff --git a/sql/upgrades/051.sql b/swh/storage/sql/upgrades/051.sql rename from sql/upgrades/051.sql rename to swh/storage/sql/upgrades/051.sql diff --git a/sql/upgrades/052.sql b/swh/storage/sql/upgrades/052.sql rename from sql/upgrades/052.sql rename to swh/storage/sql/upgrades/052.sql diff --git a/sql/upgrades/053.sql b/swh/storage/sql/upgrades/053.sql rename from sql/upgrades/053.sql rename to swh/storage/sql/upgrades/053.sql diff --git a/sql/upgrades/054.sql b/swh/storage/sql/upgrades/054.sql rename from sql/upgrades/054.sql rename to swh/storage/sql/upgrades/054.sql diff --git a/sql/upgrades/055.sql b/swh/storage/sql/upgrades/055.sql rename from sql/upgrades/055.sql rename to swh/storage/sql/upgrades/055.sql diff --git a/sql/upgrades/056.sql b/swh/storage/sql/upgrades/056.sql rename from sql/upgrades/056.sql rename to swh/storage/sql/upgrades/056.sql diff --git a/sql/upgrades/057.sql b/swh/storage/sql/upgrades/057.sql rename from sql/upgrades/057.sql rename to swh/storage/sql/upgrades/057.sql diff --git a/sql/upgrades/058.sql b/swh/storage/sql/upgrades/058.sql rename from sql/upgrades/058.sql rename to swh/storage/sql/upgrades/058.sql diff --git a/sql/upgrades/059.sql b/swh/storage/sql/upgrades/059.sql rename from sql/upgrades/059.sql rename to swh/storage/sql/upgrades/059.sql diff --git a/sql/upgrades/060.sql b/swh/storage/sql/upgrades/060.sql rename from sql/upgrades/060.sql rename to swh/storage/sql/upgrades/060.sql diff --git a/sql/upgrades/061.sql b/swh/storage/sql/upgrades/061.sql rename from sql/upgrades/061.sql rename to swh/storage/sql/upgrades/061.sql diff --git a/sql/upgrades/062.sql b/swh/storage/sql/upgrades/062.sql rename from sql/upgrades/062.sql rename to swh/storage/sql/upgrades/062.sql diff --git a/sql/upgrades/063.sql b/swh/storage/sql/upgrades/063.sql rename from sql/upgrades/063.sql rename to swh/storage/sql/upgrades/063.sql diff --git a/sql/upgrades/064.sql b/swh/storage/sql/upgrades/064.sql rename from sql/upgrades/064.sql rename to swh/storage/sql/upgrades/064.sql diff --git a/sql/upgrades/065.sql b/swh/storage/sql/upgrades/065.sql rename from sql/upgrades/065.sql rename to swh/storage/sql/upgrades/065.sql diff --git a/sql/upgrades/066.sql b/swh/storage/sql/upgrades/066.sql rename from sql/upgrades/066.sql rename to swh/storage/sql/upgrades/066.sql diff --git a/sql/upgrades/067.sql b/swh/storage/sql/upgrades/067.sql rename from sql/upgrades/067.sql rename to swh/storage/sql/upgrades/067.sql diff --git a/sql/upgrades/068.sql b/swh/storage/sql/upgrades/068.sql rename from sql/upgrades/068.sql rename to swh/storage/sql/upgrades/068.sql diff --git a/sql/upgrades/069.sql b/swh/storage/sql/upgrades/069.sql rename from sql/upgrades/069.sql rename to swh/storage/sql/upgrades/069.sql diff --git a/sql/upgrades/070.sql b/swh/storage/sql/upgrades/070.sql rename from sql/upgrades/070.sql rename to swh/storage/sql/upgrades/070.sql diff --git a/sql/upgrades/071.sql b/swh/storage/sql/upgrades/071.sql rename from sql/upgrades/071.sql rename to swh/storage/sql/upgrades/071.sql diff --git a/sql/upgrades/072.sql b/swh/storage/sql/upgrades/072.sql rename from sql/upgrades/072.sql rename to swh/storage/sql/upgrades/072.sql diff --git a/sql/upgrades/073.sql b/swh/storage/sql/upgrades/073.sql rename from sql/upgrades/073.sql rename to swh/storage/sql/upgrades/073.sql diff --git a/sql/upgrades/074.sql b/swh/storage/sql/upgrades/074.sql rename from sql/upgrades/074.sql rename to swh/storage/sql/upgrades/074.sql diff --git a/sql/upgrades/075.sql b/swh/storage/sql/upgrades/075.sql rename from sql/upgrades/075.sql rename to swh/storage/sql/upgrades/075.sql diff --git a/sql/upgrades/076.sql b/swh/storage/sql/upgrades/076.sql rename from sql/upgrades/076.sql rename to swh/storage/sql/upgrades/076.sql diff --git a/sql/upgrades/077.sql b/swh/storage/sql/upgrades/077.sql rename from sql/upgrades/077.sql rename to swh/storage/sql/upgrades/077.sql diff --git a/sql/upgrades/078.sql b/swh/storage/sql/upgrades/078.sql rename from sql/upgrades/078.sql rename to swh/storage/sql/upgrades/078.sql diff --git a/sql/upgrades/079.sql b/swh/storage/sql/upgrades/079.sql rename from sql/upgrades/079.sql rename to swh/storage/sql/upgrades/079.sql diff --git a/sql/upgrades/080.sql b/swh/storage/sql/upgrades/080.sql rename from sql/upgrades/080.sql rename to swh/storage/sql/upgrades/080.sql diff --git a/sql/upgrades/081.sql b/swh/storage/sql/upgrades/081.sql rename from sql/upgrades/081.sql rename to swh/storage/sql/upgrades/081.sql diff --git a/sql/upgrades/082.sql b/swh/storage/sql/upgrades/082.sql rename from sql/upgrades/082.sql rename to swh/storage/sql/upgrades/082.sql diff --git a/sql/upgrades/083.sql b/swh/storage/sql/upgrades/083.sql rename from sql/upgrades/083.sql rename to swh/storage/sql/upgrades/083.sql diff --git a/sql/upgrades/084.sql b/swh/storage/sql/upgrades/084.sql rename from sql/upgrades/084.sql rename to swh/storage/sql/upgrades/084.sql diff --git a/sql/upgrades/085.sql b/swh/storage/sql/upgrades/085.sql rename from sql/upgrades/085.sql rename to swh/storage/sql/upgrades/085.sql diff --git a/sql/upgrades/086.sql b/swh/storage/sql/upgrades/086.sql rename from sql/upgrades/086.sql rename to swh/storage/sql/upgrades/086.sql diff --git a/sql/upgrades/087.sql b/swh/storage/sql/upgrades/087.sql rename from sql/upgrades/087.sql rename to swh/storage/sql/upgrades/087.sql diff --git a/sql/upgrades/088.sql b/swh/storage/sql/upgrades/088.sql rename from sql/upgrades/088.sql rename to swh/storage/sql/upgrades/088.sql diff --git a/sql/upgrades/089.sql b/swh/storage/sql/upgrades/089.sql rename from sql/upgrades/089.sql rename to swh/storage/sql/upgrades/089.sql diff --git a/sql/upgrades/090.sql b/swh/storage/sql/upgrades/090.sql rename from sql/upgrades/090.sql rename to swh/storage/sql/upgrades/090.sql diff --git a/sql/upgrades/091.sql b/swh/storage/sql/upgrades/091.sql rename from sql/upgrades/091.sql rename to swh/storage/sql/upgrades/091.sql diff --git a/sql/upgrades/092.sql b/swh/storage/sql/upgrades/092.sql rename from sql/upgrades/092.sql rename to swh/storage/sql/upgrades/092.sql diff --git a/sql/upgrades/093.sql b/swh/storage/sql/upgrades/093.sql rename from sql/upgrades/093.sql rename to swh/storage/sql/upgrades/093.sql diff --git a/sql/upgrades/094.sql b/swh/storage/sql/upgrades/094.sql rename from sql/upgrades/094.sql rename to swh/storage/sql/upgrades/094.sql diff --git a/sql/upgrades/095.sql b/swh/storage/sql/upgrades/095.sql rename from sql/upgrades/095.sql rename to swh/storage/sql/upgrades/095.sql diff --git a/sql/upgrades/096.sql b/swh/storage/sql/upgrades/096.sql rename from sql/upgrades/096.sql rename to swh/storage/sql/upgrades/096.sql diff --git a/sql/upgrades/097.sql b/swh/storage/sql/upgrades/097.sql rename from sql/upgrades/097.sql rename to swh/storage/sql/upgrades/097.sql diff --git a/sql/upgrades/098.sql b/swh/storage/sql/upgrades/098.sql rename from sql/upgrades/098.sql rename to swh/storage/sql/upgrades/098.sql diff --git a/sql/upgrades/099.sql b/swh/storage/sql/upgrades/099.sql rename from sql/upgrades/099.sql rename to swh/storage/sql/upgrades/099.sql diff --git a/sql/upgrades/100.sql b/swh/storage/sql/upgrades/100.sql rename from sql/upgrades/100.sql rename to swh/storage/sql/upgrades/100.sql diff --git a/sql/upgrades/101.sql b/swh/storage/sql/upgrades/101.sql rename from sql/upgrades/101.sql rename to swh/storage/sql/upgrades/101.sql diff --git a/sql/upgrades/102.sql b/swh/storage/sql/upgrades/102.sql rename from sql/upgrades/102.sql rename to swh/storage/sql/upgrades/102.sql diff --git a/sql/upgrades/103.sql b/swh/storage/sql/upgrades/103.sql rename from sql/upgrades/103.sql rename to swh/storage/sql/upgrades/103.sql diff --git a/sql/upgrades/104.sql b/swh/storage/sql/upgrades/104.sql rename from sql/upgrades/104.sql rename to swh/storage/sql/upgrades/104.sql diff --git a/sql/upgrades/105.sql b/swh/storage/sql/upgrades/105.sql rename from sql/upgrades/105.sql rename to swh/storage/sql/upgrades/105.sql diff --git a/sql/upgrades/106.sql b/swh/storage/sql/upgrades/106.sql rename from sql/upgrades/106.sql rename to swh/storage/sql/upgrades/106.sql diff --git a/sql/upgrades/107.sql b/swh/storage/sql/upgrades/107.sql rename from sql/upgrades/107.sql rename to swh/storage/sql/upgrades/107.sql diff --git a/sql/upgrades/108.sql b/swh/storage/sql/upgrades/108.sql rename from sql/upgrades/108.sql rename to swh/storage/sql/upgrades/108.sql diff --git a/sql/upgrades/109.sql b/swh/storage/sql/upgrades/109.sql rename from sql/upgrades/109.sql rename to swh/storage/sql/upgrades/109.sql diff --git a/sql/upgrades/110.sql b/swh/storage/sql/upgrades/110.sql rename from sql/upgrades/110.sql rename to swh/storage/sql/upgrades/110.sql diff --git a/sql/upgrades/111.sql b/swh/storage/sql/upgrades/111.sql rename from sql/upgrades/111.sql rename to swh/storage/sql/upgrades/111.sql diff --git a/sql/upgrades/112.sql b/swh/storage/sql/upgrades/112.sql rename from sql/upgrades/112.sql rename to swh/storage/sql/upgrades/112.sql diff --git a/sql/upgrades/113.sql b/swh/storage/sql/upgrades/113.sql rename from sql/upgrades/113.sql rename to swh/storage/sql/upgrades/113.sql diff --git a/sql/upgrades/114.sql b/swh/storage/sql/upgrades/114.sql rename from sql/upgrades/114.sql rename to swh/storage/sql/upgrades/114.sql diff --git a/sql/upgrades/115.sql b/swh/storage/sql/upgrades/115.sql rename from sql/upgrades/115.sql rename to swh/storage/sql/upgrades/115.sql diff --git a/sql/upgrades/116.sql b/swh/storage/sql/upgrades/116.sql rename from sql/upgrades/116.sql rename to swh/storage/sql/upgrades/116.sql diff --git a/sql/upgrades/117.sql b/swh/storage/sql/upgrades/117.sql rename from sql/upgrades/117.sql rename to swh/storage/sql/upgrades/117.sql diff --git a/sql/upgrades/118.sql b/swh/storage/sql/upgrades/118.sql rename from sql/upgrades/118.sql rename to swh/storage/sql/upgrades/118.sql diff --git a/sql/upgrades/119.sql b/swh/storage/sql/upgrades/119.sql rename from sql/upgrades/119.sql rename to swh/storage/sql/upgrades/119.sql diff --git a/sql/upgrades/120.sql b/swh/storage/sql/upgrades/120.sql rename from sql/upgrades/120.sql rename to swh/storage/sql/upgrades/120.sql diff --git a/sql/upgrades/121.sql b/swh/storage/sql/upgrades/121.sql rename from sql/upgrades/121.sql rename to swh/storage/sql/upgrades/121.sql diff --git a/sql/upgrades/122.sql b/swh/storage/sql/upgrades/122.sql rename from sql/upgrades/122.sql rename to swh/storage/sql/upgrades/122.sql diff --git a/sql/upgrades/123.sql b/swh/storage/sql/upgrades/123.sql rename from sql/upgrades/123.sql rename to swh/storage/sql/upgrades/123.sql diff --git a/sql/upgrades/124.sql b/swh/storage/sql/upgrades/124.sql rename from sql/upgrades/124.sql rename to swh/storage/sql/upgrades/124.sql diff --git a/sql/upgrades/125.sql b/swh/storage/sql/upgrades/125.sql rename from sql/upgrades/125.sql rename to swh/storage/sql/upgrades/125.sql diff --git a/sql/upgrades/126.sql b/swh/storage/sql/upgrades/126.sql rename from sql/upgrades/126.sql rename to swh/storage/sql/upgrades/126.sql diff --git a/sql/upgrades/127.sql b/swh/storage/sql/upgrades/127.sql rename from sql/upgrades/127.sql rename to swh/storage/sql/upgrades/127.sql diff --git a/sql/upgrades/128.sql b/swh/storage/sql/upgrades/128.sql rename from sql/upgrades/128.sql rename to swh/storage/sql/upgrades/128.sql diff --git a/sql/upgrades/129.sql b/swh/storage/sql/upgrades/129.sql rename from sql/upgrades/129.sql rename to swh/storage/sql/upgrades/129.sql diff --git a/sql/upgrades/130.sql b/swh/storage/sql/upgrades/130.sql rename from sql/upgrades/130.sql rename to swh/storage/sql/upgrades/130.sql diff --git a/sql/upgrades/131.sql b/swh/storage/sql/upgrades/131.sql rename from sql/upgrades/131.sql rename to swh/storage/sql/upgrades/131.sql diff --git a/sql/upgrades/132.sql b/swh/storage/sql/upgrades/132.sql rename from sql/upgrades/132.sql rename to swh/storage/sql/upgrades/132.sql diff --git a/sql/upgrades/133.sql b/swh/storage/sql/upgrades/133.sql rename from sql/upgrades/133.sql rename to swh/storage/sql/upgrades/133.sql diff --git a/sql/upgrades/134.sql b/swh/storage/sql/upgrades/134.sql rename from sql/upgrades/134.sql rename to swh/storage/sql/upgrades/134.sql diff --git a/sql/upgrades/135.sql b/swh/storage/sql/upgrades/135.sql rename from sql/upgrades/135.sql rename to swh/storage/sql/upgrades/135.sql diff --git a/sql/upgrades/136.sql b/swh/storage/sql/upgrades/136.sql rename from sql/upgrades/136.sql rename to swh/storage/sql/upgrades/136.sql diff --git a/sql/upgrades/137.sql b/swh/storage/sql/upgrades/137.sql rename from sql/upgrades/137.sql rename to swh/storage/sql/upgrades/137.sql diff --git a/sql/upgrades/138.sql b/swh/storage/sql/upgrades/138.sql rename from sql/upgrades/138.sql rename to swh/storage/sql/upgrades/138.sql diff --git a/sql/upgrades/139.sql b/swh/storage/sql/upgrades/139.sql rename from sql/upgrades/139.sql rename to swh/storage/sql/upgrades/139.sql diff --git a/sql/upgrades/140.sql b/swh/storage/sql/upgrades/140.sql rename from sql/upgrades/140.sql rename to swh/storage/sql/upgrades/140.sql diff --git a/sql/upgrades/141.sql b/swh/storage/sql/upgrades/141.sql rename from sql/upgrades/141.sql rename to swh/storage/sql/upgrades/141.sql diff --git a/sql/upgrades/142.sql b/swh/storage/sql/upgrades/142.sql rename from sql/upgrades/142.sql rename to swh/storage/sql/upgrades/142.sql diff --git a/sql/upgrades/143.sql b/swh/storage/sql/upgrades/143.sql rename from sql/upgrades/143.sql rename to swh/storage/sql/upgrades/143.sql diff --git a/sql/upgrades/144.sql b/swh/storage/sql/upgrades/144.sql rename from sql/upgrades/144.sql rename to swh/storage/sql/upgrades/144.sql diff --git a/sql/upgrades/145.sql b/swh/storage/sql/upgrades/145.sql rename from sql/upgrades/145.sql rename to swh/storage/sql/upgrades/145.sql diff --git a/sql/upgrades/146.sql b/swh/storage/sql/upgrades/146.sql rename from sql/upgrades/146.sql rename to swh/storage/sql/upgrades/146.sql diff --git a/sql/upgrades/147.sql b/swh/storage/sql/upgrades/147.sql rename from sql/upgrades/147.sql rename to swh/storage/sql/upgrades/147.sql diff --git a/sql/upgrades/148.sql b/swh/storage/sql/upgrades/148.sql rename from sql/upgrades/148.sql rename to swh/storage/sql/upgrades/148.sql diff --git a/sql/upgrades/149.sql b/swh/storage/sql/upgrades/149.sql rename from sql/upgrades/149.sql rename to swh/storage/sql/upgrades/149.sql diff --git a/sql/upgrades/150.sql b/swh/storage/sql/upgrades/150.sql rename from sql/upgrades/150.sql rename to swh/storage/sql/upgrades/150.sql diff --git a/sql/upgrades/151.sql b/swh/storage/sql/upgrades/151.sql rename from sql/upgrades/151.sql rename to swh/storage/sql/upgrades/151.sql diff --git a/sql/upgrades/152.sql b/swh/storage/sql/upgrades/152.sql rename from sql/upgrades/152.sql rename to swh/storage/sql/upgrades/152.sql diff --git a/sql/upgrades/153.sql b/swh/storage/sql/upgrades/153.sql rename from sql/upgrades/153.sql rename to swh/storage/sql/upgrades/153.sql diff --git a/sql/upgrades/154.sql b/swh/storage/sql/upgrades/154.sql rename from sql/upgrades/154.sql rename to swh/storage/sql/upgrades/154.sql diff --git a/sql/upgrades/155.sql b/swh/storage/sql/upgrades/155.sql rename from sql/upgrades/155.sql rename to swh/storage/sql/upgrades/155.sql diff --git a/sql/upgrades/156.sql b/swh/storage/sql/upgrades/156.sql rename from sql/upgrades/156.sql rename to swh/storage/sql/upgrades/156.sql diff --git a/sql/upgrades/157.sql b/swh/storage/sql/upgrades/157.sql rename from sql/upgrades/157.sql rename to swh/storage/sql/upgrades/157.sql diff --git a/sql/upgrades/158.sql b/swh/storage/sql/upgrades/158.sql rename from sql/upgrades/158.sql rename to swh/storage/sql/upgrades/158.sql diff --git a/sql/upgrades/159.sql b/swh/storage/sql/upgrades/159.sql rename from sql/upgrades/159.sql rename to swh/storage/sql/upgrades/159.sql diff --git a/sql/upgrades/160.sql b/swh/storage/sql/upgrades/160.sql rename from sql/upgrades/160.sql rename to swh/storage/sql/upgrades/160.sql diff --git a/sql/upgrades/161.sql b/swh/storage/sql/upgrades/161.sql rename from sql/upgrades/161.sql rename to swh/storage/sql/upgrades/161.sql diff --git a/sql/upgrades/162.sql b/swh/storage/sql/upgrades/162.sql rename from sql/upgrades/162.sql rename to swh/storage/sql/upgrades/162.sql diff --git a/sql/upgrades/163.sql b/swh/storage/sql/upgrades/163.sql rename from sql/upgrades/163.sql rename to swh/storage/sql/upgrades/163.sql diff --git a/sql/upgrades/164.sql b/swh/storage/sql/upgrades/164.sql rename from sql/upgrades/164.sql rename to swh/storage/sql/upgrades/164.sql diff --git a/sql/upgrades/165.sql b/swh/storage/sql/upgrades/165.sql rename from sql/upgrades/165.sql rename to swh/storage/sql/upgrades/165.sql diff --git a/sql/upgrades/166.sql b/swh/storage/sql/upgrades/166.sql rename from sql/upgrades/166.sql rename to swh/storage/sql/upgrades/166.sql diff --git a/sql/upgrades/167.sql b/swh/storage/sql/upgrades/167.sql rename from sql/upgrades/167.sql rename to swh/storage/sql/upgrades/167.sql diff --git a/sql/upgrades/168.sql b/swh/storage/sql/upgrades/168.sql rename from sql/upgrades/168.sql rename to swh/storage/sql/upgrades/168.sql diff --git a/sql/upgrades/169.sql b/swh/storage/sql/upgrades/169.sql rename from sql/upgrades/169.sql rename to swh/storage/sql/upgrades/169.sql diff --git a/sql/upgrades/170.sql b/swh/storage/sql/upgrades/170.sql rename from sql/upgrades/170.sql rename to swh/storage/sql/upgrades/170.sql diff --git a/sql/upgrades/171.sql b/swh/storage/sql/upgrades/171.sql rename from sql/upgrades/171.sql rename to swh/storage/sql/upgrades/171.sql diff --git a/sql/upgrades/172.sql b/swh/storage/sql/upgrades/172.sql rename from sql/upgrades/172.sql rename to swh/storage/sql/upgrades/172.sql diff --git a/sql/upgrades/173.sql b/swh/storage/sql/upgrades/173.sql rename from sql/upgrades/173.sql rename to swh/storage/sql/upgrades/173.sql diff --git a/sql/upgrades/174.sql b/swh/storage/sql/upgrades/174.sql rename from sql/upgrades/174.sql rename to swh/storage/sql/upgrades/174.sql diff --git a/sql/upgrades/175.sql b/swh/storage/sql/upgrades/175.sql rename from sql/upgrades/175.sql rename to swh/storage/sql/upgrades/175.sql diff --git a/sql/upgrades/176.sql b/swh/storage/sql/upgrades/176.sql rename from sql/upgrades/176.sql rename to swh/storage/sql/upgrades/176.sql diff --git a/sql/upgrades/177.sql b/swh/storage/sql/upgrades/177.sql rename from sql/upgrades/177.sql rename to swh/storage/sql/upgrades/177.sql diff --git a/sql/upgrades/178.sql b/swh/storage/sql/upgrades/178.sql rename from sql/upgrades/178.sql rename to swh/storage/sql/upgrades/178.sql diff --git a/sql/upgrades/179.sql b/swh/storage/sql/upgrades/179.sql rename from sql/upgrades/179.sql rename to swh/storage/sql/upgrades/179.sql diff --git a/sql/upgrades/180.sql b/swh/storage/sql/upgrades/180.sql rename from sql/upgrades/180.sql rename to swh/storage/sql/upgrades/180.sql diff --git a/sql/upgrades/181.sql b/swh/storage/sql/upgrades/181.sql rename from sql/upgrades/181.sql rename to swh/storage/sql/upgrades/181.sql diff --git a/sql/upgrades/182.sql b/swh/storage/sql/upgrades/182.sql rename from sql/upgrades/182.sql rename to swh/storage/sql/upgrades/182.sql