From 0c29c0e0c4bad4852ca85363ca318d640a646393 Mon Sep 17 00:00:00 2001 From: Kris Date: Tue, 9 Feb 2021 22:37:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=20Make=20PolyLine=20Hash=20unique?= =?UTF-8?q?=20(#203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Make PolyLine Hash unique * Make PolyLine Hash unique --- ...01_000000_add_unique_key_to_poly_lines.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 database/migrations/2021_02_01_000000_add_unique_key_to_poly_lines.php diff --git a/database/migrations/2021_02_01_000000_add_unique_key_to_poly_lines.php b/database/migrations/2021_02_01_000000_add_unique_key_to_poly_lines.php new file mode 100644 index 000000000..778acab25 --- /dev/null +++ b/database/migrations/2021_02_01_000000_add_unique_key_to_poly_lines.php @@ -0,0 +1,21 @@ +unique(['hash']); + }); + } + + + public function down(): void { + Schema::table('poly_lines', function(Blueprint $table) { + $table->dropUnique(['hash']); + }); + } +}