Closed rrmait0 closed 11 years ago
@rrmait0, there are a few problems with this pull request.
:remove_column
is not reversible, so the migration in db/migrate/20130821125926_remove_source_from_record.rb is incorrect. The list of methods that can appear in a change method is available in the Active Record Migrations guide. You can invoke the generator as rails g migration RemoveSourceFromRecord source
to generate the correct migration.@cokernel
Is there a way to just replace one file from the repository. I want to replace db/schema.rb from the most current one in master. Obviously, I do not want to loose my other changes.
I just replaced it by retrieving the latest one from github/uklibaries/metadata_editor/db/schema.rb
It's not sufficient to checkout a fresh copy of db/schema.rb, because most migration actions end up touching the schema.
I recommend the following:
class RemoveSourceFromRecord < ActiveRecord::Migration
def up
remove_column :records, :source
end
def down
add_column :records, :source, :string
end
end
add_index :records, :source_id
That way we'll have the up-to-date schema in this branch.
I updated it but still there seems to be a problem with the records table missing for some reason. I'm not sure what's causing the table to be deleted.
The pull request should be ready now.
Merging.
See also #22.