Skip to content

Commit

Permalink
Setup new 2.0.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
beaud76 committed Feb 21, 2017
1 parent 7e4bb65 commit 209d198
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ E-Maj - Release notes
---------------------
<NEXT_VERSION>
------
Enhancements:

Bug fixes:

2.0.1
------
Enhancements:
- rollback simulations using the emaj_estimate_rollback_group() function is
now able to process protected groups or marks.
Expand Down
4 changes: 2 additions & 2 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"version": "<NEXT_VERSION>",
"maintainer": "Philippe Beaudoin - phb<dot>emaj<at>free<dot>fr",
"license": "gpl_2",
"tags": [ "emaj", "table log", "log trigger", "archive before journal", "logical rollback", "flashback" ],
"tags": [ "emaj", "table log", "audit log", "log trigger", "archive before journal", "logical rollback", "flashback" ],
"provides": {
"emaj": {
"file": "sql/emaj.sql",
"file": "sql/emaj-<NEXT_VERSION>.sql",
"docfile": "doc/emaj.<NEXT_VERSION>_doc_en.pdf",
"version": "<NEXT_VERSION>",
"abstract": "Tables updates log and rollback"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- E-Maj: migration from 2.0.0 to <NEXT_VERSION>
-- E-Maj: migration from 2.0.0 to 2.0.1
--
-- This software is distributed under the GNU General Public License.
--
Expand Down Expand Up @@ -36,7 +36,7 @@ $do$
END IF;
-- the installed postgres version must be at least 9.1
IF current_setting('server_version_num')::int < 90100 THEN
RAISE EXCEPTION 'E-Maj upgrade: the current PostgreSQL version (%) is not compatible with E-Maj <NEXT_VERSION>. The PostgreSQL version should be at least 9.1.', current_setting('server_version');
RAISE EXCEPTION 'E-Maj upgrade: the current PostgreSQL version (%) is not compatible with E-Maj 2.0.1. The PostgreSQL version should be at least 9.1.', current_setting('server_version');
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 Expand Up @@ -1967,10 +1967,10 @@ INSERT INTO pg_catalog.pg_description (objoid, classoid, objsubid, description)
);

-- update the version id in the emaj_param table
UPDATE emaj.emaj_param SET param_value_text = '<NEXT_VERSION>' WHERE param_key = 'emaj_version';
UPDATE emaj.emaj_param SET param_value_text = '2.0.1' WHERE param_key = 'emaj_version';

-- insert the upgrade record in the operation history
INSERT INTO emaj.emaj_hist (hist_function, hist_object, hist_wording) VALUES ('EMAJ_INSTALL','E-Maj <NEXT_VERSION>', 'Upgrade from 2.0.0 completed');
INSERT INTO emaj.emaj_hist (hist_function, hist_object, hist_wording) VALUES ('EMAJ_INSTALL','E-Maj 2.0.1', 'Upgrade from 2.0.0 completed');

-- post installation checks
DO
Expand Down
3 changes: 3 additions & 0 deletions sql/emaj--2.0.1--next_version.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--
-- E-Maj: migration from 2.0.1 to <NEXT_VERSION>
--
4 changes: 2 additions & 2 deletions tools/create_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
done
git mv sql/emaj--next_version.sql sql/emaj--${NEW}.sql

# Change version identifiers inside files from /php + /tools + INFOS, META.json README
find php tools INFOS META.json README -type f -exec sed -i "s/<NEXT_VERSION>/${NEW}/g" '{}' \;
# Change version identifiers inside files from /php + /tools + META.json README
find php tools META.json README -type f -exec sed -i "s/<NEXT_VERSION>/${NEW}/g" '{}' \;

# Change version identifiers inside files from /test/sql
find test/sql -type f -exec sed -i "s/<NEXT_VERSION>/${NEW}/g" '{}' \;
Expand Down

0 comments on commit 209d198

Please sign in to comment.