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 000000000..8d47e6d4f --- /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(); + }); + } +}