Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Doctrine\DBAL\Id;
4
 
5
use Doctrine\DBAL\Schema\Column;
6
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
7
use Doctrine\DBAL\Schema\Index;
8
use Doctrine\DBAL\Schema\Schema;
9
use Doctrine\DBAL\Schema\Sequence;
10
use Doctrine\DBAL\Schema\Table;
11
use Doctrine\DBAL\Schema\Visitor\Visitor;
12
use Doctrine\Deprecations\Deprecation;
13
 
14
/** @deprecated */
15
class TableGeneratorSchemaVisitor implements Visitor
16
{
17
    /** @var string */
18
    private $generatorTableName;
19
 
20
    /** @param string $generatorTableName */
21
    public function __construct($generatorTableName = 'sequences')
22
    {
23
        Deprecation::trigger(
24
            'doctrine/dbal',
25
            'https://github.com/doctrine/dbal/pull/4681',
26
            'The TableGeneratorSchemaVisitor class is is deprecated.',
27
        );
28
 
29
        $this->generatorTableName = $generatorTableName;
30
    }
31
 
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function acceptSchema(Schema $schema)
36
    {
37
        $table = $schema->createTable($this->generatorTableName);
38
        $table->addColumn('sequence_name', 'string');
39
        $table->addColumn('sequence_value', 'integer', ['default' => 1]);
40
        $table->addColumn('sequence_increment_by', 'integer', ['default' => 1]);
41
    }
42
 
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function acceptTable(Table $table)
47
    {
48
    }
49
 
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function acceptColumn(Table $table, Column $column)
54
    {
55
    }
56
 
57
    /**
58
     * {@inheritdoc}
59
     */
60
    public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint)
61
    {
62
    }
63
 
64
    /**
65
     * {@inheritdoc}
66
     */
67
    public function acceptIndex(Table $table, Index $index)
68
    {
69
    }
70
 
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function acceptSequence(Sequence $sequence)
75
    {
76
    }
77
}