+++ /dev/null
-#!ruby
-# vim: fileencoding=utf-8 :
-location = Location.find_or_initialize_by_id(1)
-location.update_attributes(:code => "mmd", :site => "http://bytatsu.net/uploader/mikumikudance/", :summary => "MMD専用アップローダ")
-
-location = Location.find_or_initialize_by_id(2)
-location.update_attributes(:code => "mmdfile", :site => "http://loda.jp/mmdfile/", :summary => "MMDデータ保管庫")
-
-location = Location.find_or_initialize_by_id(3)
-location.update_attributes(:code => "mmdacc1", :site => "http://www9.atpages.jp/~mmdaccessory/uploader/", :summary => "MMDアクセサリアップローダ(小物版)")
-
-location = Location.find_or_initialize_by_id(4)
-location.update_attributes(:code => "mmdacc2", :site => "http://www9.atpages.jp/~mmdaccessory/uploader2/", :summary => "MMD Accessory Uploader")
--- /dev/null
+#!ruby
+# vim: fileencoding=utf-8 :
+site = Site.find('mmd') || Site.new(:key => 'mmd')
+site.update_attributes(:url => "http://bytatsu.net/uploader/mikumikudance/", :summary => "MMD専用アップローダ")
+
+site = Site.find('mmdfile') || Site.new(:key => 'mmdfile')
+site.update_attributes(:url => "http://loda.jp/mmdfile/", :summary => "MMDデータ保管庫")
+
+site = Site.find('mmdarc1') || Site.new(:key => 'mmdarc1')
+site.update_attributes(:url => "http://www9.atpages.jp/~mmdaccessory/uploader/", :summary => "MMDアクセサリアップローダ(小物版)")
+
+site = Site.find('mmdarc2') || Site.new(:key => 'mmdarc2')
+site.update_attributes(:url => "http://www9.atpages.jp/~mmdaccessory/uploader2/", :summary => "MMD Accessory Uploader")