-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: remove unused depositor and collections models
- Loading branch information
Showing
9 changed files
with
55 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
db/migrate/20250115163010_remove_foreign_keys_depositor_collection_pairings.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class RemoveForeignKeysDepositorCollectionPairings < ActiveRecord::Migration[7.2] | ||
def change | ||
remove_foreign_key "depositor_collection_pairings", "collections" | ||
remove_foreign_key "depositor_collection_pairings", "depositors" | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
db/migrate/20250115163254_drop_depositor_collection_pairings.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class DropDepositorCollectionPairings < ActiveRecord::Migration[7.2] | ||
def change | ||
drop_table :depositor_collection_pairings do |t| | ||
t.belongs_to :depositor, index: true, foreign_key: true | ||
t.belongs_to :collection, index: true, foreign_key: true | ||
|
||
t.timestamps null: false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class RemoveForeignKeysDeposits < ActiveRecord::Migration[7.2] | ||
def change | ||
remove_foreign_key "deposits", "collections" | ||
remove_foreign_key "deposits", "depositors" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class DropDepositors < ActiveRecord::Migration[7.2] | ||
def change | ||
remove_index :depositors, :name, unique: true | ||
remove_index :depositors, :basic_authentication_user_id, unique: true | ||
drop_table :depositors do |t| | ||
t.string :name, null: false | ||
t.string :basic_authentication_user_id, null: false | ||
t.string :password_digest, null: false | ||
|
||
t.timestamps null: false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class DropCollections < ActiveRecord::Migration[7.2] | ||
def change | ||
remove_index :collections, :name, unique: true | ||
remove_index :collections, :slug, unique: true | ||
drop_table :collections do |t| | ||
t.string :name, null: false | ||
t.string :atom_title, null: false | ||
t.string :slug, null: false | ||
t.string :hyacinth_project_string_key | ||
t.string :parser | ||
t.text :abstract | ||
t.text :mime_types | ||
t.text :sword_package_types | ||
t.boolean :mediation_enabled, default: false | ||
|
||
t.timestamps null: false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters