TableGeneratorSchemaVisitor.php
43 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Doctrine\DBAL\Id; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Doctrine\DBAL\Schema\Column; |
| 5 | use MailPoetVendor\Doctrine\DBAL\Schema\ForeignKeyConstraint; |
| 6 | use MailPoetVendor\Doctrine\DBAL\Schema\Index; |
| 7 | use MailPoetVendor\Doctrine\DBAL\Schema\Schema; |
| 8 | use MailPoetVendor\Doctrine\DBAL\Schema\Sequence; |
| 9 | use MailPoetVendor\Doctrine\DBAL\Schema\Table; |
| 10 | use MailPoetVendor\Doctrine\DBAL\Schema\Visitor\Visitor; |
| 11 | use MailPoetVendor\Doctrine\Deprecations\Deprecation; |
| 12 | class TableGeneratorSchemaVisitor implements Visitor |
| 13 | { |
| 14 | private $generatorTableName; |
| 15 | public function __construct($generatorTableName = 'sequences') |
| 16 | { |
| 17 | Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/4681', 'The TableGeneratorSchemaVisitor class is is deprecated.'); |
| 18 | $this->generatorTableName = $generatorTableName; |
| 19 | } |
| 20 | public function acceptSchema(Schema $schema) |
| 21 | { |
| 22 | $table = $schema->createTable($this->generatorTableName); |
| 23 | $table->addColumn('sequence_name', 'string'); |
| 24 | $table->addColumn('sequence_value', 'integer', ['default' => 1]); |
| 25 | $table->addColumn('sequence_increment_by', 'integer', ['default' => 1]); |
| 26 | } |
| 27 | public function acceptTable(Table $table) |
| 28 | { |
| 29 | } |
| 30 | public function acceptColumn(Table $table, Column $column) |
| 31 | { |
| 32 | } |
| 33 | public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) |
| 34 | { |
| 35 | } |
| 36 | public function acceptIndex(Table $table, Index $index) |
| 37 | { |
| 38 | } |
| 39 | public function acceptSequence(Sequence $sequence) |
| 40 | { |
| 41 | } |
| 42 | } |
| 43 |