/vscode-rails-db-schema

Definition and Completion provider for Rails DB Schema.

Primary LanguageTypeScriptMIT LicenseMIT

Rails DB Schema

Definition and Completion provider for Rails DB Schema.

Features

Completion

Completion

Validate

Definition

Definition

Commands

railsDbSchema.open

open

railsDbSchema.insert

insert

Tips

If you want to use this extension with the config.active_record.schema_format = :sql setting, you can add the following code to your Rakefile to make it work. (#8)

if Rails.env.development?
  %w[db:migrate db:rollback db:migrate:redo].each do |task_name|
    Rake::Task[task_name].enhance do
      schema_format = ActiveRecord.schema_format
      ActiveRecord.schema_format = :ruby
      Rake::Task['db:schema:dump'].invoke
      ActiveRecord.schema_format = schema_format
  end
end

TODO

  • Model.human_attribute_name completion
  • Test