Ruby-on-rails insert / uptade external program

3

I'm studying a bit of Rails for a new project and a question arose that is:

When I give db:migrate , Rails creates / changes the entire database structure - when needed - based on the template. From what I've seen, rake creates some validation and versioning fields for the records.

My question is: can I have any Rails parallel service / program inserting or changing database information that my application controls without compromising integrity?

    
asked by anonymous 15.04.2014 / 19:31

1 answer

2

db:migrate allows you to migrate between database structure versions and optionally seed (plant) some initial data. The data included or changed , via rails or not, does not have a direct relationship to it, except that they need to respect the table structure.

Although your question is not about this, just to clarify, it is not recommended to use this routine to load data between system versions ( source ).

Therefore, there is no problem in making changes to the base data coming from external services. The only restriction is that if someone changes the table structure (via rails or not), external services need to be updated to maintain compliance. The same goes for just about any technology.

    
15.04.2014 / 19:42