Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function up(Schema $schema): void |
||
21 | { |
||
22 | // this up() migration is auto-generated, please modify it to your needs |
||
23 | $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); |
||
24 | |||
25 | $this->addSql('CREATE SEQUENCE user_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); |
||
26 | $this->addSql('CREATE TABLE "user" ( |
||
27 | id INT NOT NULL, |
||
28 | email VARCHAR(180) NOT NULL, |
||
29 | roles JSON NOT NULL, |
||
30 | password VARCHAR(255) NOT NULL, |
||
31 | PRIMARY KEY(id) |
||
32 | )'); |
||
33 | $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON "user" (email)'); |
||
34 | } |
||
45 |