# 需要数据的插件安装后无法启动

**URL:** <https://meta.discourse.org/t/installing-plugins-that-require-data-fail-to-start/99066>\
**Category:** Development\
**Created:** [2018年十月9日 04:06 UTC](https://meta.discourse.org/t/installing-plugins-that-require-data-fail-to-start/99066 "2018-10-09T04:06:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eatcodetravel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eatcodetravel/32/94385_2.png) [@eatcodetravel](https://meta.discourse.org/u/eatcodetravel)\
**Post date:** [2018年十月9日 04:06 UTC](https://meta.discourse.org/t/installing-plugins-that-require-data-fail-to-start/99066/1 "2018-10-09T04:06:30Z")

</div>

Hello,

I have a plugin that requires data to be present to work.

```yml
plugins:
  debtcollective_solidarity_message_author:
    client: false
    default: "system"
    type: "username"

```

I’m installing this in the `after_code` hook install, but that hook is run before the migration is done, and `rake db:migrate` fails to start because of the plugin `username` validation

In this case, what hook should be used?

Thanks
