Xpressengine\DynamicField\AbstractType::createFieldRevision PHP Method

createFieldRevision() private method

Dynamic Field 생성 시 alter table 로 revision table 처리 이 기능은 관리자에서 지원하지 않음 테이블 수정 시 발생항할 수있는 문제가 있기 때문에 기능만 제공 이 기능을 사용하면서 방생하는 문제는 사용자 책임
private createFieldRevision ( ) : void
return void
    private function createFieldRevision()
    {
        if ($this->config->get('revision') == true) {
            $self = $this;
            $schema = $this->handler->connection()->getSchemaBuilder();
            $tableName = $this->handler->getConfigHandler()->getRevisionTableName($this->config);
            if ($schema->hasTable($tableName) === false) {
                throw new Exceptions\NotExistRevisionTableException();
            }
            foreach ($self->getColumns() as $column) {
                if ($schema->hasColumn($tableName, $column->name) === true) {
                    throw new Exceptions\AlreadyExistColumnException();
                }
            }
            $this->handler->connection()->getSchemaBuilder()->table($tableName, function (Blueprint $table) use($self) {
                /**
                 * @var ColumnEntity $column
                 */
                foreach ($self->getColumns() as $column) {
                    $column->add($table, $self->config->get('id') . '_');
                }
            });
        }
    }