Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinyint, smallint, mediumint cannot be autoincrement #14102

Closed
DestinyMKas opened this issue May 20, 2019 · 1 comment
Closed

tinyint, smallint, mediumint cannot be autoincrement #14102

DestinyMKas opened this issue May 20, 2019 · 1 comment
Labels
bug A bug report status: low Low

Comments

@DestinyMKas
Copy link
Contributor

I have mysql table where autoincrement column is smallint type.

CREATE TABLE `attribute` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `image` int(10) unsigned DEFAULT NULL,
  `sort` smallint(5) unsigned NOT NULL,
  `price` decimal(9,2) NOT NULL,
  `limit` tinyint(3) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
$attribute = Attribute::find();

throws an exception Column type cannot be auto-increment

https://github.com/phalcon/cphalcon/blob/master/phalcon/Db/Column.zep#L415

Details

phalcon => enabled
Author => Phalcon Team and contributors
Version => 4.0.0-alpha.3
Build Date => May 20 2019 19:19:33
Powered by Zephir => Version 0.11.11-b661a58

Linux => Fedora 30
Build from source

10.3.12-MariaDB-log - MariaDB Server

PHP 7.3.5 (cli) (built: Apr 30 2019 08:37:17) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.5, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans

@niden
Copy link
Member

niden commented May 20, 2019

Resolved in #14102

@niden niden closed this as completed May 20, 2019
@niden niden added the 4.0 label Jun 21, 2019
@niden niden added bug A bug report status: low Low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

No branches or pull requests

2 participants