feat: delete
This commit is contained in:
@@ -12,13 +12,13 @@ return new class extends Migration
|
||||
return;
|
||||
}
|
||||
|
||||
$type = Schema::getColumnType('plugin_sessions', 'kind');
|
||||
if (in_array($type, ['integer', 'tinyinteger', 'smallinteger', 'bigint'], true)) {
|
||||
$type = strtolower((string) Schema::getColumnType('plugin_sessions', 'kind'));
|
||||
if (in_array($type, ['integer', 'tinyint', 'tinyinteger', 'smallint', 'smallinteger', 'bigint'], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
DB::table('plugin_sessions')->where('kind', 'telegram')->update(['kind' => '1']);
|
||||
DB::table('plugin_sessions')->where('kind', 'whatsapp')->update(['kind' => '2']);
|
||||
DB::table('plugin_sessions')->where('kind', 'telegram')->update(['kind' => 1]);
|
||||
DB::table('plugin_sessions')->where('kind', 'whatsapp')->update(['kind' => 2]);
|
||||
|
||||
$driver = Schema::getConnection()->getDriverName();
|
||||
if ($driver === 'mysql') {
|
||||
|
||||
Reference in New Issue
Block a user