SylvainTI / wwwsqldesigner

Automatically exported from code.google.com/p/wwwsqldesigner
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

UNSIGNED attribute #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create mysql database with only table:
CREATE TABLE `tableA` (
`id` UNSIGNED INT NOT NULL AUTO_INCREMENT ,
PRIMARY KEY (`id`)
);
2. import database to SQL Designer
3. export sql to re-create the table again

What is the expected output? What do you see instead?
the id is signed by default

What version of the product are you using? On what operating system?
Version 2.3.2 (8.1.2009)

Please provide any additional information below.
The tool is used in most cases to design database and then generate sql and
create tables. Workaround is to create tables and change types, but it's
hard to do it with many tables. Also foreign keys are problem when you
change types. It would be better id the tool supports UNSIGNED attribute
just like it supports INTEGER.

Original issue reported on code.google.com by nicks...@gmail.com on 22 Feb 2009 at 9:56

GoogleCodeExporter commented 9 years ago
To fix this, one would have to:

1) add another data type, "unsigned int", to MySQL types definition,
2) modify the php-mysql import backend to read unsigned declaration from
information_schema.columns.

Note that according to 
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html ,
UNSIGNED is a non-standard feature. This will probably never make it into a 
standard
wwwsql build, unless someone sends this as a user-contributed enhancement 
(which I
will gladly commit). 

Original comment by ondrej.zara on 23 Feb 2009 at 7:28