SQL Server IDENTITY support
Opened this issue · 3 comments
alextech commented
SqlServer\Ddl\CreatTableDecorator
does not know how to process $id->setOption('IDENTITY', '1, 1');
, equivalent to AUTO_INCREMENT from MySQL or SEQUENCE from PostgreSQL
alextech commented
Sorry, abused this as personal todo list:
public function testOptions() {
$ctd = new CreateTableDecorator();
$ct = new CreateTable('foo');
$ctd->setSubject($ct);
$col = new Column('id');
$col->setOption('IDENTITY', '1,1');
$ct->addColumn($col);
$this->assertEquals(
"CREATE TABLE [foo] ( \n [id] INTEGER NOT NULL IDENTITY(1, 1) \n)",
$ctd->getSqlString(new SqlServer())
);
}
Can paste to SqlServer\Ddl\CreateTableDecoratorTest
.
michalbundyra commented
This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#83.