<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hokaccha</author_name>
  <author_url>https://blog.hatena.ne.jp/hokaccha/</author_url>
  <blog_title>hokaccha memo</blog_title>
  <blog_url>https://hokaccha.hatenablog.com/</blog_url>
  <categories>
    <anon>Node.js</anon>
    <anon>mongodb</anon>
  </categories>
  <description>uniqueなフィールドの名前変更したり、そのフィールド削除したりすると、Mongo側にuniqueなindexが張られてたのは残るので、saveしようとすると、 E11000 duplicate key error index: mydb.myCollection.$field_1 dup key: { : null }みたいな感じでエラる。index消せばいいけど、毎回手でやるの面倒。いい方法ないかな。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhokaccha.hatenablog.com%2Fentry%2F20110712%2F1310437051&quot; title=&quot;mongooseでuniqueにしたフィールドを変更するときに注意すること - hokaccha memo&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-07-12 11:17:31</published>
  <title>mongooseでuniqueにしたフィールドを変更するときに注意すること</title>
  <type>rich</type>
  <url>https://hokaccha.hatenablog.com/entry/20110712/1310437051</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
