mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-05 19:07:30 -08:00
Merge pull request #15840 from marcusmoore/fixes/migration-rollbacks
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Fixed a couple migrate:rollback issues
This commit is contained in:
commit
d60ac0c78d
|
@ -26,7 +26,7 @@ class ChangeWebhookSettingsVariableType extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('settings', function (Blueprint $table) {
|
Schema::table('settings', function (Blueprint $table) {
|
||||||
$table->varchar('webhook_endpoint')->change();
|
$table->string('webhook_endpoint')->change();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ return new class extends Migration
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->existing_table_list() as $table) {
|
foreach ($this->existing_table_list() as $table) {
|
||||||
if (Schema::hasColumn($table, 'user_id')) {
|
if (Schema::hasColumn($table, 'created_by')) {
|
||||||
Schema::table($table, function (Blueprint $table) {
|
Schema::table($table, function (Blueprint $table) {
|
||||||
$table->renameColumn('created_by', 'user_id');
|
$table->renameColumn('created_by', 'user_id');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue