Try a nth fix

This commit is contained in:
Bubka
2022-04-04 15:46:18 +02:00
parent d40bcad1fe
commit ad5f493c3c
3 changed files with 50 additions and 51 deletions

View File

@ -27,10 +27,6 @@ class SplitTwofaccountsUriInMultipleColumns extends Migration
$table->unsignedInteger('period')->nullable();
$table->unsignedBigInteger('counter')->nullable();
});
Schema::table('twofaccounts', function (Blueprint $table) {
$table->renameColumn('uri', 'legacy_uri');
});
}
/**
@ -63,9 +59,5 @@ class SplitTwofaccountsUriInMultipleColumns extends Migration
Schema::table('twofaccounts', function (Blueprint $table) {
$table->dropColumn('counter');
});
Schema::table('twofaccounts', function (Blueprint $table) {
$table->renameColumn('legacy_uri', 'uri');
});
}
}

View File

@ -16,8 +16,13 @@ class ChangeAccountNotNullableTwofaccountsTable extends Migration
*/
public function up()
{
$driver = Schema::connection($this->getConnection())->getConnection()->getDriverName();
Schema::table('twofaccounts', function (Blueprint $table) {
$table->renameColumn('uri', 'legacy_uri');
});
Schema::table('twofaccounts', function (Blueprint $table) {
$table->text('account')->nullable(false)->change();
$table->string('service')->nullable()->change();
@ -73,6 +78,8 @@ class ChangeAccountNotNullableTwofaccountsTable extends Migration
*/
public function down()
{
//
Schema::table('twofaccounts', function (Blueprint $table) {
$table->renameColumn('legacy_uri', 'uri');
});
}
}