From 4e60adc875649c7311a6997e81940f70d79d5ad9 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 20 Feb 2016 15:59:04 -0500 Subject: [PATCH] Make file field unique --- ..._02_20_155318_add_unique_service_field.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 database/migrations/2016_02_20_155318_add_unique_service_field.php diff --git a/database/migrations/2016_02_20_155318_add_unique_service_field.php b/database/migrations/2016_02_20_155318_add_unique_service_field.php new file mode 100644 index 000000000..798ac4ba9 --- /dev/null +++ b/database/migrations/2016_02_20_155318_add_unique_service_field.php @@ -0,0 +1,31 @@ +string('file')->unique()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('services', function (Blueprint $table) { + $table->dropUnique('services_file_unique'); + }); + } +}