public function testGetColumnDDLComment() { $column = new Column('foo'); $column->getDomain()->copy($this->getPlatform()->getDomainForType('INTEGER')); $column->setDescription('This is column Foo'); $expected = '`foo` INTEGER COMMENT \'This is column Foo\''; $this->assertEquals($expected, $this->getPlatform()->getColumnDDL($column)); }
public function testSetDescription() { $column = new Column(); $column->setDescription('Some description'); $this->assertSame('Some description', $column->getDescription()); }
$column11->setAutoIncrement(); $column11->setNotNull(); $column11->setPrimaryKey(); $column12 = new Column('author_id', 'smallint', 3); $column12->setNotNull(); $column13 = new Column('category_id', 'tinyint', 2); $column13->setNotNull(); $column14 = new Column('title', 'varchar', 100); $column14->setNotNull(); $column15 = new Column('body', 'clob'); $column16 = new Column('average_rating', 'float', 2); $column16->setScale(2); $column16->setDescription('The post rating in percentage'); $column17 = new Column('price_without_decimal_places', 'DECIMAL', 10); $column17->setScale(0); $column17->setDescription('The Price without decimal places'); $column21 = new Column('id', 'smallint', 3); $column21->setAutoIncrement(); $column21->setNotNull(); $column21->setPrimaryKey(); $column22 = new Column('username', 'varchar', 15); $column22->setNotNull(); $column23 = new Column('password', 'varchar', 40); $column23->setNotNull(); $column31 = new Column('id', 'tinyint', 2); $column31->setAutoIncrement(); $column31->setNotNull(); $column31->setPrimaryKey(); $column32 = new Column('name', 'varchar', 40); $column32->setNotNull(); $column41 = new Column('id', 'integer', 7);
use Propel\Generator\Platform\MysqlPlatform; /* Columns */ $column11 = new Column('id', 'integer', 7); $column11->setAutoIncrement(); $column11->setNotNull(); $column11->setPrimaryKey(); $column12 = new Column('author_id', 'smallint', 3); $column12->setNotNull(); $column13 = new Column('category_id', 'tinyint', 2); $column13->setNotNull(); $column14 = new Column('title', 'varchar', 100); $column14->setNotNull(); $column15 = new Column('body', 'clob'); $column16 = new Column('average_rating', 'float', 2); $column16->setScale(2); $column16->setDescription('The post rating in percentage'); $column21 = new Column('id', 'smallint', 3); $column21->setAutoIncrement(); $column21->setNotNull(); $column21->setPrimaryKey(); $column22 = new Column('username', 'varchar', 15); $column22->setNotNull(); $column23 = new Column('password', 'varchar', 40); $column23->setNotNull(); $column31 = new Column('id', 'tinyint', 2); $column31->setAutoIncrement(); $column31->setNotNull(); $column31->setPrimaryKey(); $column32 = new Column('name', 'varchar', 40); $column32->setNotNull(); $column41 = new Column('id', 'integer', 7);