3 ms·
It doesn't work. When I import my schema.rb file it takes issue with basically every line saying things like unexpected token etc. I'm using the "upload schema.
by sam0x17 8y ago
It doesn't work. When I import my schema.rb file it takes issue with basically every line saying things like unexpected token etc. I'm using the "upload schema.rb" file button, but it's like it's trying to parse it as SQL.
- sam0x17 8y agosuggestion: actually run the schema.rb in a cloud function / lambda that has SQLite and ruby installed in it and then export the SQL via a db dump
- huy 8y agoThanks! It seems like we haven't catered for more complex table syntax (when you added extra stuff like `force: delele` et al). We'll look into this and fix them. Really appreciate your feedback here!
- benbristow 8y agoHow is the code parsed. Is it regex/string-reading based or is it executed?
- huy 8y agoIt's string-reading, we use PegJS for that :) https://pegjs.org/ https://pegjs.org/
- Exuma 8y agoYou also should show an error message when theres a problem with the schema. It says it doesnt understand "-1" as a default for an integer, which is obviously wrong. Firstly, thats a bug, but secondly it doesnt tell you when theres a problem with the file, it only shows a red X and doesnt even scroll there, so youre just left clicking the button 20 times because you think its broken.