mirror of
https://github.com/flarum/core.git
synced 2025-08-13 11:54:32 +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()
|
public function up()
|
||||||
{
|
{
|
||||||
$this->schema->table('tags', function (Blueprint $table) {
|
$this->schema->table('tags', function (Blueprint $table) {
|
||||||
|
$table->string('slug', 100)->change();
|
||||||
$table->unique('slug');
|
$table->unique('slug');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -17,6 +18,7 @@ class MakeSlugUnique extends AbstractMigration
|
|||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
$this->schema->table('tags', function (Blueprint $table) {
|
$this->schema->table('tags', function (Blueprint $table) {
|
||||||
|
$table->string('slug', 255)->change();
|
||||||
$table->dropUnique('tags_slug_unique');
|
$table->dropUnique('tags_slug_unique');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user