Comments (8)
10th Dec 2009, Predominant said:
(Comment by: mensler)
Changes:
version:1.2.5
type:bug
title:No unsigned columns in test suite tables
from cakephp.
10th Dec 2009, Predominant said:
(Comment by: mark_story)
BIGINT() is not a supported integer length at this point in time. Only INT() is supported.
Moving to enhancement as this is a limitation of the underlying ORM.
Changes:
version:1.3-dev
type:enhancement
from cakephp.
30th Aug 2012, Mark Story said:
Bigint support will be part of 2.3.0
from cakephp.
30th Aug 2012, euromark said:
but does that solve the initial issue? with "unsigned" not being supported?
from cakephp.
30th Aug 2012, Mark Story said:
I guess not. I missed the unsigned part, and only saw the references to bigint's.
from cakephp.
30th Aug 2012, euromark said:
also, allowing unsigned columns outside of the test suite (in the app itself) would probably be outside the scope of this ticket but still quite interesting.
from cakephp.
1st Aug 2013, luke83 said:
In the diff file attached there are little changes to handle unsigned in Mysql DboSource.
Using this code schema console is able to handle unsigned fields in generate/create/update feature.
AllDatabase test cases pass with no failure.
This patch should fix #17, #2396 and #278
PS: Another solution (waiting core fix) to avoid core touching is to use this (inefficient) class as DataSource:
<?php
App::uses('Mysql', 'Model/Datasource/Database');
class iMysql extends Mysql {
public function describe($model) {
$fields = parent::describe($model);
$table = $this->fullTableName($model);
$cols = $this->_execute('SHOW FULL COLUMNS FROM ' . $table);
if (!$cols) {
throw new CakeException(__d('cake_dev', 'Could not describe table for %s', $table));
}
while ($column = $cols->fetch(PDO::FETCH_OBJ)) {
$fields[$column->Field]['unsigned'] = strpos($column->Type, 'unsigned') !== false;
}
return $fields;
}
protected function _buildFieldParameters($columnString, $columnData, $position) {
if ($position == 'beforeDefault' && isset($columnData['unsigned']) && $columnData['unsigned']) {
$columnString .= ' UNSIGNED';
}
return parent::_buildFieldParameters($columnString, $columnData, $position);
}
}
from cakephp.
I think that for schemas that are very database specific developers should use a different Fixture base class, there is no need for CakePHP to cover every mysql-ism when there are better options available for managing schemas like that. One example is this plugin https://github.com/lorenzo/cakephp-fixturize
from cakephp.
Related Issues (20)
- NotFoundException is using the error500 template instead of the error400 template. HOT 7
- DateTime microseconds make it null on save HOT 1
- ErrorController::beforeRender not called HOT 11
- Problem formatting milliseconds using i18nFormat HOT 3
- RulesChecker::remove() HOT 4
- FormProtector failing with csrfSessionMiddleware
- Component integration testing is broken with PHPUnit 10.5 and php 8.2
- Schema setColumnType silent no-op HOT 3
- Tests have wrong Connection aliases if testing with fixtures with different connection name HOT 5
- Still a small issue on ObjectRegistry load aliasing HOT 6
- Breaking change cakephp/database HOT 10
- Strpos result comparison HOT 3
- Feature: Enum validation - subset
- Double loading of plugin HOT 1
- Extending base validation fails. HOT 2
- FormHelper - input number doesn't work HOT 2
- Configuring Connection with Driver instance legacy but not deprecated HOT 3
- CakePHP 4 Custom Routing Issue with Paginator Links HOT 2
- Stricter Command arg/option API HOT 3
- Strange side effects of 5.0.7 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp.