Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Adding digital location attribute and route to view only digital locations - closes #46 #47

Merged
merged 1 commit into from
Jan 27, 2016

Conversation

escowles
Copy link
Member

No description provided.

class AddDigitalLocationToDeliveryLocation < ActiveRecord::Migration
def change
add_column :locations_delivery_locations, :digital_location, :boolean
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have the migration set true or false for existing locations, or would be better/easier to do this in the console later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting a default seems like a good idea, to minimize the manual editing required -- should be it be true?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we just want a default, true is fine and then manually editing to get things into a correct state.

As I said in the original issue,

Locations::DeliveryLocation.select { |d| d.pickup_location? }

gets us really close; only two ("Lewis Library, Geosciences and Map Library" and "ReCAP Reading Rooom") would be incorrect; so if getting more fancy seems appropriate, that might be an idea.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about setting a default value that's another column. So I've added a second migration that updates everything in the db.

@jpstroop
Copy link
Member

👍 wanna squash?

jpstroop pushed a commit that referenced this pull request Jan 27, 2016
Adding digital location attribute and route to view only digital locations - closes #46
@jpstroop jpstroop merged commit 650cf5e into development Jan 27, 2016
@jpstroop jpstroop deleted the digital_location branch January 27, 2016 18:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants