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 Aug 20, 2019
1 parent 0f1c371 commit 0ae4aa3
Show file tree
Hide file tree
Showing 212 changed files with 701 additions and 681 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ gemspec

# To use debugger
# gem 'debugger'
gem 'rails', '~> 5.2'
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 'sassc-rails'
gem 'paper_trail'
gem 'paperclip-meta'
group :test do
gem 'rails-controller-testing'
gem 'rspec_junit_formatter'
Expand Down
6 changes: 3 additions & 3 deletions app/models/classification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class Classification < ApplicationRecord
#
# Table name: classifications
#
# id :integer not null, primary key
# id :bigint not null, primary key
# parent_id :integer
# category :string not null
# note :text
# classification_type_id :integer not null
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
# lft :integer
# rgt :integer
# manifestation_id :integer
Expand Down
6 changes: 3 additions & 3 deletions app/models/classification_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class ClassificationType < ApplicationRecord
#
# Table name: classification_types
#
# id :integer not null, primary key
# id :bigint not null, primary key
# name :string not null
# display_name :text
# note :text
# position :integer
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
#
8 changes: 4 additions & 4 deletions app/models/subject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class Subject < ApplicationRecord
#
# Table name: subjects
#
# id :integer not null, primary key
# parent_id :integer
# id :bigint not null, primary key
# parent_id :bigint
# use_term_id :integer
# term :string
# term_transcription :text
# subject_type_id :integer not null
# subject_type_id :bigint not null
# scope_note :text
# note :text
# required_role_id :integer default(1), not null
# required_role_id :bigint default(1), not null
# lock_version :integer default(0), not null
# created_at :datetime
# updated_at :datetime
Expand Down
6 changes: 3 additions & 3 deletions app/models/subject_heading_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class SubjectHeadingType < ApplicationRecord
#
# Table name: subject_heading_types
#
# id :integer not null, primary key
# id :bigint not null, primary key
# name :string not null
# display_name :text
# note :text
# position :integer
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
#
6 changes: 3 additions & 3 deletions app/models/subject_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class SubjectType < ApplicationRecord
#
# Table name: subject_types
#
# id :integer not null, primary key
# id :bigint not null, primary key
# name :string not null
# display_name :text
# note :text
# position :integer
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
#
2 changes: 1 addition & 1 deletion db/migrate/029_create_subjects.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSubjects < ActiveRecord::Migration[4.2]
class CreateSubjects < ActiveRecord::Migration[5.2]
def self.up
create_table :subjects do |t|
t.references :parent, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/142_create_classifications.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateClassifications < ActiveRecord::Migration[4.2]
class CreateClassifications < ActiveRecord::Migration[5.2]
def self.up
create_table :classifications do |t|
t.integer :parent_id
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/144_create_classification_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateClassificationTypes < ActiveRecord::Migration[4.2]
class CreateClassificationTypes < ActiveRecord::Migration[5.2]
def self.up
create_table :classification_types do |t|
t.string :name, null: false
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/145_create_subject_heading_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSubjectHeadingTypes < ActiveRecord::Migration[4.2]
class CreateSubjectHeadingTypes < ActiveRecord::Migration[5.2]
def self.up
create_table :subject_heading_types do |t|
t.string :name, null: false
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/146_create_subject_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSubjectTypes < ActiveRecord::Migration[4.2]
class CreateSubjectTypes < ActiveRecord::Migration[5.2]
def self.up
create_table :subject_types do |t|
t.string :name, null: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddLftAndRgtToClassification < ActiveRecord::Migration[4.2]
class AddLftAndRgtToClassification < ActiveRecord::Migration[5.2]
def self.up
add_column :classifications, :lft, :integer
add_column :classifications, :rgt, :integer
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120406020752_add_url_to_subject.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUrlToSubject < ActiveRecord::Migration[4.2]
class AddUrlToSubject < ActiveRecord::Migration[5.2]
def change
add_column :subjects, :url, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddManifestationIdToSubject < ActiveRecord::Migration[4.2]
class AddManifestationIdToSubject < ActiveRecord::Migration[5.2]
def change
add_column :subjects, :manifestation_id, :integer
add_index :subjects, :manifestation_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddManifestationIdToClassification < ActiveRecord::Migration[4.2]
class AddManifestationIdToClassification < ActiveRecord::Migration[5.2]
def change
add_column :classifications, :manifestation_id, :integer
add_index :classifications, :manifestation_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration[4.2]
class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration[5.2]
def change
add_column :subjects, :subject_heading_type_id, :integer
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150923173139_add_url_to_classification.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUrlToClassification < ActiveRecord::Migration[4.2]
class AddUrlToClassification < ActiveRecord::Migration[5.2]
def change
add_column :classifications, :url, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150925092505_add_label_to_classification.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddLabelToClassification < ActiveRecord::Migration[4.2]
class AddLabelToClassification < ActiveRecord::Migration[5.2]
def change
add_column :classifications, :label, :string
end
Expand Down
1 change: 0 additions & 1 deletion spec/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class ApplicationController < ActionController::Base
include EnjuLibrary::Controller
include EnjuBiblio::Controller
include EnjuSubject::Controller
before_action :set_paper_trail_whodunnit
after_action :verify_authorized

include Pundit
Expand Down
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
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/002_devise_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DeviseCreateUsers < ActiveRecord::Migration[4.2]
class DeviseCreateUsers < ActiveRecord::Migration[5.2]
def change
create_table(:users) do |t|
## Database authenticatable
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
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/041_create_roles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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
Expand Down
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
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
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/112_create_frequencies.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateFrequencies < ActiveRecord::Migration[4.2]
class CreateFrequencies < ActiveRecord::Migration[5.2]
def change
create_table :frequencies do |t|
t.string :name, null: false
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/117_create_form_of_works.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateFormOfWorks < ActiveRecord::Migration[4.2]
class CreateFormOfWorks < ActiveRecord::Migration[5.2]
def change
create_table :form_of_works do |t|
t.string :name, null: false
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/120_create_baskets.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateBaskets < ActiveRecord::Migration[4.2]
class CreateBaskets < ActiveRecord::Migration[5.2]
def change
create_table :baskets do |t|
t.references :user, index: true
Expand Down
3 changes: 1 addition & 2 deletions spec/dummy/db/migrate/124_create_bookstores.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateBookstores < ActiveRecord::Migration[4.2]
class CreateBookstores < ActiveRecord::Migration[5.2]
def change
create_table :bookstores do |t|
t.text :name, null: false
Expand All @@ -9,7 +9,6 @@ def change
t.string :fax_number
t.string :url
t.integer :position
t.datetime :deleted_at

t.timestamps
end
Expand Down
8 changes: 3 additions & 5 deletions spec/dummy/db/migrate/125_create_donates.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
class CreateDonates < ActiveRecord::Migration[4.2]
class CreateDonates < ActiveRecord::Migration[5.2]
def change
create_table :donates do |t|
t.integer :agent_id, null: false
t.integer :item_id, null: false
t.references :agent, foreign_key: true, null: false
t.references :item, foreign_key: true, null: false

t.timestamps
end
add_index :donates, :agent_id
add_index :donates, :item_id
end
end
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/130_create_request_status_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateRequestStatusTypes < ActiveRecord::Migration[4.2]
class CreateRequestStatusTypes < ActiveRecord::Migration[5.2]
def change
create_table :request_status_types do |t|
t.string :name, null: false
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/db/migrate/131_create_request_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateRequestTypes < ActiveRecord::Migration[4.2]
class CreateRequestTypes < ActiveRecord::Migration[5.2]
def change
create_table :request_types do |t|
t.string :name, null: false
Expand Down

0 comments on commit 0ae4aa3

Please sign in to comment.