Skip to content

Commit

Permalink
Prepare a new empty upgrade script and adjust the regression test env…
Browse files Browse the repository at this point in the history
…ironment for the new version.
  • Loading branch information
beaud76 committed May 30, 2021
1 parent 8bbbc1b commit aa7788e
Show file tree
Hide file tree
Showing 25 changed files with 9,013 additions and 7,626 deletions.
2 changes: 1 addition & 1 deletion sql/emaj--4.0.0--devel.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $do$
-- the E-Maj environment is not damaged
PERFORM * FROM (SELECT * FROM emaj.emaj_verify_all()) AS t(msg) WHERE msg <> 'No error detected';
IF FOUND THEN
RAISE EXCEPTION 'E-Maj upgrade: the E-Maj environment is damaged. Please fix the issue before upgrading. You may execute "SELECT * FROM emaj.emaj_verify_all();" to get more details.';
RAISE WARNING 'E-Maj upgrade: the E-Maj environment is damaged. Please fix the issue before upgrading. You may execute "SELECT * FROM emaj.emaj_verify_all();" to get more details.';
END IF;
-- no existing group must have been created with a postgres version prior 8.4
SELECT string_agg(group_name, ', ') INTO v_groupList FROM emaj.emaj_group
Expand Down
11,735 changes: 6,462 additions & 5,273 deletions sql/emaj--3.4.0.sql → sql/emaj--4.0.0.sql

Large diffs are not rendered by default.

226 changes: 149 additions & 77 deletions test/10/expected/after_upg_while_logging.out

Large diffs are not rendered by default.

520 changes: 297 additions & 223 deletions test/10/expected/before_upg_while_logging.out

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/10/expected/install_previous.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ SET default_tablespace TO tspemaj;
------------------------------------------------------------
-- emaj installation in its previous version as an extension
------------------------------------------------------------
CREATE EXTENSION emaj VERSION '3.4.0';
CREATE EXTENSION emaj VERSION '4.0.0';
------------------------------------------------------------
-- check installation
------------------------------------------------------------
-- check impact in catalog
select extname, extversion from pg_extension where extname = 'emaj';
extname | extversion
---------+------------
emaj | 3.4.0
emaj | 4.0.0
(1 row)

-- check the emaj_param content
SELECT param_value_text FROM emaj.emaj_param WHERE param_key = 'emaj_version';
param_value_text
------------------
3.4.0
4.0.0
(1 row)

-- check history
select hist_id, hist_function, hist_event, hist_object, hist_wording, hist_user from emaj.emaj_hist order by hist_id;
hist_id | hist_function | hist_event | hist_object | hist_wording | hist_user
---------+---------------+------------+-------------+--------------------------+-----------
1 | EMAJ_INSTALL | | E-Maj 3.4.0 | Initialisation completed | postgres
1 | EMAJ_INSTALL | | E-Maj 4.0.0 | Initialisation completed | postgres
(1 row)

107 changes: 61 additions & 46 deletions test/10/expected/install_upgrade.out

Large diffs are not rendered by default.

279 changes: 119 additions & 160 deletions test/10/expected/upgrade_while_logging.out

Large diffs are not rendered by default.

226 changes: 149 additions & 77 deletions test/12/expected/after_upg_while_logging.out

Large diffs are not rendered by default.

520 changes: 297 additions & 223 deletions test/12/expected/before_upg_while_logging.out

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/12/expected/install_previous.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ SET default_tablespace TO tspemaj;
------------------------------------------------------------
-- emaj installation in its previous version as an extension
------------------------------------------------------------
CREATE EXTENSION emaj VERSION '3.4.0';
CREATE EXTENSION emaj VERSION '4.0.0';
------------------------------------------------------------
-- check installation
------------------------------------------------------------
-- check impact in catalog
select extname, extversion from pg_extension where extname = 'emaj';
extname | extversion
---------+------------
emaj | 3.4.0
emaj | 4.0.0
(1 row)

-- check the emaj_param content
SELECT param_value_text FROM emaj.emaj_param WHERE param_key = 'emaj_version';
param_value_text
------------------
3.4.0
4.0.0
(1 row)

-- check history
select hist_id, hist_function, hist_event, hist_object, hist_wording, hist_user from emaj.emaj_hist order by hist_id;
hist_id | hist_function | hist_event | hist_object | hist_wording | hist_user
---------+---------------+------------+-------------+--------------------------+-----------
1 | EMAJ_INSTALL | | E-Maj 3.4.0 | Initialisation completed | postgres
1 | EMAJ_INSTALL | | E-Maj 4.0.0 | Initialisation completed | postgres
(1 row)

107 changes: 61 additions & 46 deletions test/12/expected/install_upgrade.out

Large diffs are not rendered by default.

279 changes: 119 additions & 160 deletions test/12/expected/upgrade_while_logging.out

Large diffs are not rendered by default.

107 changes: 61 additions & 46 deletions test/13/expected/install_upgrade.out

Large diffs are not rendered by default.

107 changes: 61 additions & 46 deletions test/14/expected/install_upgrade.out

Large diffs are not rendered by default.

226 changes: 149 additions & 77 deletions test/95/expected/after_upg_while_logging.out

Large diffs are not rendered by default.

1,604 changes: 739 additions & 865 deletions test/95/expected/before_upg_while_logging.out

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/95/expected/install_previous.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ SET default_tablespace TO tspemaj;
------------------------------------------------------------
-- emaj installation in its previous version as an extension
------------------------------------------------------------
CREATE EXTENSION emaj VERSION '3.4.0';
CREATE EXTENSION emaj VERSION '4.0.0';
------------------------------------------------------------
-- check installation
------------------------------------------------------------
-- check impact in catalog
select extname, extversion from pg_extension where extname = 'emaj';
extname | extversion
---------+------------
emaj | 3.4.0
emaj | 4.0.0
(1 row)

-- check the emaj_param content
SELECT param_value_text FROM emaj.emaj_param WHERE param_key = 'emaj_version';
param_value_text
------------------
3.4.0
4.0.0
(1 row)

-- check history
select hist_id, hist_function, hist_event, hist_object, hist_wording, hist_user from emaj.emaj_hist order by hist_id;
hist_id | hist_function | hist_event | hist_object | hist_wording | hist_user
---------+---------------+------------+-------------+--------------------------+-----------
1 | EMAJ_INSTALL | | E-Maj 3.4.0 | Initialisation completed | postgres
1 | EMAJ_INSTALL | | E-Maj 4.0.0 | Initialisation completed | postgres
(1 row)

0 comments on commit aa7788e

Please sign in to comment.