From 63670dc24e154f7fab17e1ebe2e01aa8b29834b2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 12 Aug 2019 03:00:01 -0600 Subject: [PATCH] Add new migration --- ...12_074612_add_unique_to_statuses_table.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 database/migrations/2019_08_12_074612_add_unique_to_statuses_table.php diff --git a/database/migrations/2019_08_12_074612_add_unique_to_statuses_table.php b/database/migrations/2019_08_12_074612_add_unique_to_statuses_table.php new file mode 100644 index 00000000..8d47e6d4 --- /dev/null +++ b/database/migrations/2019_08_12_074612_add_unique_to_statuses_table.php @@ -0,0 +1,37 @@ +getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + } + + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('statuses', function (Blueprint $table) { + $table->string('uri')->nullable()->unique()->index()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('statuses', function (Blueprint $table) { + $table->string('uri')->nullable()->change(); + }); + } +}