Comments (13)
Questions:
- Does data.ChatRoom becomes chat_room or chatroom?
- Any other collections besides: data.ChatMessage, data.ChatRoom, data.ChatSubscription, and data.ChatTyping?
- Does the solution need to migrate existing data? Meteor doesn't support renaming or deleting a collection as far as I know. Any suggestions?
from rocket.chat.
I was thinking in to use a prefic like "rocket" for collection names. should be one of these:
- rocket.chatRoom, rocket.chatMessage, rocket.chatSubscription, ...
- rocketRoom, rocketMessage, rocketSubscription, ...
I think using a prefix is the best for an existing database with other collections.
What do you others think?
from rocket.chat.
I think we should either lose the prefix all together.. and use
- rooms
- messages
- subscriptions
or
- rocketchat_rooms
- rocketchat_messages
- rocketchat_subscriptions
from rocket.chat.
As an outsider learning the system, the prefix helps to differentiate Rocket.Chat's collections from non-Rocket.Chat collections. I like rocketchat_rooms format.
What about existing data migration?
from rocket.chat.
I agree with @rwakida.
About the data migration we already use one lib to do migrations, you can see here (https://github.com/RocketChat/Rocket.Chat/tree/master/server/startup/migrations)
from rocket.chat.
Thanks @rodrigok. I saw the migrations, but I think this is a special case. Meteor (from what I know) doesn't support Mongo's renameCollection or drop collection. So we either have to:
- Instruct the user to manually run renameCollection from the shell before starting meteor.
or - Rename the collections in collections.coffee. Create a migration that accesses the old collections and migrates the data to the new collections.
The first option is clean, but requires user intervention. The second option is user-friendly, but leaves the old collections and the user has to manually drop the old collections.
A Google search suggested using a Node package that provides shell access, but only works when NOT using the embedded MongoDB.
I'm relatively new to Meteor so please excuse me if I missed something.
from rocket.chat.
@rodrigok but using meteor could be painful since you can't rename collections
from rocket.chat.
IMHO, there is no problem in create the new collections, migrate de data from old collections, remove old data and keep this collections empty.
We don't have a stable version yet, this seems to be a very small problem.
from rocket.chat.
I have merged this PR, but I think we should also change the names of "settings" and "migrations" collections. Also, rename "userSessions" to "user_sessions".
from rocket.chat.
Hi @marceloschmidt. Sorry, I missed those collections. I noticed you added the "in Progress" label. Does that mean you're taking over and renaming the settings, migrations, and userSessions collections?
from rocket.chat.
Thanks for the work @rwakida, you did a great job. @marceloschmidt just labeled as in progress so we know that is half done. Having said, I am not sure you'd have access to control the name of all those collection from our repository. Some are 3rd party packages, other are made by us, but in other repositories... you can give it a try and let us know.
from rocket.chat.
Thanks and great job on Rocket.Chat!
@engelgabriel @marceloschmidt I did a quick search and found that settings and oembed_cache are under Rocket.Chat control. I added both to the v9 migration and created a new pull request.
from rocket.chat.
Thank you very much @rwakida
from rocket.chat.
Related Issues (20)
- Kicked users still can access the messages and message on the channel. HOT 1
- Cannot change settings, password required, but no accounts have a password (oauth) HOT 2
- Refreshing the page is changing the language back and not respecting the User Preference HOT 2
- rocket chat HOT 1
- Picture with Whitesapce as Name Doesn't Load HOT 10
- Jumping on chat screen insteaed of only referenceed reply, it is happening with every message HOT 3
- Notify on reaction to a message HOT 2
- Exploding .wt collection file HOT 5
- Snap Versions 6.3-6.7 Include Wrong Version of NodeJS. 6.7 Keeps crashing. HOT 1
- Emails not queued and ignored when sending limit reached HOT 2
- Missing Authentication in iOS Push Notification API Request HOT 1
- Slack Bridge (via Slack App) not working but Legacy API works in one way (from RocketChat to Slack) HOT 1
- Channels unread messages don't always get marked as read when entered (counter remains) HOT 2
- yarn dev ERROR HOT 1
- 6.7 File Upload->Allowed Media Types (blank) does not allow to remove the restriction HOT 3
- Registration Bug HOT 6
- Scrollbars are impossible to see HOT 8
- No audio notifications HOT 1
- Check internet connection error HOT 1
- Right click on a message to access options on the right under 3 doted menu items like, Star, edit/delete message or Quote & reaction etc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket.chat.