增加索引

This commit is contained in:
2023-06-28 11:42:22 +08:00
parent b106f99c91
commit 6b5068ffd9

View File

@@ -34,9 +34,13 @@ class CreateTablePostVisit extends Migrator
$table->addColumn(ColumnFormat::timestamp('delete_time'));
$table->addColumn(ColumnFormat::integer('post_id'));
$table->addColumn(ColumnFormat::stringUrl('ip'));
$table->addColumn(ColumnFormat::stringNormal('nickname'));
$table->addColumn(ColumnFormat::stringNormal('uid'));
$table->addColumn(ColumnFormat::stringNormal('nickname'));
$table->addColumn(ColumnFormat::stringUrl('avatar'));
$table->addIndex('delete_time');
$table->addIndex('post_id');
$table->addIndex('ip');
$table->addIndex('uid');
$table->create();
}
}