File tree Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace DoctrineMigrations ;
6
+
7
+ use Doctrine \DBAL \Schema \Schema ;
8
+ use Doctrine \Migrations \AbstractMigration ;
9
+
10
+ /**
11
+ * Auto-generated Migration: Please modify to your needs!
12
+ */
13
+ final class Version20211207231148 extends AbstractMigration
14
+ {
15
+ public function getDescription () : string
16
+ {
17
+ return '' ;
18
+ }
19
+
20
+ public function up (Schema $ schema ) : void
21
+ {
22
+ // this up() migration is auto-generated, please modify it to your needs
23
+ $ this ->abortIf ($ this ->connection ->getDatabasePlatform ()->getName () !== 'mysql ' , 'Migration can only be executed safely on \'mysql \'. ' );
24
+
25
+ $ this ->addSql ('ALTER TABLE tokens CHANGE construction_year construction_year INT DEFAULT NULL ' );
26
+ }
27
+
28
+ public function down (Schema $ schema ) : void
29
+ {
30
+ // this down() migration is auto-generated, please modify it to your needs
31
+ $ this ->abortIf ($ this ->connection ->getDatabasePlatform ()->getName () !== 'mysql ' , 'Migration can only be executed safely on \'mysql \'. ' );
32
+
33
+ $ this ->addSql ('ALTER TABLE tokens CHANGE construction_year construction_year DATE DEFAULT NULL ' );
34
+ }
35
+ }
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ class Token
290
290
private $ seriesNumber ;
291
291
292
292
/**
293
- * @ORM\Column(type="date ", nullable=true)
293
+ * @ORM\Column(type="integer ", nullable=true)
294
294
*/
295
295
private $ constructionYear ;
296
296
@@ -1003,12 +1003,12 @@ public function setSeriesNumber(?int $seriesNumber): self
1003
1003
return $ this ;
1004
1004
}
1005
1005
1006
- public function getConstructionYear (): ?\ DateTimeInterface
1006
+ public function getConstructionYear (): ?int
1007
1007
{
1008
1008
return $ this ->constructionYear ;
1009
1009
}
1010
1010
1011
- public function setConstructionYear (?\ DateTimeInterface $ constructionYear ): self
1011
+ public function setConstructionYear (?int $ constructionYear ): self
1012
1012
{
1013
1013
$ this ->constructionYear = $ constructionYear ;
1014
1014
You can’t perform that action at this time.
0 commit comments