Sync/StorageManager/MysqlStorageManager.php
protected function buildTable(Table $table)
    {
        $table->addColumn('id', 'bigint')
            ->setUnsigned(true)
            ->setAutoincrement(true);

        $table->addColumn('type', 'string')
            ->setLength(1)
            ->setComment('C-CREATE(INSERT),U-UPDATE,D-DELETE');

        $table->addColumn('document_type', 'string')
            ->setLength(32);

        $table->addColumn('document_id', 'string')
            ->setLength(32);

        $table->addColumn('timestamp', 'datetime');

        $table->addColumn('status', 'boolean', ['default' => self::STATUS_NEW])
            ->setComment('0-new,1-inProgress,2-error');

        $table->setPrimaryKey(['id']);
        $table->addUniqueIndex(['type', 'document_type', 'document_id', 'status']);
    }
protected function buildTable(Table $table)
    {
        $table->addColumn('id', 'bigint')
            ->setUnsigned(true)
            ->setAutoincrement(true);

        $table->addColumn('type', 'string')
            ->setLength(1)
            ->setComment('C-CREATE(INSERT),U-UPDATE,D-DELETE');

        $table->addColumn('document_type', 'string')
            ->setLength(32);

        $table->addColumn('document_id', 'string')
            ->setLength(32);

        $table->addColumn('timestamp', 'datetime');

        $table->addColumn('status', 'boolean', ['default' => self::STATUS_NEW])
            ->setComment('0-new,1-inProgress,2-error');

        $table->setPrimaryKey(['id']);
        $table->addUniqueIndex(['type', 'document_type', 'document_id', 'status']);
    }
protected function buildTable ( Table $ table ) { $ table -> addColumn ( 'id' , 'bigint' ) -> setUnsigned ( true ) -> setAutoincrement ( true ) ; $ table -> addColumn ( 'type' , 'string' ) -> setLength ( 1 ) -> setComment ( 'C-CREATE(INSERT),U-UPDATE,D-DELETE' ) ; $ table -> addColumn ( 'document_type' , 'string' ) -> setLength ( 32 ) ; $ table -> addColumn ( 'document_id' , 'string' ) -> setLength ( 32 ) ; $ table -> addColumn ( 'timestamp' , 'datetime' ) ; $ table -> addColumn ( 'status' , 'boolean' , [ 'default' => self :: STATUS_NEW ] ) -> setComment ( '0-new,1-inProgress,2-error' ) ; $ table -> setPrimaryKey ( [ 'id' ] ) ; $ table -> addUniqueIndex ( [ 'type' , 'document_type' , 'document_id' , 'status' ] ) ; }
Builds table structure.

@param Table $table
Builds table structure .