-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
M1Screw
committed
Aug 11, 2023
1 parent
77e759c
commit f2f7f95
Showing
24 changed files
with
516 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use App\Interfaces\MigrationInterface; | ||
use App\Services\DB; | ||
|
||
return new class() implements MigrationInterface { | ||
public function up(): int | ||
{ | ||
DB::getPdo()->exec(" | ||
ALTER TABLE user MODIFY COLUMN `im_type` smallint(6) unsigned NOT NULL DEFAULT 0 COMMENT '联系方式类型'; | ||
UPDATE user SET `im_value` = `telegram_id` WHERE `im_type` = 4; | ||
UPDATE user SET `im_value` = '' WHERE `im_value` = '0'; | ||
"); | ||
|
||
return 2023080900; | ||
} | ||
|
||
public function down(): int | ||
{ | ||
DB::getPdo()->exec(" | ||
ALTER TABLE user MODIFY COLUMN `im_type` smallint(6) unsigned NOT NULL DEFAULT 1 COMMENT '联系方式类型'; | ||
"); | ||
|
||
return 2023072000; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.