curate 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/curate/organizations_controller.rb +96 -0
- data/app/helpers/curate/organizations_helper.rb +13 -0
- data/app/helpers/curate_helper.rb +4 -0
- data/app/models/concerns/curate/ability.rb +8 -0
- data/app/models/curate/user_behavior/base.rb +13 -0
- data/app/repository_models/collection.rb +1 -0
- data/app/repository_models/curation_concern/model.rb +1 -0
- data/app/repository_models/organization.rb +17 -0
- data/app/repository_models/person.rb +1 -0
- data/app/repository_models/profile_section.rb +1 -0
- data/app/views/curate/organizations/_button_create_organization.html.erb +1 -0
- data/app/views/curate/organizations/_document_list.html.erb +11 -0
- data/app/views/curate/organizations/_form.html.erb +49 -0
- data/app/views/curate/organizations/_organization.html.erb +24 -0
- data/app/views/curate/organizations/edit.html.erb +4 -0
- data/app/views/curate/organizations/index.html.erb +11 -0
- data/app/views/curate/organizations/new.html.erb +4 -0
- data/app/views/curate/organizations/show.html.erb +27 -0
- data/app/views/organizations/_organization.html.erb +30 -0
- data/app/views/shared/_add_content.html.erb +1 -0
- data/lib/curate/rails/routes.rb +1 -0
- data/lib/curate/version.rb +1 -1
- data/lib/generators/curate/application_template.rb +1 -1
- data/lib/generators/curate/curate_generator.rb +3 -0
- data/spec/abilities/generic_file_abilities_spec.rb +12 -0
- data/spec/abilities/generic_work_abilities_spec.rb +12 -0
- data/spec/controllers/curate/organizations_controller_spec.rb +50 -0
- data/spec/factories/organizations_factory.rb +21 -0
- data/spec/internal/Gemfile +4 -22
- data/spec/internal/Gemfile.lock +1 -376
- data/spec/internal/app/assets/javascripts/application.js +0 -4
- data/spec/internal/app/assets/stylesheets/application.css +0 -1
- data/spec/internal/app/controllers/application_controller.rb +0 -9
- data/spec/internal/config/application.rb +0 -6
- data/spec/internal/config/environments/test.rb +1 -2
- data/spec/internal/config/initializers/mime_types.rb +1 -8
- data/spec/internal/config/initializers/secret_token.rb +1 -1
- data/spec/internal/config/locales/en.yml +20 -11
- data/spec/internal/config/routes.rb +0 -8
- data/spec/internal/db/development.sqlite3 +0 -0
- data/spec/internal/db/schema.rb +1 -216
- data/spec/internal/db/test.sqlite3 +0 -0
- data/spec/internal/lib/generators/test_app_generator.rb +2 -23
- data/spec/internal/log/development.log +4 -323
- data/spec/repository_models/organization_spec.rb +66 -0
- metadata +20 -160
- data/spec/internal/app/assets/images/blacklight/bg.png +0 -0
- data/spec/internal/app/assets/images/blacklight/border.png +0 -0
- data/spec/internal/app/assets/images/blacklight/bul_sq_gry.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/checkmark.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/logo.png +0 -0
- data/spec/internal/app/assets/images/blacklight/magnifying_glass.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/remove.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/separator.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/start_over.gif +0 -0
- data/spec/internal/app/models/ability.rb +0 -20
- data/spec/internal/app/models/solr_document.rb +0 -38
- data/spec/internal/app/models/user.rb +0 -23
- data/spec/internal/config/SolrMarc/config-test.properties +0 -37
- data/spec/internal/config/SolrMarc/config.properties +0 -37
- data/spec/internal/config/SolrMarc/index.properties +0 -97
- data/spec/internal/config/SolrMarc/index_scripts/dewey.bsh +0 -47
- data/spec/internal/config/SolrMarc/index_scripts/format.bsh +0 -126
- data/spec/internal/config/SolrMarc/translation_maps/README_MAPS +0 -1
- data/spec/internal/config/SolrMarc/translation_maps/callnumber_map.properties +0 -407
- data/spec/internal/config/SolrMarc/translation_maps/composition_era_map.properties +0 -56
- data/spec/internal/config/SolrMarc/translation_maps/country_map.properties +0 -379
- data/spec/internal/config/SolrMarc/translation_maps/format_map.properties +0 -50
- data/spec/internal/config/SolrMarc/translation_maps/instrument_map.properties +0 -101
- data/spec/internal/config/SolrMarc/translation_maps/language_map.properties +0 -490
- data/spec/internal/config/doi.yml +0 -5
- data/spec/internal/config/fedora.yml +0 -14
- data/spec/internal/config/initializers/action_dispatch_http_upload_monkey_patch.rb +0 -12
- data/spec/internal/config/initializers/curate_config.rb +0 -24
- data/spec/internal/config/initializers/devise.rb +0 -254
- data/spec/internal/config/initializers/hydra-remote_identifier_config.rb +0 -29
- data/spec/internal/config/initializers/hydra_config.rb +0 -28
- data/spec/internal/config/initializers/mailboxer.rb +0 -17
- data/spec/internal/config/initializers/redis_config.rb +0 -32
- data/spec/internal/config/initializers/resque_admin.rb +0 -10
- data/spec/internal/config/initializers/resque_config.rb +0 -5
- data/spec/internal/config/initializers/sufia.rb +0 -81
- data/spec/internal/config/jetty.yml +0 -5
- data/spec/internal/config/locales/devise.en.yml +0 -59
- data/spec/internal/config/recipients_list.yml +0 -2
- data/spec/internal/config/redis.yml +0 -6
- data/spec/internal/config/role_map_cucumber.yml +0 -10
- data/spec/internal/config/role_map_development.yml +0 -12
- data/spec/internal/config/role_map_production.yml +0 -2
- data/spec/internal/config/role_map_test.yml +0 -15
- data/spec/internal/config/solr.yml +0 -10
- data/spec/internal/db/migrate/20140131175455_devise_create_users.rb +0 -42
- data/spec/internal/db/migrate/20140131175500_add_devise_guests_to_users.rb +0 -15
- data/spec/internal/db/migrate/20140131175501_create_searches.rb +0 -16
- data/spec/internal/db/migrate/20140131175502_create_bookmarks.rb +0 -18
- data/spec/internal/db/migrate/20140131175503_remove_editable_fields_from_bookmarks.rb +0 -12
- data/spec/internal/db/migrate/20140131175504_add_user_types_to_bookmarks_searches.rb +0 -16
- data/spec/internal/db/migrate/20140131175505_acts_as_follower_migration.rb +0 -17
- data/spec/internal/db/migrate/20140131175506_add_social_to_users.rb +0 -13
- data/spec/internal/db/migrate/20140131175507_create_single_use_links.rb +0 -12
- data/spec/internal/db/migrate/20140131175508_add_ldap_attrs_to_user.rb +0 -27
- data/spec/internal/db/migrate/20140131175509_add_avatars_to_users.rb +0 -9
- data/spec/internal/db/migrate/20140131175510_create_checksum_audit_logs.rb +0 -20
- data/spec/internal/db/migrate/20140131175511_create_version_committers.rb +0 -15
- data/spec/internal/db/migrate/20140131175512_add_groups_to_users.rb +0 -11
- data/spec/internal/db/migrate/20140131175513_create_local_authorities.rb +0 -50
- data/spec/internal/db/migrate/20140131175514_create_trophies.rb +0 -10
- data/spec/internal/db/migrate/20140131175536_create_mailboxer.mailboxer_engine.rb +0 -62
- data/spec/internal/db/migrate/20140131175537_add_notified_object.mailboxer_engine.rb +0 -18
- data/spec/internal/db/migrate/20140131175538_add_notification_code.mailboxer_engine.rb +0 -14
- data/spec/internal/db/migrate/20140131175539_add_attachments.mailboxer_engine.rb +0 -10
- data/spec/internal/db/migrate/20140131175540_rename_receipts_read.mailboxer_engine.rb +0 -10
- data/spec/internal/db/migrate/20140131175541_add_global_notification_support.mailboxer_engine.rb +0 -10
- data/spec/internal/db/migrate/20140131175545_add_terms_of_service_to_user.curate_engine.rb +0 -6
- data/spec/internal/db/migrate/20140131175546_add_user_force_update_profile.curate_engine.rb +0 -9
- data/spec/internal/db/migrate/20140131175547_create_help_requests.curate_engine.rb +0 -23
- data/spec/internal/db/migrate/20140131175548_add_repository_id_to_user.curate_engine.rb +0 -7
- data/spec/internal/db/migrate/20140131175549_create_curate_proxy_deposit_rights.curate_engine.rb +0 -12
- data/spec/internal/db/migrate/20140131175550_change_display_name_to_name.curate_engine.rb +0 -7
- data/spec/internal/fedora_conf/conf/development/fedora.fcfg +0 -953
- data/spec/internal/fedora_conf/conf/test/fedora.fcfg +0 -953
- data/spec/internal/solr_conf/conf/schema.xml +0 -273
- data/spec/internal/solr_conf/conf/solrconfig.xml +0 -167
- data/spec/internal/solr_conf/solr.xml +0 -35
- data/spec/internal/test/models/user_test.rb +0 -7
@@ -1,59 +0,0 @@
|
|
1
|
-
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
-
|
3
|
-
en:
|
4
|
-
devise:
|
5
|
-
confirmations:
|
6
|
-
confirmed: "Your account was successfully confirmed."
|
7
|
-
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
8
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
9
|
-
failure:
|
10
|
-
already_authenticated: "You are already signed in."
|
11
|
-
inactive: "Your account is not activated yet."
|
12
|
-
invalid: "Invalid email or password."
|
13
|
-
locked: "Your account is locked."
|
14
|
-
last_attempt: "You have one more attempt before your account will be locked."
|
15
|
-
not_found_in_database: "Invalid email or password."
|
16
|
-
timeout: "Your session expired. Please sign in again to continue."
|
17
|
-
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
-
unconfirmed: "You have to confirm your account before continuing."
|
19
|
-
mailer:
|
20
|
-
confirmation_instructions:
|
21
|
-
subject: "Confirmation instructions"
|
22
|
-
reset_password_instructions:
|
23
|
-
subject: "Reset password instructions"
|
24
|
-
unlock_instructions:
|
25
|
-
subject: "Unlock Instructions"
|
26
|
-
omniauth_callbacks:
|
27
|
-
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
28
|
-
success: "Successfully authenticated from %{kind} account."
|
29
|
-
passwords:
|
30
|
-
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
31
|
-
send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
|
32
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
33
|
-
updated: "Your password was changed successfully. You are now signed in."
|
34
|
-
updated_not_active: "Your password was changed successfully."
|
35
|
-
registrations:
|
36
|
-
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
|
37
|
-
signed_up: "Welcome! You have signed up successfully."
|
38
|
-
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
39
|
-
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
40
|
-
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
|
41
|
-
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
42
|
-
updated: "You updated your account successfully."
|
43
|
-
sessions:
|
44
|
-
signed_in: "Signed in successfully."
|
45
|
-
signed_out: "Signed out successfully."
|
46
|
-
unlocks:
|
47
|
-
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
|
48
|
-
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
|
49
|
-
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
50
|
-
errors:
|
51
|
-
messages:
|
52
|
-
already_confirmed: "was already confirmed, please try signing in"
|
53
|
-
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
54
|
-
expired: "has expired, please request a new one"
|
55
|
-
not_found: "not found"
|
56
|
-
not_locked: "was not locked"
|
57
|
-
not_saved:
|
58
|
-
one: "1 error prohibited this %{resource} from being saved:"
|
59
|
-
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -1,15 +0,0 @@
|
|
1
|
-
archivist:
|
2
|
-
- archivist1@example.com
|
3
|
-
- archivist2@example.com
|
4
|
-
- leland_himself@example.com
|
5
|
-
admin_policy_object_editor:
|
6
|
-
- archivist1@example.com
|
7
|
-
donor:
|
8
|
-
- donor1@example.com
|
9
|
-
- leland_himself@example.com
|
10
|
-
researcher:
|
11
|
-
- archivist1@example.com
|
12
|
-
- researcher1@example.com
|
13
|
-
patron:
|
14
|
-
- patron1@example.com
|
15
|
-
- leland_himself@example.com
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# This is a sample config file that does not have multiple solr instances. You will also need to be sure to
|
2
|
-
# edit the fedora.yml file to match the solr URL for active-fedora.
|
3
|
-
development:
|
4
|
-
url: http://localhost:8983/solr/development
|
5
|
-
test: &TEST
|
6
|
-
url: <%= "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8983}/solr/test" %>
|
7
|
-
cucumber:
|
8
|
-
<<: *TEST
|
9
|
-
production:
|
10
|
-
url: http://your.production.server:8080/bl_solr/core0
|
@@ -1,42 +0,0 @@
|
|
1
|
-
class DeviseCreateUsers < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table(:users) do |t|
|
4
|
-
## Database authenticatable
|
5
|
-
t.string :email, :null => false, :default => ""
|
6
|
-
t.string :encrypted_password, :null => false, :default => ""
|
7
|
-
|
8
|
-
## Recoverable
|
9
|
-
t.string :reset_password_token
|
10
|
-
t.datetime :reset_password_sent_at
|
11
|
-
|
12
|
-
## Rememberable
|
13
|
-
t.datetime :remember_created_at
|
14
|
-
|
15
|
-
## Trackable
|
16
|
-
t.integer :sign_in_count, :default => 0, :null => false
|
17
|
-
t.datetime :current_sign_in_at
|
18
|
-
t.datetime :last_sign_in_at
|
19
|
-
t.string :current_sign_in_ip
|
20
|
-
t.string :last_sign_in_ip
|
21
|
-
|
22
|
-
## Confirmable
|
23
|
-
# t.string :confirmation_token
|
24
|
-
# t.datetime :confirmed_at
|
25
|
-
# t.datetime :confirmation_sent_at
|
26
|
-
# t.string :unconfirmed_email # Only if using reconfirmable
|
27
|
-
|
28
|
-
## Lockable
|
29
|
-
# t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
|
30
|
-
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
31
|
-
# t.datetime :locked_at
|
32
|
-
|
33
|
-
|
34
|
-
t.timestamps
|
35
|
-
end
|
36
|
-
|
37
|
-
add_index :users, :email, :unique => true
|
38
|
-
add_index :users, :reset_password_token, :unique => true
|
39
|
-
# add_index :users, :confirmation_token, :unique => true
|
40
|
-
# add_index :users, :unlock_token, :unique => true
|
41
|
-
end
|
42
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class AddDeviseGuestsToUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
change_table(:users) do |t|
|
4
|
-
## Database authenticatable
|
5
|
-
t.boolean :guest, :default => false
|
6
|
-
end
|
7
|
-
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.down
|
11
|
-
# By default, we don't want to make any assumption about how to roll back a migration when your
|
12
|
-
# model already existed. Please edit below which fields you would like to remove in this migration.
|
13
|
-
raise ActiveRecord::IrreversibleMigration
|
14
|
-
end
|
15
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
class CreateSearches < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
create_table :searches do |t|
|
5
|
-
t.text :query_params
|
6
|
-
t.integer :user_id
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
add_index :searches, :user_id
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :searches
|
15
|
-
end
|
16
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
class CreateBookmarks < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
create_table :bookmarks do |t|
|
5
|
-
t.integer :user_id, :null=>false
|
6
|
-
t.text :url
|
7
|
-
t.string :document_id
|
8
|
-
t.string :title
|
9
|
-
t.text :notes
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
drop_table :bookmarks
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
class RemoveEditableFieldsFromBookmarks < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
remove_column :bookmarks, :notes
|
5
|
-
remove_column :bookmarks, :url
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.down
|
9
|
-
add_column :bookmarks, :notes, :text
|
10
|
-
add_column :bookmarks, :url, :string
|
11
|
-
end
|
12
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
class AddUserTypesToBookmarksSearches < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
add_column :searches, :user_type, :string
|
5
|
-
add_column :bookmarks, :user_type, :string
|
6
|
-
Search.reset_column_information
|
7
|
-
Bookmark.reset_column_information
|
8
|
-
Search.update_all("user_type = 'user'")
|
9
|
-
Bookmark.update_all("user_type = 'user'")
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
remove_column :searches, :user_type
|
14
|
-
remove_column :bookmarks, :user_type
|
15
|
-
end
|
16
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class ActsAsFollowerMigration < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :follows, :force => true do |t|
|
4
|
-
t.references :followable, :polymorphic => true, :null => false
|
5
|
-
t.references :follower, :polymorphic => true, :null => false
|
6
|
-
t.boolean :blocked, :default => false, :null => false
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
|
10
|
-
add_index :follows, ["follower_id", "follower_type"], :name => "fk_follows"
|
11
|
-
add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables"
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
drop_table :follows
|
16
|
-
end
|
17
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class AddSocialToUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
add_column :users, :facebook_handle, :string
|
4
|
-
add_column :users, :twitter_handle, :string
|
5
|
-
add_column :users, :googleplus_handle, :string
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.down
|
9
|
-
remove_column :users, :facebook_handle, :string
|
10
|
-
remove_column :users, :twitter_handle, :string
|
11
|
-
remove_column :users, :googleplus_handle, :string
|
12
|
-
end
|
13
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class AddLdapAttrsToUser < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
add_column :users, :display_name, :string
|
4
|
-
add_column :users, :address, :string
|
5
|
-
add_column :users, :admin_area, :string
|
6
|
-
add_column :users, :department, :string
|
7
|
-
add_column :users, :title, :string
|
8
|
-
add_column :users, :office, :string
|
9
|
-
add_column :users, :chat_id, :string
|
10
|
-
add_column :users, :website, :string
|
11
|
-
add_column :users, :affiliation, :string
|
12
|
-
add_column :users, :telephone, :string
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.down
|
16
|
-
remove_column :users, :display_name
|
17
|
-
remove_column :users, :address
|
18
|
-
remove_column :users, :admin_area
|
19
|
-
remove_column :users, :department
|
20
|
-
remove_column :users, :title
|
21
|
-
remove_column :users, :office
|
22
|
-
remove_column :users, :chat_id
|
23
|
-
remove_column :users, :website
|
24
|
-
remove_column :users, :affiliation
|
25
|
-
remove_column :users, :telephone
|
26
|
-
end
|
27
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class CreateChecksumAuditLogs < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :checksum_audit_logs do |t|
|
4
|
-
t.string :pid
|
5
|
-
t.string :dsid
|
6
|
-
t.string :version
|
7
|
-
t.integer :pass
|
8
|
-
t.string :expected_result
|
9
|
-
t.string :actual_result
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
add_index :checksum_audit_logs, [:pid, :dsid], :name=>'by_pid_and_dsid', :order => {:created_at => "DESC" }
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.down
|
17
|
-
remove_index(:checksum_audit_logs, :name => 'by_pid_and_dsid')
|
18
|
-
drop_table :checksum_audit_logs
|
19
|
-
end
|
20
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateVersionCommitters < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :version_committers do |t|
|
4
|
-
t.string :obj_id
|
5
|
-
t.string :datastream_id
|
6
|
-
t.string :version_id
|
7
|
-
t.string :committer_login
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
drop_table :version_committers
|
14
|
-
end
|
15
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class AddGroupsToUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
add_column :users, :group_list, :text
|
4
|
-
add_column :users, :groups_last_update, :datetime
|
5
|
-
end
|
6
|
-
|
7
|
-
def self.down
|
8
|
-
remove_column :users, :group_list
|
9
|
-
remove_column :users, :groups_last_update
|
10
|
-
end
|
11
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
class CreateLocalAuthorities < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :local_authority_entries, :force => true do |t|
|
4
|
-
t.integer :local_authority_id
|
5
|
-
t.string :label
|
6
|
-
t.string :uri
|
7
|
-
end
|
8
|
-
|
9
|
-
create_table :local_authorities, :force => true do |t|
|
10
|
-
t.string :name, :unique => true
|
11
|
-
end
|
12
|
-
|
13
|
-
create_table :domain_terms, :force => true do |t|
|
14
|
-
t.string :model
|
15
|
-
t.string :term
|
16
|
-
end
|
17
|
-
|
18
|
-
create_table :domain_terms_local_authorities, :id => false do |t|
|
19
|
-
t.integer :domain_term_id, :foreign_key => true
|
20
|
-
t.integer :local_authority_id, :foreign_key => true
|
21
|
-
end
|
22
|
-
|
23
|
-
create_table :subject_local_authority_entries, :force => true do |t|
|
24
|
-
t.string :label
|
25
|
-
t.string :lowerLabel
|
26
|
-
t.string :url
|
27
|
-
end
|
28
|
-
|
29
|
-
add_index :local_authority_entries, [:local_authority_id, :label], :name => 'entries_by_term_and_label'
|
30
|
-
add_index :local_authority_entries, [:local_authority_id, :uri], :name => 'entries_by_term_and_uri'
|
31
|
-
add_index :domain_terms, [:model, :term], :name => 'terms_by_model_and_term'
|
32
|
-
add_index :domain_terms_local_authorities, [:local_authority_id, :domain_term_id], :name => 'dtla_by_ids1'
|
33
|
-
add_index :domain_terms_local_authorities, [:domain_term_id, :local_authority_id], :name => 'dtla_by_ids2'
|
34
|
-
add_index :subject_local_authority_entries, [:lowerLabel], :name => 'entries_by_lower_label'
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.down
|
38
|
-
drop_table :local_authority_entries
|
39
|
-
drop_table :local_authorities
|
40
|
-
drop_table :domain_terms
|
41
|
-
drop_table :domain_terms_local_authorities
|
42
|
-
drop_table :subject_local_authority_entries
|
43
|
-
remove_index :local_authority_entries, :name => "entries_by_term_and_label"
|
44
|
-
remove_index :local_authority_entries, :name => "entries_by_term_and_uri"
|
45
|
-
remove_index :domain_terms, :name => "terms_by_model_and_term"
|
46
|
-
remove_index :subject_local_authority_entries, :name => 'entries_by_lower_label'
|
47
|
-
remove_index :domain_terms_local_authorities, :name => 'dtla_by_ids1'
|
48
|
-
remove_index :domain_terms_local_authorities, :name => 'dtla_by_ids2'
|
49
|
-
end
|
50
|
-
end
|