Am 26. September 2017 19:11:22 OESZ schrieb Maah Moussa <[email protected]>:
>On Friday, September 22, 2017 at 11:20:10 PM UTC, Cédric Krier wrote:
>> On 2017-09-22 10:20, Maah Moussa wrote:
>> > > Is the module purchase_request installed?
>> > >  
>> > It seems to be installed.
>> 
>> But it must be activated on the database so the update must be:
>> 
>>     --all -u purchase_request
>> 
>> This is a new module on which new version of activated module
>depends.
>> 
>> > I have been using the README.SUSE. I also get this message when
>trying to upgrade the database in the current situation: 
>> > Traceback (most recent call last):
>> >   File "/usr/bin/trytond-admin", line 21, in <module>
>> >     admin.run(options)
>> >   File "/usr/lib/python3.4/site-packages/trytond/admin.py", line
>24, in run
>> >     with Transaction().start(db_name, 0):
>> >   File "/usr/lib/python3.4/site-packages/trytond/transaction.py",
>line 87, in start
>> >     database = Database(database_name).connect()
>> >   File
>"/usr/lib/python3.4/site-packages/trytond/backend/postgresql/database.py",
>line 94, in connect
>> >     minconn, maxconn, self.dsn(self.name))
>> >   File "/usr/lib64/python3.4/site-packages/psycopg2/pool.py", line
>156, in __init__
>> >     self, minconn, maxconn, *args, **kwargs)
>> >   File "/usr/lib64/python3.4/site-packages/psycopg2/pool.py", line
>58, in __init__
>> >     self._connect()
>> >   File "/usr/lib64/python3.4/site-packages/psycopg2/pool.py", line
>62, in _connect
>> >     conn = psycopg2.connect(*self._args, **self._kwargs)
>> >   File "/usr/lib64/python3.4/site-packages/psycopg2/__init__.py",
>line 164, in connect
>> >     conn = _connect(dsn, connection_factory=connection_factory,
>async=async)
>> > psycopg2.OperationalError: FATAL:  role "root" does not exist
>> 
>> The configuration of the database connection seems to be wrong.
>> 
>> On 2017-09-22 10:15, Maah Moussa wrote:
>> > On Friday, September 22, 2017 at 1:35:07 PM UTC, Cédric Krier
>wrote:
>> > > You have to follow the migration path from 3.8 to 4.2:
>https://discuss.tryton.org/c/migration
>> > > And perform an update of the database:
>http://doc.tryton.org/4.4/trytond/doc/topics/setup_database.html#topics-setup-database
>> > 
>> > Is the migration path a must to be used in any way the dump is
>taken, gnuhealth-control or client dump when moving between series? 
>> 
>> I do not know about gnuhealth-control.
>> But migration must always be done when changing the version.
>> 
>> > Do I need to follow from 3.8 to 4.0 then 4.0 to 4.2?
>> 
>> Yes, all the migration operation must be done.
>> You can just made the database update on the last one normally.
>> 
>> > Does it matter before or after restoring the database?
>> 
>> You can not do the migration before restoring the database because
>you
>> do not have a database to update.
>> 
>> > How to apply this SQL queries into SQL plain text on OpenSUSE? A
>hint
>> > on how to apply [SQL] or [PY] changes would be much appreciated.
>the
>> > command is not available.
>> 
>> Run the sql query using the psql command:
>> https://www.postgresql.org/docs/9.2/static/app-psql.html
>> 
>> -- 
>> Cédric Krier - B2CK SPRL
>> Email/Jabber: [email protected]
>> Tel: +32 472 54 46 59
>> Website: http://www.b2ck.com/
>
>trytond-admin -d gnuhealth30 -c trytond.conf -u purchase_request --all 
>result:
>Traceback (most recent call last):
>  File "/usr/bin/trytond-admin", line 21, in <module>
>    admin.run(options)
>File "/usr/lib/python3.4/site-packages/trytond/admin.py", line 24, in
>run
>    with Transaction().start(db_name, 0):
>File "/usr/lib/python3.4/site-packages/trytond/transaction.py", line
>87, in start
>    database = Database(database_name).connect()
>File
>"/usr/lib/python3.4/site-packages/trytond/backend/sqlite/database.py",
>line 242, in connect
>    raise IOError('Database "%s" doesn\'t exist!' % db_filename)
>OSError: Database "gnuhealth30.sqlite" doesn't exist!

 Trytond seems to be connected to sqlite,  not to postgres. -> Your dB 
definition in trytond.conf is wrong. Fix this first

>I restored the same Database with same procedures into 3.8 and it
>works.
>I tried psql your_db_name < upgrade_32.sql
>Result:
>ERROR:  column "category" of relation "product_template" does not exist
>UPDATE 0
>UPDATE 0
>ERROR:  column "active" of relation "gnuhealth_patient" does not exist
>LINE 3: update gnuhealth_patient set active=True;
>                                     ^
>ERROR:  column "active" of relation "gnuhealth_medicament" does not
>exist
>LINE 2: update gnuhealth_medicament set active=True;
>                                        ^
>ERROR:  column "active" of relation "gnuhealth_healthprofessional" does
>not exist
>LINE 2: update gnuhealth_healthprofessional set active=True;
>                                                ^
>ERROR:  column "active" of relation "gnuhealth_lab_test_type" does not
>exist
>LINE 2: update gnuhealth_lab_test_type  set active=True;
>                                            ^
>ERROR:  column "active" of relation "gnuhealth_imaging_test" does not
>exist
>LINE 2: update gnuhealth_imaging_test set active=True;
>                                          ^
>ERROR:  relation "gnuhealth_ambulance" does not exist
>LINE 2: update gnuhealth_ambulance set active=True;
>
>Going psql db_name 
>UPDATE 0
>after UPDATE account_tax_template SET credit_note_base_sign =
>credit_note_base_sign * -1, credit_note_tax_sign = credit_note_tax_sign
>* -1;
>and UPDATE account_tax_template SET credit_note_base_sign =
>credit_note_base_sign * -1, credit_note_tax_sign = credit_note_tax_sign
>* -1;
>
>Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/12CDC6C8-9391-4C03-BA54-5D3CB0F75751%40gmx.de.

Reply via email to