Fork me on GitHub
Subscribe 2

Ticket #526 (fixed bug)

Can't specify length for integer column type

  • Created: 2011-11-02 07:43:03
  • Reported by: daris
  • Assigned to: Franz
  • Milestone: 2.0-alpha1
  • Component: database
  • Priority: normal

Can't specify length for integer column type (you can only set the length for the TYPE_VARCHAR)

What about new $length parameter for the Flux_Database_Query_Helper_TableColumn ?

Something like this:

$query->field('c', Flux_Database_Query_Helper_TableColumn::TYPE_VARCHAR, 200);
$query->field('c', Flux_Database_Query_Helper_TableColumn::TYPE_INT, 10);

History

Franz 2011-11-02 08:58:47

  • Milestone set to 2.0-alpha1.
  • Owner set to Franz.

Franz 2011-11-08 13:02:43

Do we even need this, I wonder?

daris 2011-11-08 14:38:47

Look at the install.php of 1.4. Examples:

MEDIUMINT(8) UNSIGNED
TINYINT(1)
SMALLINT(6)
TINYINT(3) UNSIGNED

Franz 2011-11-08 21:43:58

The question is whether that is needed wink

On the other hand, we don't even have all these types yet, do we?

daris 2011-11-09 06:53:28

There is no MEDIUMINT, SMALLINT, TINYINT, MEDIUMTEXT.

So the length parameter is not necessary, but above types be implemented

daris 2011-11-09 11:33:48

above types should* be implemented

(why there isn't option to edit comment? tongue)

Franz 2011-11-15 10:36:29

It seems like the length only matters for displaying integers.

Length really only matters with VARCHAR and FLOAT/DECIMAL types, I was told in chat on #mysql.

(Not quite sure about the other DBMS.)

Franz 2011-11-15 10:44:21

Commit 677f46c to database master

Add some more column types.
Related to #526.

Franz 2011-11-15 10:45:13

I added some more column types in database/677f46c.

Franz 2011-11-15 10:47:23

Commit 3c0becb to database master

Remove UNSIGNED from new column types for PostgreSQL.
Related to #526.

Franz 2011-11-15 10:48:30

  • Status changed from open to fixed.

Ok, you don't need it, just remove the length from all types but VARCHAR.

Franz 2011-11-15 10:51:29

Commit ee5d974 to database master

Add MEDIUMTEXT column type.
Related to #526.