4 ms·
Agreed. PostgreSQL: ALTER TABLE posts RENAME COLUMN author TO writer; MongoDB: db.posts.update({}, {$rename:{"author":"writer"}}, false, true); (I'
by integraton 13y ago
Agreed.
PostgreSQL:
ALTER TABLE posts RENAME COLUMN author TO writer;
MongoDB:
db.posts.update({}, {$rename:{"author":"writer"}}, false, true);
(I'm excluding RethinkDB since it's still under development and doesn't have a rename command yet)
- orthecreedence 13y agoI don't think it really needs a `rename` command. The query language supports it without: r.table('posts').replace(function(item) { return item.without('author').merge({writer: item('name')}); })
- coffeemug 13y agoThat works, but it is a bit annoying to type. We'll add a porcelain command for this soon. See https://github.com/rethinkdb/rethinkdb/issues/881 https://github.com/rethinkdb/rethinkdb/issues/881.