News for hackers. Stuff that matters.
Re:Show HN: Visualize Your Rails App to ER Diagram Automatic... by sam0x17 on Monday October 29, 2018 @12:24AM (#18325044)
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.
Re:Show HN: Visualize Your Rails App to ER Diagram Automatic... by huy on Monday October 29, 2018 @01:19AM (#18325238)
Thanks! 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!

Re:Show HN: Visualize Your Rails App to ER Diagram Automatic... by Exuma on Monday October 29, 2018 @01:59AM (#18325359)
You 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.
Re:Show HN: Visualize Your Rails App to ER Diagram Automatic... by benbristow on Monday October 29, 2018 @04:31AM (#18325842)
How is the code parsed. Is it regex/string-reading based or is it executed?
Re:Show HN: Visualize Your Rails App to ER Diagram Automatic... by huy on Monday October 29, 2018 @05:22AM (#18326023)
It's string-reading, we use PegJS for that :) https://pegjs.org/
Re:Show HN: Visualize Your Rails App to ER Diagram Automatic... by sam0x17 on Saturday November 03, 2018 @02:52PM (#18371824)
suggestion: 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