IRC logs of #tryton for Sunday, 2012-01-29

chat.freenode.net #tryton log beginning Sun Jan 29 00:00:02 CET 2012
2012-01-29 13:06 -!- udono(~udono@ip-109-91-208-150.unitymediagroup.de) has left #tryton
2012-01-29 14:14 <gltripp> hello
2012-01-29 14:52 <gltripp> can somebody help me with upgrading from 1.8 to 2.2 ?
2012-01-29 14:53 <gltripp> i get some errors with the table "ir_translation" while running an upgrade... :-(
2012-01-29 14:55 <cedk> gltripp: what is the error?
2012-01-29 14:55 <gltripp> [Sun Jan 29 14:04:01 2012] WARNING:init:Unable to set column src_md5 of table ir_translation not null !
2012-01-29 14:56 <gltripp> my database is from version 1.8
2012-01-29 14:56 <gltripp> can i upgrade with 2.2 or do i have to upgrade 1.8 to 2.0 and then 2.0 to 2.2 ?
2012-01-29 14:57 <cedk> gltripp: you can
2012-01-29 14:58 <cedk> gltripp: the warning should not be an issue, did the column filled?
2012-01-29 15:00 <gltripp> the column does not exist
2012-01-29 15:01 <cedk> gltripp: very strange
2012-01-29 15:01 <cedk> gltripp: it doesn't exist after the migration?
2012-01-29 15:01 <gltripp> it does not exist before the migration
2012-01-29 15:02 <cedk> gltripp: that's normal
2012-01-29 15:03 <gltripp> i'm reinstalling all python modules now
2012-01-29 15:03 <gltripp> an then, i'll retry an database-migration via "trytond -d <dbname> -u all"
2012-01-29 15:06 <gltripp> ok, migration is running
2012-01-29 15:14 <gltripp> hm
2012-01-29 15:14 <gltripp> [Sun Jan 29 15:11:00 2012] ERROR:sql:Wrong SQL: ALTER TABLE "ir_model_field" ADD FOREIGN KEY ("model") REFERENCES "ir_model" ON DELETE CASCADE
2012-01-29 15:14 <gltripp> psycopg2.IntegrityError: FEHLER: Einfügen oder Aktualisieren in Tabelle »ir_model_field« verletzt Fremdschlüssel-Constraint »ir_model_field_model_fkey«
2012-01-29 15:14 <gltripp> DETAIL: Schlüssel (model)=(259) ist nicht in Tabelle »ir_model« vorhanden.
2012-01-29 15:21 <gltripp> any ideas ?
2012-01-29 16:01 <cedk> gltripp: your data seems corrupted
2012-01-29 16:01 <cedk> gltripp: the foreign key should exist since day one
2012-01-29 16:08 <gltripp> hmm
2012-01-29 16:08 <gltripp> thats strange
2012-01-29 16:08 <gltripp> the database is working with 1.8
2012-01-29 16:14 <cedk> gltripp: this error doesn't prevent trytond to work
2012-01-29 16:14 <cedk> gltripp: but you must have a wrong record in the table ir_model_field
2012-01-29 16:26 <gltripp> cedk: whats better: add the column by hand - or - fix ir_model_field ?
2012-01-29 16:26 <cedk> gltripp: fix ir_model_field, find the record with the wrong model value
2012-01-29 16:37 <gltripp> i'm not very familiar with all the model relationships
2012-01-29 16:37 <gltripp> :-(
2012-01-29 16:39 <gltripp> ah, i think i got the recoed
2012-01-29 16:39 <gltripp> record
2012-01-29 16:41 <gltripp> it was a record about an "id" field
2012-01-29 16:45 <cedk> gltripp: from which model?
2012-01-29 16:48 <gltripp> there was no record in ir_model with this foreign key...
2012-01-29 16:50 <cedk> gltripp: and in the field relation?
2012-01-29 16:51 <gltripp> here are some other "broken" records with non existing references
2012-01-29 16:52 <gltripp> some of them have "res.user" the field relations
2012-01-29 16:56 <cedk> gltripp: what are the names?
2012-01-29 16:59 <gltripp> "rec_name" (relation = null)
2012-01-29 16:59 <gltripp> "create_uid" (relation = res.user)
2012-01-29 16:59 <gltripp> "domain" (relation = null)
2012-01-29 17:00 <cedk> gltripp: this is very strange
2012-01-29 17:00 <gltripp> create_date, nodes, model, id and child_name (rel = null)
2012-01-29 17:00 <cedk> gltripp: since when do you have the database?
2012-01-29 17:00 <gltripp> since... 2 years ?
2012-01-29 17:01 <gltripp> maybe i should stard with a fresh database and try to import my data to it ?
2012-01-29 17:04 <cedk> gltripp: which version?
2012-01-29 17:05 <cedk> gltripp: importing is much more work
2012-01-29 17:05 <gltripp> this database runs with 1.8 without known problems
2012-01-29 17:05 <gltripp> maybe i could do the following:
2012-01-29 17:05 <gltripp> 1. dump data from the 1.8 database
2012-01-29 17:06 <gltripp> 2. start with a new 1.8 database
2012-01-29 17:06 <junkfilter> hi, i do have some problems connecting to the demo server mentoined on the tryton.org homepage with my tryton client (lastest, linuxmint 12). the default profile isnt working, if i add a profile with the informations mentoined on the homepage (dbname is missing!) it trys to fetch the available databases without luck (and does not timeout).
2012-01-29 17:06 <gltripp> 3. import the module's data via sql (nothing from the ir.* stuff)
2012-01-29 17:06 <gltripp> ?
2012-01-29 17:08 <cedk> gltripp: I don't know
2012-01-29 17:08 <gltripp> hm
2012-01-29 17:08 <gltripp> ok
2012-01-29 17:09 <gltripp> damn
2012-01-29 17:09 <cedk> junkfilter: demo server works
2012-01-29 17:11 <junkfilter> hmmmm strange. but there is no other package i need than tryton-client? (deb/ubuntu) i guess apt-get would have caught the dependencies :)
2012-01-29 17:12 <cedk> junkfilter: I don't know ubuntu
2012-01-29 17:13 <junkfilter> do you now the lastest dbname? demo, demo2.2?
2012-01-29 17:15 <cedk> junkfilter: it is in the profile
2012-01-29 17:19 <junkfilter> ah right, and because the profile says host: demo2.0.tryton.org:8070 and the website says demo.tryton.org:8000 and there is a 2.2 branch i can totally trust the default profile. that's the point, the default profile is not working and its definitely not my router/firewall. and because the profile from tryton.org is not working I came here :)
2012-01-29 17:20 <junkfilter> but you said the demo server is working so, yeah, i don't know. thanks for the info. now i can at least be sure i'm not trying to connect to a shutdown server
2012-01-29 17:26 <cedk> junkfilter: you don't have the last version which is 2.2
2012-01-29 17:31 <junkfilter> m( oh boy ... i didnt think of that. is there no v2.0 database active? sad, sad. okay, seems like i have to build the client myself
2012-01-29 17:31 <junkfilter> thanks for the hint
2012-01-29 17:32 <cedk> junkfilter: I just check 2.0 is down
2012-01-29 17:37 <cedk> junkfilter: it is up now
2012-01-29 17:40 <junkfilter> woohoo thanks a lot. i was just digging in the manual for manual installing from the repos. but thats much easier :)
2012-01-29 19:15 <gltripp> damn
2012-01-29 19:15 <gltripp> re-importing only the data from ir_* tables seems to be hard work :-/
2012-01-29 19:27 <gltripp> cedk ?
2012-01-29 19:28 <cedk> gltripp: yes
2012-01-29 19:29 <gltripp> i've installed a backup from my 1.8 database
2012-01-29 19:30 <gltripp> and on the first look, it seems that there are no inconstientcies
2012-01-29 19:31 <gltripp> select * from ir_model;
2012-01-29 19:31 <gltripp> where id not in (select model from ir_model_field mf group by model order by model )
2012-01-29 19:31 <gltripp> no results
2012-01-29 19:32 <cedk> gltripp: the query should be in the other way
2012-01-29 19:33 <gltripp> is there an option to get the sql-statements that an migration would execute?
2012-01-29 19:33 <gltripp> like a dump?
2012-01-29 19:34 <cedk> gltripp: you can put print in trytond/backend/postgresql/database.py
2012-01-29 19:34 <gltripp> select * from ir_model_field
2012-01-29 19:34 <gltripp> where model not in (select id from ir_model)
2012-01-29 19:34 <gltripp> ;
2012-01-29 19:35 <gltripp> no results either
2012-01-29 19:36 <gltripp> is this good ?
2012-01-29 19:37 <cedk> gltripp: yeps, do you have the foreign key?
2012-01-29 19:37 <gltripp> foreign key of what ?
2012-01-29 19:38 <cedk> from ir_model_field to ir_model
2012-01-29 19:39 <gltripp> you mean the contraint ?
2012-01-29 19:41 <cedk> gltripp: yes a foreign key
2012-01-29 19:42 <gltripp> ALTER TABLE ir_model_field
2012-01-29 19:42 <gltripp> ADD CONSTRAINT ir_model_field_model_fkey FOREIGN KEY (model)
2012-01-29 19:42 <gltripp> REFERENCES ir_model (id) MATCH SIMPLE
2012-01-29 19:42 <gltripp> ON UPDATE NO ACTION ON DELETE CASCADE;
2012-01-29 19:42 <gltripp> yes
2012-01-29 19:42 <gltripp> this contraint is installed on the db
2012-01-29 19:43 <cedk> gltripp: so how could it be delete during the migration?
2012-01-29 19:45 <gltripp> *shrug*
2012-01-29 19:47 <gltripp> should i insert the print-statement and re-run the migration ?
2012-01-29 19:48 <cedk> gltripp: run the migration, there is no reason to have the foreign key dropped
2012-01-29 19:48 <gltripp> hm
2012-01-29 19:48 <gltripp> ok
2012-01-29 19:48 <gltripp> i'll try it
2012-01-29 20:47 <gltripp> re
2012-01-29 20:48 <gltripp> [Sun Jan 29 20:47:05 2012] WARNING:init:Unable to set column src_md5 of table ir_translation not null !
2012-01-29 20:48 <gltripp> Try to re-run: trytond.py --update=module
2012-01-29 20:48 <gltripp> If it doesn't work, update records and execute manually:
2012-01-29 20:48 <gltripp> ALTER TABLE "ir_translation" ALTER COLUMN "src_md5" SET NOT NULL
2012-01-29 20:48 <gltripp> Transaction().set_context(self._context)):
2012-01-29 20:49 <cedk> gltripp: this is normal, after migration the column must be filled
2012-01-29 20:49 <gltripp> ok
2012-01-29 20:49 <cedk> gltripp: it is just a warning
2012-01-29 20:49 <gltripp> *migration is still running*
2012-01-29 21:16 <gltripp> thats getting wired
2012-01-29 21:16 <gltripp> ALTER TABLE "stock_shipment_in" ALTER COLUMN "company" SET NOT NULL
2012-01-29 21:16 <gltripp> Wrong SQL: SELECT "stock_move".id AS id,"stock_move"."create_date" AS "create_date","stock_move"."planned_date" AS "planned_date","stock_move"."write_uid" AS "write_uid","stock_move"."currency" AS "currency","stock_move"."create_uid" AS "create_uid","stock_move"."shipment_internal" AS "shipment_internal","stock_move"."unit_price" AS "unit_price","stock_move"."state" AS "state","stock_move"."effective_date" AS "effective_date","stock_move"."shipment_in_
2012-01-29 21:16 <gltripp> Traceback (most recent call last):
2012-01-29 21:17 <gltripp> psycopg2.ProgrammingError: FEHLER: Spalte stock_move.internal_quantity existiert nicht
2012-01-29 21:17 <gltripp> LINE 1: ...S "uom","stock_move"."cost_price" AS "cost_price","stock_mov...
2012-01-29 21:18 <cedk> gltripp: don't copy/paste in channel, use pastebin
2012-01-29 21:18 <gltripp> k
2012-01-29 21:19 <gltripp> http://pastebin.com/UZitBzJb
2012-01-29 21:24 <cedk> gltripp: this is a migration bug
2012-01-29 21:25 <cedk> gltripp: please fill an issue
2012-01-29 21:49 <gltripp> oO
2012-01-29 21:49 <gltripp> nice...
2012-01-29 21:54 <cedk> gltripp: indeed you could make the migration to 2.0 and after 2.2 to skip this issue
2012-01-29 22:45 <jamil> hi all
2012-01-29 22:47 <jamil> zodman: are you deploying module account to México?
2012-01-29 22:55 <cedk> gltripp: did you fill the issue?

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!