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 9, 2019
1 parent 5222db3 commit 0351e6d
Show file tree
Hide file tree
Showing 266 changed files with 2,432 additions and 616 deletions.
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ gem 'jquery-rails'

# To use debugger
# gem 'debugger'
gem 'json_translate'
gem 'enju_seed', github: 'next-l/enju_seed'
gem 'enju_leaf', github: 'next-l/enju_leaf'
gem 'enju_library', github: 'next-l/enju_library'
gem 'enju_biblio', github: 'next-l/enju_biblio'
gem 'enju_subject', github: 'next-l/enju_subject'
gem 'enju_ndl', github: 'next-l/enju_ndl'
gem 'paper_trail'
gem 'rails-controller-testing', group: :test
gem 'rspec_junit_formatter', group: :test
gem 'rails', '~> 5.2'
group :test do
gem 'rails-controller-testing'
gem 'rspec_junit_formatter'
end
7 changes: 4 additions & 3 deletions enju_loc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"]
s.test_files = Dir["spec/**/*"] - Dir["spec/dummy/log/*"] - Dir["spec/dummy/solr/{data,pids,default,development,test}/*"] - Dir["spec/dummy/tmp/*"]

s.add_dependency "enju_subject", "~> 0.4.0.beta.1"
s.add_dependency "enju_subject", "~> 0.5.0.beta.1"
s.add_dependency "faraday"

s.add_development_dependency "enju_leaf", "~> 1.4.0.beta.1"
s.add_development_dependency "enju_leaf", "~> 3.0.0.beta.1"
s.add_development_dependency "pg"
s.add_development_dependency "rspec-rails", "~> 3.8"
s.add_development_dependency "rspec-rails", "~> 3.9"
s.add_development_dependency "vcr", "~> 5.0"
s.add_development_dependency "webmock"
s.add_development_dependency "sunspot_solr", "~> 2.5"
s.add_development_dependency "simplecov"
s.add_development_dependency "coveralls"
s.add_development_dependency "appraisal"
s.add_development_dependency "annotate"
s.add_development_dependency "sprockets", "~> 3.7"
end
10 changes: 6 additions & 4 deletions gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
source "https://rubygems.org"

gem "jquery-rails"
gem "json_translate"
gem "enju_seed", git: "https://github.com/next-l/enju_seed.git"
gem "enju_leaf", git: "https://github.com/next-l/enju_leaf.git"
gem "enju_library", git: "https://github.com/next-l/enju_library.git"
gem "enju_biblio", git: "https://github.com/next-l/enju_biblio.git"
gem "enju_subject", git: "https://github.com/next-l/enju_subject.git"
gem "enju_ndl", git: "https://github.com/next-l/enju_ndl.git"
gem "paper_trail"
gem "rails-controller-testing", group: :test
gem "rspec_junit_formatter", group: :test
gem "rails", "~> 5.2"

group :test do
gem "rails-controller-testing"
gem "rspec_junit_formatter"
end

gemspec path: "../"
10 changes: 6 additions & 4 deletions gemfiles/rails_5.2_ndl.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
source "https://rubygems.org"

gem "jquery-rails"
gem "json_translate"
gem "enju_seed", git: "https://github.com/next-l/enju_seed.git"
gem "enju_leaf", git: "https://github.com/next-l/enju_leaf.git"
gem "enju_library", git: "https://github.com/next-l/enju_library.git"
gem "enju_biblio", git: "https://github.com/next-l/enju_biblio.git"
gem "enju_subject", git: "https://github.com/next-l/enju_subject.git"
gem "enju_ndl", git: "https://github.com/next-l/enju_ndl.git"
gem "paper_trail"
gem "rails-controller-testing", group: :test
gem "rspec_junit_formatter", group: :test
gem "rails", "~> 5.2"

group :test do
gem "rails-controller-testing"
gem "rspec_junit_formatter"
end

gemspec path: "../"
10 changes: 6 additions & 4 deletions gemfiles/rails_5.2_nii.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
source "https://rubygems.org"

gem "jquery-rails"
gem "json_translate"
gem "enju_seed", git: "https://github.com/next-l/enju_seed.git"
gem "enju_leaf", git: "https://github.com/next-l/enju_leaf.git"
gem "enju_library", git: "https://github.com/next-l/enju_library.git"
gem "enju_biblio", git: "https://github.com/next-l/enju_biblio.git"
gem "enju_subject", git: "https://github.com/next-l/enju_subject.git"
gem "enju_ndl", git: "https://github.com/next-l/enju_ndl.git"
gem "paper_trail"
gem "rails-controller-testing", group: :test
gem "rspec_junit_formatter", group: :test
gem "rails", "~> 5.2"
gem "enju_nii", git: "https://github.com/next-l/enju_nii.git"

group :test do
gem "rails-controller-testing"
gem "rspec_junit_formatter"
end

gemspec path: "../"
3 changes: 3 additions & 0 deletions spec/dummy/app/models/application_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
3 changes: 1 addition & 2 deletions spec/dummy/db/migrate/001_create_agents.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateAgents < ActiveRecord::Migration[4.2]
class CreateAgents < ActiveRecord::Migration[5.2]
def change
create_table :agents do |t|
t.string :last_name
Expand All @@ -13,7 +13,6 @@ def change
t.text :full_name_transcription
t.text :full_name_alternative
t.timestamps
t.datetime :deleted_at
t.string :zip_code_1
t.string :zip_code_2
t.text :address_1
Expand Down
3 changes: 1 addition & 2 deletions spec/dummy/db/migrate/005_create_manifestations.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateManifestations < ActiveRecord::Migration[4.2]
class CreateManifestations < ActiveRecord::Migration[5.2]
def change
create_table :manifestations do |t|
t.text :original_title, null: false
Expand All @@ -9,7 +9,6 @@ def change
t.datetime :date_of_publication
t.datetime :copyright_date
t.timestamps
t.datetime :deleted_at
t.string :access_address
t.integer :language_id, default: 1, null: false
t.integer :carrier_type_id, default: 1, null: false
Expand Down
3 changes: 1 addition & 2 deletions spec/dummy/db/migrate/006_create_items.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class CreateItems < ActiveRecord::Migration[4.2]
class CreateItems < ActiveRecord::Migration[5.2]
def change
create_table :items do |t|
t.string :call_number
t.string :item_identifier
t.timestamps
t.datetime :deleted_at
t.integer :shelf_id, default: 1, null: false
t.boolean :include_supplements, default: false, null: false
t.text :note
Expand Down
4 changes: 1 addition & 3 deletions spec/dummy/db/migrate/012_create_owns.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
class CreateOwns < ActiveRecord::Migration[4.2]
class CreateOwns < ActiveRecord::Migration[5.2]
def change
create_table :owns do |t|
t.references :agent, null: false
t.references :item, null: false
t.integer :position
t.timestamps
end
add_index :owns, :agent_id
add_index :owns, :item_id
end
end
4 changes: 1 addition & 3 deletions spec/dummy/db/migrate/015_create_creates.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
class CreateCreates < ActiveRecord::Migration[4.2]
class CreateCreates < ActiveRecord::Migration[5.2]
def change
create_table :creates do |t|
t.references :agent, null: false
t.references :work, null: false
t.integer :position
t.timestamps
end
add_index :creates, :agent_id
add_index :creates, :work_id
end
end
15 changes: 5 additions & 10 deletions spec/dummy/db/migrate/029_create_subjects.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
class CreateSubjects < ActiveRecord::Migration[4.2]
def self.up
class CreateSubjects < ActiveRecord::Migration[5.2]
def change
create_table :subjects do |t|
t.references :parent, index: true
t.integer :use_term_id
t.string :term
t.string :term, null: false
t.text :term_transcription
t.references :subject_type, index: true, null: false
t.text :scope_note
t.text :note
t.references :required_role, index: true, default: 1, null: false
t.integer :lock_version, default: 0, null: false
t.datetime :created_at
t.datetime :updated_at
t.datetime :deleted_at

t.timestamps
end
add_index :subjects, :term
add_index :subjects, :use_term_id
end

def self.down
drop_table :subjects
end
end
17 changes: 17 additions & 0 deletions spec/dummy/db/migrate/032_create_checkins.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class CreateCheckins < ActiveRecord::Migration[4.2]
def self.up
create_table :checkins do |t|
t.integer :item_id, null: false
t.integer :librarian_id
t.integer :basket_id
t.timestamps
end
add_index :checkins, :item_id
add_index :checkins, :librarian_id
add_index :checkins, :basket_id
end

def self.down
drop_table :checkins
end
end
25 changes: 25 additions & 0 deletions spec/dummy/db/migrate/033_create_checkouts.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class CreateCheckouts < ActiveRecord::Migration[4.2]
def self.up
create_table :checkouts do |t|
t.integer :user_id
t.integer :item_id, null: false
t.integer :checkin_id
t.integer :librarian_id
t.integer :basket_id
t.datetime :due_date
t.integer :checkout_renewal_count, default: 0, null: false
t.integer :lock_version, default: 0, null: false
t.timestamps
end
add_index :checkouts, :user_id
add_index :checkouts, :item_id
add_index :checkouts, :basket_id
add_index :checkouts, [:item_id, :basket_id], unique: true
add_index :checkouts, :librarian_id
add_index :checkouts, :checkin_id
end

def self.down
drop_table :checkouts
end
end
26 changes: 26 additions & 0 deletions spec/dummy/db/migrate/035_create_reserves.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class CreateReserves < ActiveRecord::Migration[4.2]
def self.up
create_table :reserves do |t|
t.integer :user_id, null: false
t.integer :manifestation_id, null: false
t.integer :item_id
t.integer :request_status_type_id, null: false
t.datetime :checked_out_at
t.timestamps
t.datetime :canceled_at
t.datetime :expired_at
t.datetime :deleted_at
t.boolean :expiration_notice_to_patron, default: false
t.boolean :expiration_notice_to_library, default: false
end

add_index :reserves, :user_id
add_index :reserves, :manifestation_id
add_index :reserves, :item_id
add_index :reserves, :request_status_type_id
end

def self.down
drop_table :reserves
end
end
6 changes: 3 additions & 3 deletions spec/dummy/db/migrate/041_create_roles.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class CreateRoles < ActiveRecord::Migration[4.2]
class CreateRoles < ActiveRecord::Migration[5.2]
def change
create_table "roles" do |t|
t.column :name, :string, null: false
t.column :display_name, :string
t.column :note, :text
t.column :created_at, :datetime
t.column :updated_at, :datetime
t.integer :score, default: 0, null: false
t.integer :position

t.timestamps
end
end
end
4 changes: 1 addition & 3 deletions spec/dummy/db/migrate/047_create_produces.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
class CreateProduces < ActiveRecord::Migration[4.2]
class CreateProduces < ActiveRecord::Migration[5.2]
def change
create_table :produces do |t|
t.references :agent, null: false
t.references :manifestation, null: false
t.integer :position
t.timestamps
end
add_index :produces, :agent_id
add_index :produces, :manifestation_id
end
end
22 changes: 22 additions & 0 deletions spec/dummy/db/migrate/055_create_bookmarks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class CreateBookmarks < ActiveRecord::Migration[4.2]
def self.up
create_table :bookmarks, force: true do |t|
t.integer :user_id, null: false
t.integer :manifestation_id
t.text :title
t.string :url
t.text :note
t.boolean :shared

t.timestamps
end

add_index :bookmarks, :user_id
add_index :bookmarks, :manifestation_id
add_index :bookmarks, :url
end

def self.down
drop_table :bookmarks
end
end
4 changes: 1 addition & 3 deletions spec/dummy/db/migrate/059_create_libraries.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
class CreateLibraries < ActiveRecord::Migration[4.2]
class CreateLibraries < ActiveRecord::Migration[5.2]
def change
create_table :libraries do |t|
t.string :name, index: true, null: false
t.text :display_name
t.string :short_display_name, null: false
t.string :zip_code
t.text :street
Expand All @@ -20,7 +19,6 @@ def change
t.references :country

t.timestamps
t.datetime :deleted_at
end
end
end
4 changes: 1 addition & 3 deletions spec/dummy/db/migrate/069_create_shelves.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
class CreateShelves < ActiveRecord::Migration[4.2]
class CreateShelves < ActiveRecord::Migration[5.2]
def change
create_table :shelves do |t|
t.string :name, null: false
t.text :display_name
t.text :note
t.references :library, index: true, null: false
t.integer :items_count, default: 0, null: false
t.integer :position
t.timestamps
t.datetime :deleted_at
end
end
end
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/073_create_carrier_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateCarrierTypes < ActiveRecord::Migration[4.2]
class CreateCarrierTypes < ActiveRecord::Migration[5.2]
def change
create_table :carrier_types do |t|
t.string :name, null: false
Expand Down
4 changes: 1 addition & 3 deletions spec/dummy/db/migrate/077_create_user_groups.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
class CreateUserGroups < ActiveRecord::Migration[4.2]
class CreateUserGroups < ActiveRecord::Migration[5.2]
def change
create_table :user_groups do |t|
t.string :name, not_null: true
t.text :display_name
t.text :note
t.integer :position
t.timestamps
t.datetime :deleted_at
end
end
end
3 changes: 1 addition & 2 deletions spec/dummy/db/migrate/080_create_library_groups.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
class CreateLibraryGroups < ActiveRecord::Migration[4.2]
class CreateLibraryGroups < ActiveRecord::Migration[5.2]
def change
create_table :library_groups do |t|
t.string :name, null: false
t.text :display_name
t.string :short_name, index: true, null: false
t.text :my_networks
t.text :login_banner
Expand Down
Loading

0 comments on commit 0351e6d

Please sign in to comment.