Open kneth opened 8 years ago
I think this is a really good idea, since we can use it across platform. For starters I have one question, does the API naming in realm-cocoa and realm-swift also have same standard?
For example in the Java API function to add new column in a table called addField()
but deep inside in the table class (I guess it follows the native function name?) it's called addColumn()
Since one of the purpose of creating this domain-specific language is to make this migration schema reusable, I think we need to use something that everyone familiar with.
That would be one of the challenges solving this issue would be about. The the idea is good, but it is also not trivial to implement.
I think a DSL as a very limited (non-looping) set of transforms makes sense, as proposed on the Schema and Migration page.
Instead of specifying migration as Java code, a simple domain-specific language could be useful. The migrations can then be specified as assets.
See #1919.