uklibraries / metadata_editor

Metadata editor satisfying the KDL metadata guidelines
0 stars 0 forks source link

add source model #31

Closed rrmait0 closed 11 years ago

cokernel commented 11 years ago

See also #22.

cokernel commented 11 years ago

@rrmait0, there are a few problems with this pull request.

rrmait0 commented 11 years ago

@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.

rrmait0 commented 11 years ago

I just replaced it by retrieving the latest one from github/uklibaries/metadata_editor/db/schema.rb

cokernel commented 11 years ago

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.

rrmait0 commented 11 years ago

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.

rrmait0 commented 11 years ago

The pull request should be ready now.

cokernel commented 11 years ago

Merging.