Importing DB Seed Manually

From iDempiere en

Table of Contents | Setting up Eclipse | Importing DB Seed Manually | Configuring iDempiere within Eclipse

Please note this procedure is intended for technical people wanting to configure iDempiere to run in Eclipse, there is an easier mechanism on the installers to create the database.

Let's check the steps to create an idempiere postgres database:

Create adempiere user

sudo su - postgres
psql -U postgres -c "CREATE ROLE adempiere SUPERUSER LOGIN PASSWORD 'adempiere'"
exit

WARNING: Of course this is an insecure password, it is recommended that you set up a proper password for this user account

Create the idempiere database

createdb  --template=template0 -E UNICODE -O adempiere -U adempiere idempiere
psql -d idempiere -U adempiere -c "ALTER ROLE adempiere SET search_path TO adempiere, pg_catalog"

When asked for the password please provide the adempiere password that you set up in the previous step.

NOTE: See Discussion tab for additional notes.

Installing UUID (required to apply some migration scripts)

Some migration scripts reference the function generate_uuid, unfortunately, the way to install this is different on different postgres versions, so we were not able to include it by default on the DB seed, next are the instructions per version:

  • Run the command CREATE EXTENSION "uuid-ossp" using psql
psql -d idempiere -U adempiere -c 'CREATE EXTENSION "uuid-ossp"'

NOTE ON WINDOWS: If the command is executed on a Windows System change the instruction with "CREATE EXTENSION \"uuid-ossp\"", see the replacement of characters (") with (\") and (') with (") on beginning and on the end statement, otherwise command goes in error.

Import the seed

cd /tmp
jar xvf $IDEMPIERE_REPOSITORY/org.adempiere.server-feature/data/seed/Adempiere_pg.jar
psql -d idempiere -U adempiere -f Adempiere_pg.dmp

This How-To is brought to you by Carlos Ruiz from BX Service GmbH. Feel free to improve directly or suggest using the Discussion tab.

Table of Contents | Setting up Eclipse | Importing DB Seed Manually | Configuring iDempiere within Eclipse

Cookies help us deliver our services. By using our services, you agree to our use of cookies.