# rake uploads:migrate\_from\_s3 の実行ができません

**URL:** https://meta.discourse.org/t/cannot-execute-the-rake-uploads-migrate-from-s3/78541
**Category:** Bug
**Created:** [2018 年 1 月 20 日午後 3:38 UTC](https://meta.discourse.org/t/cannot-execute-the-rake-uploads-migrate-from-s3/78541 "2018-01-20T15:38:56Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018 年 1 月 24 日午後 12:23 UTC](https://meta.discourse.org/t/cannot-execute-the-rake-uploads-migrate-from-s3/78541/10 "2018-01-24T12:23:35Z")

</div>

I’ve fixed the rake task to ensure we delete existing records before creating new ones (since we index based on the sha1 of the files, we weren’t able to create new records with the same sha1)

[https://github.com/discourse/discourse/commit/cbf4204eccff62b6eac00932a04b827bff6cf883](https://github.com/discourse/discourse/commit/cbf4204eccff62b6eac00932a04b827bff6cf883)

---

_[View the full topic](https://meta.discourse.org/t/cannot-execute-the-rake-uploads-migrate-from-s3/78541)._
