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:
@@ -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');
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user