From f96b22e0f3a4113aa3cfdf347d6a3864b4e4c335 Mon Sep 17 00:00:00 2001 From: joachim <121795812+faltjo@users.noreply.github.com> Date: Sat, 4 May 2024 15:50:12 +0200 Subject: [PATCH] change datatype so unpadded datatypes are used in db (#173) Background: postgres pads those columns with spaces, which are not removed when queries, leading to broken redirects. Mysql also pads this datatype, but removes the spaces by default when queried. --- database/migrations/create_redirect_redirects_table.php.stub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/migrations/create_redirect_redirects_table.php.stub b/database/migrations/create_redirect_redirects_table.php.stub index addd339..8ae8be1 100644 --- a/database/migrations/create_redirect_redirects_table.php.stub +++ b/database/migrations/create_redirect_redirects_table.php.stub @@ -12,8 +12,8 @@ class CreateRedirectRedirectsTable extends Migration $table->uuid('id')->unique()->index(); $table->string('source')->index(); $table->string('destination'); - $table->char('match_type', 10); - $table->char('type', 10); + $table->string('match_type', 10); + $table->string('type', 10); $table->string('site')->index(); $table->integer('order')->nullable(); $table->boolean('enabled');