Subject: | postgres: serial -> int not working because int != integer |
Date: | Wed, 26 May 2010 11:41:53 +0800 |
To: | bug-Parse-Dia-SQL [...] rt.cpan.org |
From: | shem p <shemgp [...] gmail.com> |
Hello!
I'm using Parse::Dia::SQL 0.16 and having a problem in generating
associations (foreign key references) in Postgres with tables having a
primary key of data type SERIAL referenced to a table field of data
type INT. Here's the warning and info.
[INFO] Replaced serial with integer
[WARN] Attribute types (user_id is serial, user_id is int) don't match
in usersSales (users,sales)
It works when the second table has a data type of INTEGER instead of
INT. So i think this means that get_base_type is called correctly,
but it still is not matching in line # 507 in Utils.pm. That's
because 'integer' is not equal with 'int' which should actually be the
same[1].
Here's a simple patch to fix it. Hope this helps. Thanks for your time.
[1] http://www.postgresql.org/docs/8.2/static/datatype-numeric.html
Message body is not shown because sender requested not to inline it.