Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails references on create_table not supported #113

Open
codenamev opened this issue Dec 11, 2024 · 0 comments
Open

Rails references on create_table not supported #113

codenamev opened this issue Dec 11, 2024 · 0 comments

Comments

@codenamev
Copy link

codenamev commented Dec 11, 2024

Attempting to run any migration with departure that uses [Rails' references] on create_table (https://guides.rubyonrails.org/active_record_migrations.html#references) will fail with missing for_alter method(s).

Example:

class CreateExamplesTable < ActiveRecord::Migration[7.0]
  uses_departure!

  def change
    create_table :examples do |t|
      # ... other columns
      t.references :other_ar_backed_model_name, null: false, foreign_key: true
    end
  end
end
@codenamev codenamev changed the title Rails references not currently supported Rails references on create_table not supported Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant