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
266 changed files
with
2,432 additions
and
616 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 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
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
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
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
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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 |
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,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 |
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,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 |
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,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 |
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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 |
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,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 |
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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 |
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
Oops, something went wrong.