From 1c9c6f27037842fdceece9621ab3c8a0da3ca680 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Mon, 4 Apr 2022 16:04:13 +0200 Subject: [PATCH] Split migration into two to prevent sqlite issue --- ...r_encrypted_columns_to_text_for_sqlite.php | 1 - ...crypted_columns_to_text_for_sqlite_bis.php | 37 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2020_12_04_073606_alter_encrypted_columns_to_text_for_sqlite_bis.php diff --git a/database/migrations/2020_12_04_073605_alter_encrypted_columns_to_text_for_sqlite.php b/database/migrations/2020_12_04_073605_alter_encrypted_columns_to_text_for_sqlite.php index 10be2de1..ed874574 100644 --- a/database/migrations/2020_12_04_073605_alter_encrypted_columns_to_text_for_sqlite.php +++ b/database/migrations/2020_12_04_073605_alter_encrypted_columns_to_text_for_sqlite.php @@ -19,7 +19,6 @@ public function up() Schema::table('twofaccounts', function (Blueprint $table) { $table->text('account')->change(); - $table->text('uri')->change(); }); } } diff --git a/database/migrations/2020_12_04_073606_alter_encrypted_columns_to_text_for_sqlite_bis.php b/database/migrations/2020_12_04_073606_alter_encrypted_columns_to_text_for_sqlite_bis.php new file mode 100644 index 00000000..f5e54a60 --- /dev/null +++ b/database/migrations/2020_12_04_073606_alter_encrypted_columns_to_text_for_sqlite_bis.php @@ -0,0 +1,37 @@ +getConnection())->getConnection()->getDriverName(); + + if ('sqlite' === $driver) { + + Schema::table('twofaccounts', function (Blueprint $table) { + $table->text('uri')->change(); + }); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('twofaccounts', function (Blueprint $table) { + // + }); + } +}