Code Duplication    Length = 24-24 lines in 2 locations

src/database/migrations/2020_05_18_000000_update_schema_0_53_0_to_0_54_0.php 1 location

@@ 9-32 (lines=24) @@
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Support\Facades\Schema;
8
9
class UpdateSchema0530To0540 extends Migration
10
{
11
    public function up(): void
12
    {
13
        try {
14
            Schema::table('message', static function (Blueprint $table) {
15
                $table->text('game')->nullable()->comment('Message is a game, information about the game.')->after('document');
16
            });
17
        } catch (Exception $e) {
18
            // Migration may be partly done already...
19
        }
20
    }
21
22
    public function down(): void
23
    {
24
        try {
25
            Schema::table('message', static function (Blueprint $table) {
26
                $table->dropColumn('game');
27
            });
28
        } catch (Exception $e) {
29
            // Migration may be partly done already...
30
        }
31
    }
32
}
33

src/database/migrations/2020_05_18_000000_update_schema_0_57_0_to_0_58_0.php 1 location

@@ 9-32 (lines=24) @@
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Support\Facades\Schema;
8
9
class UpdateSchema0570To0580 extends Migration
10
{
11
    public function up(): void
12
    {
13
        try {
14
            Schema::table('message', static function (Blueprint $table) {
15
                $table->text('reply_markup')->nullable()->comment('Inline keyboard attached to the message')->after('passport_data');
16
            });
17
        } catch (Exception $e) {
18
            // Migration may be partly done already...
19
        }
20
    }
21
22
    public function down(): void
23
    {
24
        try {
25
            Schema::table('message', static function (Blueprint $table) {
26
                $table->dropColumn('reply_markup');
27
            });
28
        } catch (Exception $e) {
29
            // Migration may be partly done already...
30
        }
31
    }
32
}
33