rename a collection

538 views
Skip to first unread message

Karl Cassar

unread,
Apr 23, 2013, 1:40:29 PM4/23/13
to rav...@googlegroups.com
Is it possible to rename a collection, from example Product to Products?

Regards,
Karl


Mircea Chirea

unread,
Apr 23, 2013, 2:44:47 PM4/23/13
to rav...@googlegroups.com
Yes, run this patch script on the "Product" collection:

this['@metadata']['Raven-Entity-Name'] = "Products";

Karl Cassar

unread,
Apr 23, 2013, 3:07:18 PM4/23/13
to rav...@googlegroups.com
Thanks for this!

And is there any way to rename an existing database?

Regards,
Karl

Kijana Woodard

unread,
Apr 23, 2013, 5:30:59 PM4/23/13
to rav...@googlegroups.com
Export data, create new database with new name, import data. ;-)

Oren Eini (Ayende Rahien)

unread,
Apr 24, 2013, 1:24:59 AM4/24/13
to ravendb
Yes, go the system db.
Edit the Raven/Datbaases/dbname document
Change the name to Raven/Databases/newname
Save
Then delete the old doc.


--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Karl Cassar

unread,
Apr 24, 2013, 4:43:58 AM4/24/13
to rav...@googlegroups.com
Great, works perfect- thanks!

Regards,
Karl
Reply all
Reply to author
Forward
0 new messages