Skip to content

Commit

Permalink
update dummy migration files
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Dec 29, 2019
1 parent 05ae575 commit 0c6151e
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 9 deletions.
4 changes: 3 additions & 1 deletion enju_inventory.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["spec/**/*"] - Dir["spec/dummy/db/*.sqlite3"] - Dir["spec/dummy/log/*"] - Dir["spec/dummy/solr/{data,pids,default,development,test}/*"] - Dir["spec/dummy/tmp/*"] - Dir["spec/dummy/private/**/*"]

s.add_dependency "enju_leaf", "~> 1.3.3"
s.add_dependency "enju_library", "~> 0.3.6"

s.add_development_dependency "enju_leaf", "~> 1.3.3"
s.add_development_dependency "sqlite3"
s.add_development_dependency "mysql2"
s.add_development_dependency "pg"
s.add_development_dependency "sunspot_solr", "~> 2.5"
s.add_development_dependency "rspec-rails", "~> 3.8"
s.add_development_dependency "factory_bot_rails", "~> 5.0"
s.add_development_dependency "simplecov"
s.add_development_dependency "annotate"
s.add_development_dependency "coveralls"
s.add_development_dependency "sprockets", "~> 3.7"
s.add_development_dependency "rails", "~> 5.2"
Expand Down
6 changes: 3 additions & 3 deletions spec/dummy/db/migrate/005_create_manifestations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def change
t.integer :frequency_id, default: 1, null: false
t.boolean :subscription_master, default: false, null: false
end
# add_index :manifestations, :carrier_type_id
# add_index :manifestations, :required_role_id
#add_index :manifestations, :carrier_type_id
#add_index :manifestations, :required_role_id
add_index :manifestations, :access_address
# add_index :manifestations, :frequency_id
#add_index :manifestations, :frequency_id
add_index :manifestations, :manifestation_identifier
add_index :manifestations, :updated_at
add_index :manifestations, :date_of_publication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Mi
disable_ddl_transaction!

def up
add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" # , algorithm: :concurrently
add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
change_column_null :agent_import_file_transitions, :most_recent, false
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord:
disable_ddl_transaction!

def up
add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent" # , algorithm: :concurrently
add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
change_column_null :resource_import_file_transitions, :most_recent, false
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord:
disable_ddl_transaction!

def up
add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" # , algorithm: :concurrently
add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
change_column_null :resource_export_file_transitions, :most_recent, false
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migr
disable_ddl_transaction!

def up
add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" # , algorithm: :concurrently
add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" #, algorithm: :concurrently
change_column_null :import_request_transitions, :most_recent, false
end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddMemoToManifestation < ActiveRecord::Migration[5.2]
def change
add_column :manifestations, :memo, :text
end
end
5 changes: 5 additions & 0 deletions spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddMemoToItem < ActiveRecord::Migration[5.2]
def change
add_column :items, :memo, :text
end
end
12 changes: 12 additions & 0 deletions spec/dummy/db/migrate/20191219122214_create_custom_properties.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class CreateCustomProperties < ActiveRecord::Migration[5.2]
def change
create_table :custom_properties do |t|
t.integer :resource_id, null: false
t.string :resource_type, null: false
t.text :label, null: false
t.text :value

t.timestamps
end
end
end
13 changes: 12 additions & 1 deletion spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2018_01_07_161410) do
ActiveRecord::Schema.define(version: 2019_12_19_122214) do

create_table "accepts", force: :cascade do |t|
t.integer "basket_id"
Expand Down Expand Up @@ -262,6 +262,15 @@
t.index ["work_id"], name: "index_creates_on_work_id"
end

create_table "custom_properties", force: :cascade do |t|
t.integer "resource_id", null: false
t.string "resource_type", null: false
t.text "label", null: false
t.text "value"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "donates", force: :cascade do |t|
t.integer "agent_id", null: false
t.integer "item_id", null: false
Expand Down Expand Up @@ -400,6 +409,7 @@
t.string "binding_call_number"
t.datetime "binded_at"
t.integer "manifestation_id", null: false
t.text "memo"
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
t.index ["item_identifier"], name: "index_items_on_item_identifier"
Expand Down Expand Up @@ -581,6 +591,7 @@
t.text "publication_place"
t.text "extent"
t.text "dimensions"
t.text "memo"
t.index ["access_address"], name: "index_manifestations_on_access_address"
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
t.index ["doi"], name: "index_manifestations_on_doi"
Expand Down

0 comments on commit 0c6151e

Please sign in to comment.