Skip to content

Commit

Permalink
TASK: Set for the _contentstream table the id as primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Oct 17, 2024
1 parent a18801b commit 29e8c48
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,16 @@ private function createWorkspaceTable(): Table

private function createContentStreamTable(): Table
{
return self::createTable($this->tableNames->contentStream(), [
$contentStreamTable = self::createTable($this->tableNames->contentStream(), [
DbalSchemaFactory::columnForContentStreamId('id')->setNotnull(true),
(new Column('version', Type::getType(Types::INTEGER)))->setNotnull(true),
DbalSchemaFactory::columnForContentStreamId('sourceContentStreamId')->setNotnull(false),
// Should become a DB ENUM (unclear how to configure with DBAL) or int (latter needs adaption to code)
(new Column('status', Type::getType(Types::BINARY)))->setLength(20)->setNotnull(true),
(new Column('removed', Type::getType(Types::BOOLEAN)))->setDefault(false)->setNotnull(false)
]);

return $contentStreamTable->setPrimaryKey(['id']);
}

/**
Expand Down

0 comments on commit 29e8c48

Please sign in to comment.