Ruby-on-Rails Insert/uptade external program

Asked

Viewed 89 times

3

I’m studying a little Rails for a new project and a question has arisen that is:

When I give a db:migrate, Rails creates/alters the entire database structure - when necessary - based on the model. From what I could see, rake creates some validation and versioning fields of records.

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

1 answer

2


The db:migrate allows you to migrate between versions of the database structure and optionally make Seed (plant) some initial data. The included or modified data, via Rails or not, has no direct relation to it, except that they must 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).

So there is no problem with changes in the data coming from external services. The only restriction is that if someone changes the table structure (via Rails or not), the external services need to be updated to maintain compliance. The same is true for virtually any technology.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.