2
私はsymfony 1.4プロジェクトを持っており、マイグレーションによって新しいカラムを追加しています。 schema.yml
の新しい列は次のようになります。symfony Doctrineマイグレーションブール型カラムとフィールド長を追加する
has_private_data: { type: boolean, notnull: true, default: false }
このように生成されたルックスを取得し、マイグレーション:それはこのブール値フィールドの長さが25
に設定されているのはなぜ
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Version26 extends Doctrine_Migration_Base
{
public function up()
{
$this->addColumn('device', 'has_private_data', 'boolean', '25', array(
'notnull' => '1',
'default' => '0',
));
$this->addColumn('device_history', 'has_private_data', 'boolean', '25', array(
'notnull' => '1',
'default' => '0',
));
}
public function down()
{
$this->removeColumn('device', 'has_private_data');
$this->removeColumn('device_history', 'has_private_data');
}
}
? (私のバックエンドデータベースはMySqlです)
お返事ありがとうございます。私が見ていた振る舞いがDoctrineのバグなのか、それとも期待されるものなのか、あなたは知っていますか? – rlandster