Talk:Importing DB Seed Manually

From iDempiere en

NOTE FROM Hiep Lq ON DB CREATION

NOTE: It is possible that you will confront problems related to pg_hba.conf configuration (/etc/postgresql/{version}/main/pg_hba.conf), it's beyond the scope of this tutorial to solve those problems at this moment, please check and configure proper permissions. Also, this tutorial is intended to work on a postgres installed locally, if your postgres is elsewhere you must use corresponding -h (host) and -p (port) parameters for createdb and psql. If you receive the error createdb: could not connect to database template1: FATAL: Peer authentication failed for user "adempiere" you might be able to add -h localhost to resolve quickly. For a more permanent solution visit stackoverflow (WARNING: some answers in stackoverflow recommend the usage of "trust" - this is a bad recommendation, it makes postgresql very insecure).


NOTE: createdb will use default collate of OS. some condition it's bad.

I experiment use Thailand text on db with collate=en_US, it very slow on operator

for that case full command is

 createdb --template=template0 -E UNICODE -O adempiere -U adempiere -E UNICODE --lc-collate "th_TH.utf8" --lc-ctype "th_TH.utf8" idempiere

but one day i get error about wrong collate with th_TH.utf8 when run this command. bellow is how to fix postgres-createdb-invalid-locale-name

 locale -a # list current support collate of OS
 sudo apt-get install locales
 sudo dpkg-reconfigure locales

NOTE FROM Andreas Sumerauer ON DB CREATION

Sometimes DB creation fails with the error message

 createdb: could not connect to database template1: FATAL:  Peer authentication failed for user "adempiere"

This error can be fixed by adding the parameter --host localhost to the command. The full command is then:

 postgres@id-v6-dev:~$ createdb  --template=template0 -E UNICODE -O adempiere -U adempiere idempiere --host localhost

NOTE FROM Frank Wolff ON Importing DB Seed Manually

Sometimes you will have (diverse) errors due to data incompabilities of the data structure of the current branch with the former main branch. Then it is necessary to apply the data migration scipts on the database which is (sometimes) based on a former branch. You will find the script in the HomeDirectory of the source code on the computer (normally $IDEMPIERE_HOME):

 RUN_SyncDBDev.sh

Run the script and all the migration scripts of former branches of the version will be applied.

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