Important announcement for developers

154 views
Skip to first unread message

Carlos Antonio Ruiz Gomez

unread,
Sep 4, 2012, 4:27:35 PM9/4/12
to idempi...@googlegroups.com, idem...@googlegroups.com
Hi iDempiere developers,

Starting with script 901 developers must change the lines added to the migration scripts.

Before this we were adding an "UPDATE AD_System SET LastMigrationScriptApplied".

Since script 901 this must be changed to add a line like:

SELECT register_migration_script('901_IDEMPIERE-420.sql') FROM dual
;

Of course, changing the script name within the parentheses

Please note that "dual" table was created on postgresql also to ease this task.

Technical information can be found at
http://jira.idempiere.com/browse/IDEMPIERE-420

Regards,

Carlos Ruiz

Daniel Tamm

unread,
Sep 5, 2012, 5:27:13 AM9/5/12
to idem...@googlegroups.com
Great initiative :-) This is just getting better and better :-)

I have a piece of script-runner application code that I plan to contribute as soon as I find the time. It can be integrated in iDempiere and soon we might have a solution for completely automated updates! The code is currently public on my Adempiere Account Editor repository at sf.net, but it needs to be adapted to be integrated in iDempiere.

/Daniel
-- 

--
Notima AB
Lärjungevägen 6
SE-136 69 Vendelsö
Tel: +46 8 776 31 30 Fax: +46 70 411 21 04
Email: in...@notima.se - Web: http://www.notima.se/
--

redhuan d. oon

unread,
Oct 15, 2012, 6:36:46 PM10/15/12
to idem...@googlegroups.com
Yes, i noted this works as this appears after using the latest iDempiereInstaller: Database Version : 931_IDEMPIERE-375.sql

@Daniel, I also upgraded the iDempiereInstaller with an UpgradeAssistant that can upgrade migration scripts on a monthly basis for Windows users. http://red1.org/adempiere/viewtopic.php?f=29&t=1629&p=8104#p8104

Thomas Bayen

unread,
Oct 18, 2012, 11:46:35 AM10/18/12
to idem...@googlegroups.com
What do you mean by "script runner"? I use the following one-liner ( ;-) ) to migrate the database to the recent version. It is not nice but perhaps it helps somebody to write it down here...

ls | egrep '^digit:{3}.*\.sql$' | sort | tail -n +`ls | egrep '^digit:{3}.*\.sql$' \
| sort \
| grep -n \`cat ../../../org.adempiere.server-feature/data/seed/LAST_SCRIPT_APPLIED_ON_THIS_SEED | tail -n 1\` \
| cut -d ':' -f1` | tail -n +2 \
| perl -pe 's/(.*)/psql -h efg -d idempiere -U adempiere -f $1/' >needed_migrations.sh sh needed_migrations.sh

Thomas

Hiep Lq

unread,
Oct 22, 2012, 6:04:58 AM10/22/12
to idem...@googlegroups.com

i run script in ubuntu 12.04 as below

step 1: modified the script as below
digit:{3} => [[:digit:]]{3}
../../../org.adempiere.server-feature/data/seed/LAST_SCRIPT_APPLIED_ON_THIS_SEED => absolut path
step 2: cd to idempiere/org.adempiere.server-feature/data/seed
step 3: run the modified command .

and below is error output

grep:  : No such file or directory
bash: command substitution: line 2: syntax error near unexpected token `|'
bash: command substitution: line 2: `| cut -d ':' -f1'
tail: +: invalid number of lines

please help me corect scritp

redhuan d. oon

unread,
Oct 22, 2012, 11:33:52 AM10/22/12
to idem...@googlegroups.com
Carlos reminded me of this, and now i understand that it can be used in my updater since its more dynamic. Will look up the code.


On Wednesday, 5 September 2012 17:27:20 UTC+8, Daniel Tamm wrote:

Thomas Bayen

unread,
Oct 22, 2012, 11:46:45 AM10/22/12
to idem...@googlegroups.com
I am really sorry. There seems to be problems with quotes. You may copy and past from this page:

  http://wiki.idempiere.org/de/Migrations-Skripte_ausf%C3%BChren#Migrationsskripte_ausf.C3.BChren

It may be smarter to change some paths like you suggested. This is just the line that works for me and may be a inducement to make it better. :-)

Thomas
Reply all
Reply to author
Forward
0 new messages