forked from masao/enju_loc
-
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.
- Loading branch information
Showing
71 changed files
with
741 additions
and
20 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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,3 @@ | ||
class ApplicationRecord < ActiveRecord::Base | ||
self.abstract_class = true | ||
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,50 @@ | ||
class CreateAgents < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :agents do |t| | ||
t.string :last_name | ||
t.string :middle_name | ||
t.string :first_name | ||
t.string :last_name_transcription | ||
t.string :middle_name_transcription | ||
t.string :first_name_transcription | ||
t.string :corporate_name | ||
t.string :corporate_name_transcription | ||
t.string :full_name | ||
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 | ||
t.text :address_2 | ||
t.text :address_1_note | ||
t.text :address_2_note | ||
t.string :telephone_number_1 | ||
t.string :telephone_number_2 | ||
t.string :fax_number_1 | ||
t.string :fax_number_2 | ||
t.text :other_designation | ||
t.text :place | ||
t.string :postal_code | ||
t.text :street | ||
t.text :locality | ||
t.text :region | ||
t.datetime :date_of_birth | ||
t.datetime :date_of_death | ||
t.integer :language_id, default: 1, null: false | ||
t.integer :country_id, default: 1, null: false | ||
t.integer :agent_type_id, default: 1, null: false | ||
t.integer :lock_version, default: 0, null: false | ||
t.text :note | ||
t.integer :required_role_id, default: 1, null: false | ||
t.integer :required_score, default: 0, null: false | ||
t.text :email | ||
t.text :url | ||
end | ||
add_index :agents, :language_id | ||
add_index :agents, :country_id | ||
add_index :agents, :required_role_id | ||
add_index :agents, :full_name | ||
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,43 @@ | ||
class CreateManifestations < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :manifestations do |t| | ||
t.text :original_title, null: false | ||
t.text :title_alternative | ||
t.text :title_transcription | ||
t.string :classification_number | ||
t.string :manifestation_identifier | ||
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 | ||
t.integer :start_page | ||
t.integer :end_page | ||
t.integer :height | ||
t.integer :width | ||
t.integer :depth | ||
t.integer :price # TODO: 通貨単位 | ||
t.text :fulltext | ||
t.string :volume_number_string | ||
t.string :issue_number_string | ||
t.string :serial_number_string | ||
t.integer :edition | ||
t.text :note | ||
t.boolean :repository_content, default: false, null: false | ||
t.integer :lock_version, default: 0, null: false | ||
t.integer :required_role_id, default: 1, null: false | ||
t.integer :required_score, default: 0, null: false | ||
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, :access_address | ||
#add_index :manifestations, :frequency_id | ||
add_index :manifestations, :manifestation_identifier | ||
add_index :manifestations, :updated_at | ||
add_index :manifestations, :date_of_publication | ||
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,11 @@ | ||
class CreateCarrierTypes < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :carrier_types do |t| | ||
t.string :name, null: false | ||
t.text :display_name | ||
t.text :note | ||
t.integer :position | ||
t.timestamps | ||
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,12 @@ | ||
class CreateFormOfWorks < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :form_of_works do |t| | ||
t.string :name, null: false | ||
t.text :display_name | ||
t.text :note | ||
t.integer :position | ||
|
||
t.timestamps | ||
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,28 @@ | ||
class CreateCountries < ActiveRecord::Migration[4.2] | ||
|
||
# ISO 3166 is the International Standard for country codes. | ||
# | ||
# ISO 3166-1:2006 Codes for the representation of names of countries and their subdivisions - Part 1: | ||
# Country codes which is what most users know as ISO's country codes. First published in 1974, it is has since | ||
# then become one of the world's most popular and most widely used standard solution for coding country names. | ||
# It contains a two-letter code which is recommended as the general purpose code, a three-letter code which has | ||
# better mnenomic properties and a numeric-3 code which can be useful if script independence of the codes is important. | ||
# | ||
# http://www.iso.org/iso/country_codes/background_on_iso_3166/what_is_iso_3166.htm | ||
|
||
def change | ||
create_table :countries do |t| | ||
t.string :name, size: 80, null: false | ||
t.text :display_name | ||
t.string :alpha_2, size: 2 | ||
t.string :alpha_3, size: 3 | ||
t.string :numeric_3, size: 3 | ||
t.text :note | ||
t.integer :position | ||
end | ||
add_index :countries, :name | ||
add_index :countries, :alpha_2 | ||
add_index :countries, :alpha_3 | ||
add_index :countries, :numeric_3 | ||
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,23 @@ | ||
class CreateLanguages < ActiveRecord::Migration[4.2] | ||
|
||
# ISO 639 is the set of international standards that lists short codes for language names. | ||
# Note this doesn't include macrolanguages (dialects) | ||
# Information on macrolanguages http://en.wikipedia.org/wiki/ISO_639_macrolanguage | ||
|
||
def change | ||
create_table :languages do |t| | ||
t.string :name, null: false | ||
t.string :native_name | ||
t.text :display_name | ||
t.string :iso_639_1, size: 3 | ||
t.string :iso_639_2, size: 3 | ||
t.string :iso_639_3, size: 3 | ||
t.text :note | ||
t.integer :position | ||
end | ||
add_index :languages, :name, unique: true | ||
add_index :languages, :iso_639_1 | ||
add_index :languages, :iso_639_2 | ||
add_index :languages, :iso_639_3 | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
spec/dummy/db/migrate/20090720091106_create_medium_of_performances.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,12 @@ | ||
class CreateMediumOfPerformances < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :medium_of_performances do |t| | ||
t.string :name, null: false | ||
t.text :display_name | ||
t.text :note | ||
t.integer :position | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
spec/dummy/db/migrate/20090720091429_create_content_types.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,12 @@ | ||
class CreateContentTypes < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :content_types do |t| | ||
t.string :name, null: false | ||
t.text :display_name | ||
t.text :note | ||
t.integer :position | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.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,12 @@ | ||
class CreateAgentRelationshipTypes < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :agent_relationship_types do |t| | ||
t.string :name, null: false | ||
t.text :display_name | ||
t.text :note | ||
t.integer :position | ||
|
||
t.timestamps | ||
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,27 @@ | ||
class AddDcndlSchema < ActiveRecord::Migration[4.2] | ||
def self.up | ||
add_column :manifestations, :title_alternative_transcription, :text | ||
add_column :agents, :full_name_alternative_transcription, :text | ||
add_column :manifestations, :description, :text | ||
add_column :manifestations, :abstract, :text | ||
add_column :manifestations, :available_at, :timestamp | ||
add_column :manifestations, :valid_until, :timestamp | ||
add_column :manifestations, :date_submitted, :timestamp | ||
add_column :manifestations, :date_accepted, :timestamp | ||
add_column :manifestations, :date_captured, :timestamp | ||
rename_column :manifestations, :copyright_date, :date_copyrighted | ||
end | ||
|
||
def self.down | ||
remove_column :manifestations, :title_alternative_transcription | ||
remove_column :agents, :full_name_alternative_transcription | ||
remove_column :manifestations, :description | ||
remove_column :manifestations, :abstract | ||
remove_column :manifestations, :available_at | ||
remove_column :manifestations, :valid_until | ||
remove_column :manifestations, :date_submitted | ||
remove_column :manifestations, :date_accepted | ||
remove_column :manifestations, :date_captured | ||
rename_column :manifestations, :date_copyrighted, :copyright_date | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
spec/dummy/db/migrate/20091214131723_create_series_statements.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,13 @@ | ||
class CreateSeriesStatements < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :series_statements do |t| | ||
t.text :title | ||
t.text :numbering | ||
t.text :title_subseries | ||
t.text :numbering_subseries | ||
t.integer :position | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.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,13 @@ | ||
class RenameSeriesStatementTitleToOriginalTitle < ActiveRecord::Migration[4.2] | ||
def self.up | ||
rename_column :series_statements, :title, :original_title | ||
add_column :series_statements, :title_transcription, :text | ||
add_column :series_statements, :title_alternative, :text | ||
end | ||
|
||
def self.down | ||
rename_column :series_statements, :original_title, :title | ||
remove_column :series_statements, :title_transcription | ||
remove_column :series_statements, :title_alternative | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.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 AddSeriesStatementIdentifierToSeriesStatement < ActiveRecord::Migration[4.2] | ||
def self.up | ||
add_column :series_statements, :series_statement_identifier, :string | ||
add_index :series_statements, :series_statement_identifier | ||
end | ||
|
||
def self.down | ||
remove_column :series_statements, :series_statement_identifier | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.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,12 @@ | ||
class CreateManifestationRelationshipTypes < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :manifestation_relationship_types do |t| | ||
t.string :name, null: false | ||
t.text :display_name | ||
t.text :note | ||
t.integer :position | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.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,11 @@ | ||
class AddPositionToAgentRelationship < ActiveRecord::Migration[4.2] | ||
def self.up | ||
add_column :manifestation_relationships, :position, :integer | ||
add_column :agent_relationships, :position, :integer | ||
end | ||
|
||
def self.down | ||
remove_column :agent_relationships, :position | ||
remove_column :manifestation_relationships, :position | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/dummy/db/migrate/20100925043847_create_resource_import_results.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,15 @@ | ||
class CreateResourceImportResults < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :resource_import_results do |t| | ||
t.integer :resource_import_file_id | ||
t.integer :manifestation_id | ||
t.integer :item_id | ||
t.text :body | ||
|
||
t.timestamps | ||
end | ||
add_index :resource_import_results, :resource_import_file_id | ||
add_index :resource_import_results, :manifestation_id | ||
add_index :resource_import_results, :item_id | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
spec/dummy/db/migrate/20100925074559_create_agent_import_results.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,11 @@ | ||
class CreateAgentImportResults < ActiveRecord::Migration[4.2] | ||
def change | ||
create_table :agent_import_results do |t| | ||
t.integer :agent_import_file_id | ||
t.integer :agent_id | ||
t.text :body | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.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,9 @@ | ||
class AddAcquiredAtToItem < ActiveRecord::Migration[4.2] | ||
def self.up | ||
add_column :items, :acquired_at, :timestamp | ||
end | ||
|
||
def self.down | ||
remove_column :items, :acquired_at | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.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,9 @@ | ||
class AddPubDateToManifestation < ActiveRecord::Migration[4.2] | ||
def self.up | ||
add_column :manifestations, :pub_date, :string | ||
end | ||
|
||
def self.down | ||
remove_column :manifestations, :pub_date | ||
end | ||
end |
Oops, something went wrong.