1
0
mirror of https://github.com/flarum/core.git synced 2025-08-09 09:57:06 +02:00

Reduce length of slug field to prevent error when creating unique index

This commit is contained in:
Toby Zerner
2015-10-31 18:19:45 +10:30
parent c371fe764b
commit 2c94819144

View File

@@ -10,6 +10,7 @@ class MakeSlugUnique extends AbstractMigration
public function up()
{
$this->schema->table('tags', function (Blueprint $table) {
$table->string('slug', 100)->change();
$table->unique('slug');
});
}
@@ -17,6 +18,7 @@ class MakeSlugUnique extends AbstractMigration
public function down()
{
$this->schema->table('tags', function (Blueprint $table) {
$table->string('slug', 255)->change();
$table->dropUnique('tags_slug_unique');
});
}