tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

schemaEdit not picking up db/structure.sql #515

Closed jc00ke closed 6 years ago

jc00ke commented 6 years ago

The current project I'm working on uses a structure.sql file instead of a schema.rb. Looks like schemaEdit already handles when schema.rb is missing and structure.sql is present, yet I get an E345 Can't find file /home/jesse/my/client/project/db/schema.rb. I'm on 39cb87d.

Happy to help debug. Thanks!

tpope commented 6 years ago

Start by testing if those has_file() calls return what you expect.

jc00ke commented 6 years ago

By the time it gets to this line schema is set to db/structure.sql

image

db/structure.sql is opened but there's no automatic navigation to the CREATE TABLE line for the model name entered :Eschema user.

tpope commented 6 years ago

That's not implemented. Report back on what the create table declarations look like for the big 3 databases look like and we can assess how feasible it would be to implement.

tpope commented 6 years ago

P.S. here's PostgreSQL, since I have it handy:

CREATE TABLE public.whatevers (
jc00ke commented 6 years ago

Just tried it out, works great, thank you! :tada: